# This file was auto-generated by Fern from our API Definition.

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .types import (
        BillableStatusType,
        CashPayPayerErrorMessage,
        ClaimSupplementalInformation,
        ClaimSupplementalInformationOptional,
        ClinicalNote,
        ClinicalNoteCategory,
        ClinicalNoteCategoryCreate,
        ClinicalNoteCategoryCreateOptional,
        ClinicalNoteOptional,
        CodingAttributionType,
        Encounter,
        EncounterBase,
        EncounterCreate,
        EncounterCreateFromPreEncounter,
        EncounterDeepOptional,
        EncounterExternalIdUniquenessErrorType,
        EncounterGuarantorMissingContactInfoErrorType,
        EncounterOptional,
        EncounterOwnerOfNextActionType,
        EncounterPage,
        EncounterPatientControlNumberUniquenessErrorType,
        EncounterRenderingOrAttendingProviderRequiredError,
        EncounterSortOptions,
        EncounterSubmissionExpectation,
        EncounterSubmissionOriginType,
        EncounterUpdate,
        EpsdtReferral,
        EpsdtReferralOptional,
        IntakeFollowUp,
        IntakeFollowUpId,
        IntakeQuestion,
        IntakeQuestionId,
        IntakeQuestionOptional,
        IntakeResponseAndFollowUps,
        Intervention,
        InterventionCategory,
        InterventionOptional,
        InvalidTagNamesErrorType,
        KeyDoesNotExistError,
        Lab,
        LabCodeType,
        LabOptional,
        Medication,
        MedicationOptional,
        MultipleInstancesForSchemaError,
        NoteCategory,
        PatientHistoryCategory,
        PatientHistoryCategoryEnum,
        PatientHistoryCategoryOptional,
        PayerPlanGroupPayerDoesNotMatchInsuranceCardError,
        PriorAuthorizationNumber,
        ResponsiblePartyType,
        RxCui,
        SchemaDoesNotExistError,
        SchemaInstanceValidationError,
        SchemaInstanceValidationError_KeyDoesNotExist,
        SchemaInstanceValidationError_MultipleInstancesForSchema,
        SchemaInstanceValidationError_SchemaDoesNotExist,
        SchemaInstanceValidationError_SchemaUnauthorizedAccess,
        SchemaInstanceValidationError_ValueDoesNotMatchKeyType,
        SchemaInstanceValidationFailure,
        SchemaUnauthorizedAccessError,
        ServiceAuthorizationExceptionCode,
        SynchronicityType,
        ValueDoesNotMatchKeyTypeError,
        Vitals,
        VitalsUpdate,
    )
    from .errors import (
        CashPayPayerError,
        EncounterExternalIdUniquenessError,
        EncounterGuarantorMissingContactInfoError,
        EncounterPatientControlNumberUniquenessError,
        EncounterRenderingOrAttendingProviderRequired,
        InvalidTagNamesError,
        PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError,
        SchemaInstanceValidationHttpFailure,
    )
_dynamic_imports: typing.Dict[str, str] = {
    "BillableStatusType": ".types",
    "CashPayPayerError": ".errors",
    "CashPayPayerErrorMessage": ".types",
    "ClaimSupplementalInformation": ".types",
    "ClaimSupplementalInformationOptional": ".types",
    "ClinicalNote": ".types",
    "ClinicalNoteCategory": ".types",
    "ClinicalNoteCategoryCreate": ".types",
    "ClinicalNoteCategoryCreateOptional": ".types",
    "ClinicalNoteOptional": ".types",
    "CodingAttributionType": ".types",
    "Encounter": ".types",
    "EncounterBase": ".types",
    "EncounterCreate": ".types",
    "EncounterCreateFromPreEncounter": ".types",
    "EncounterDeepOptional": ".types",
    "EncounterExternalIdUniquenessError": ".errors",
    "EncounterExternalIdUniquenessErrorType": ".types",
    "EncounterGuarantorMissingContactInfoError": ".errors",
    "EncounterGuarantorMissingContactInfoErrorType": ".types",
    "EncounterOptional": ".types",
    "EncounterOwnerOfNextActionType": ".types",
    "EncounterPage": ".types",
    "EncounterPatientControlNumberUniquenessError": ".errors",
    "EncounterPatientControlNumberUniquenessErrorType": ".types",
    "EncounterRenderingOrAttendingProviderRequired": ".errors",
    "EncounterRenderingOrAttendingProviderRequiredError": ".types",
    "EncounterSortOptions": ".types",
    "EncounterSubmissionExpectation": ".types",
    "EncounterSubmissionOriginType": ".types",
    "EncounterUpdate": ".types",
    "EpsdtReferral": ".types",
    "EpsdtReferralOptional": ".types",
    "IntakeFollowUp": ".types",
    "IntakeFollowUpId": ".types",
    "IntakeQuestion": ".types",
    "IntakeQuestionId": ".types",
    "IntakeQuestionOptional": ".types",
    "IntakeResponseAndFollowUps": ".types",
    "Intervention": ".types",
    "InterventionCategory": ".types",
    "InterventionOptional": ".types",
    "InvalidTagNamesError": ".errors",
    "InvalidTagNamesErrorType": ".types",
    "KeyDoesNotExistError": ".types",
    "Lab": ".types",
    "LabCodeType": ".types",
    "LabOptional": ".types",
    "Medication": ".types",
    "MedicationOptional": ".types",
    "MultipleInstancesForSchemaError": ".types",
    "NoteCategory": ".types",
    "PatientHistoryCategory": ".types",
    "PatientHistoryCategoryEnum": ".types",
    "PatientHistoryCategoryOptional": ".types",
    "PayerPlanGroupPayerDoesNotMatchInsuranceCardError": ".types",
    "PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError": ".errors",
    "PriorAuthorizationNumber": ".types",
    "ResponsiblePartyType": ".types",
    "RxCui": ".types",
    "SchemaDoesNotExistError": ".types",
    "SchemaInstanceValidationError": ".types",
    "SchemaInstanceValidationError_KeyDoesNotExist": ".types",
    "SchemaInstanceValidationError_MultipleInstancesForSchema": ".types",
    "SchemaInstanceValidationError_SchemaDoesNotExist": ".types",
    "SchemaInstanceValidationError_SchemaUnauthorizedAccess": ".types",
    "SchemaInstanceValidationError_ValueDoesNotMatchKeyType": ".types",
    "SchemaInstanceValidationFailure": ".types",
    "SchemaInstanceValidationHttpFailure": ".errors",
    "SchemaUnauthorizedAccessError": ".types",
    "ServiceAuthorizationExceptionCode": ".types",
    "SynchronicityType": ".types",
    "ValueDoesNotMatchKeyTypeError": ".types",
    "Vitals": ".types",
    "VitalsUpdate": ".types",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "BillableStatusType",
    "CashPayPayerError",
    "CashPayPayerErrorMessage",
    "ClaimSupplementalInformation",
    "ClaimSupplementalInformationOptional",
    "ClinicalNote",
    "ClinicalNoteCategory",
    "ClinicalNoteCategoryCreate",
    "ClinicalNoteCategoryCreateOptional",
    "ClinicalNoteOptional",
    "CodingAttributionType",
    "Encounter",
    "EncounterBase",
    "EncounterCreate",
    "EncounterCreateFromPreEncounter",
    "EncounterDeepOptional",
    "EncounterExternalIdUniquenessError",
    "EncounterExternalIdUniquenessErrorType",
    "EncounterGuarantorMissingContactInfoError",
    "EncounterGuarantorMissingContactInfoErrorType",
    "EncounterOptional",
    "EncounterOwnerOfNextActionType",
    "EncounterPage",
    "EncounterPatientControlNumberUniquenessError",
    "EncounterPatientControlNumberUniquenessErrorType",
    "EncounterRenderingOrAttendingProviderRequired",
    "EncounterRenderingOrAttendingProviderRequiredError",
    "EncounterSortOptions",
    "EncounterSubmissionExpectation",
    "EncounterSubmissionOriginType",
    "EncounterUpdate",
    "EpsdtReferral",
    "EpsdtReferralOptional",
    "IntakeFollowUp",
    "IntakeFollowUpId",
    "IntakeQuestion",
    "IntakeQuestionId",
    "IntakeQuestionOptional",
    "IntakeResponseAndFollowUps",
    "Intervention",
    "InterventionCategory",
    "InterventionOptional",
    "InvalidTagNamesError",
    "InvalidTagNamesErrorType",
    "KeyDoesNotExistError",
    "Lab",
    "LabCodeType",
    "LabOptional",
    "Medication",
    "MedicationOptional",
    "MultipleInstancesForSchemaError",
    "NoteCategory",
    "PatientHistoryCategory",
    "PatientHistoryCategoryEnum",
    "PatientHistoryCategoryOptional",
    "PayerPlanGroupPayerDoesNotMatchInsuranceCardError",
    "PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError",
    "PriorAuthorizationNumber",
    "ResponsiblePartyType",
    "RxCui",
    "SchemaDoesNotExistError",
    "SchemaInstanceValidationError",
    "SchemaInstanceValidationError_KeyDoesNotExist",
    "SchemaInstanceValidationError_MultipleInstancesForSchema",
    "SchemaInstanceValidationError_SchemaDoesNotExist",
    "SchemaInstanceValidationError_SchemaUnauthorizedAccess",
    "SchemaInstanceValidationError_ValueDoesNotMatchKeyType",
    "SchemaInstanceValidationFailure",
    "SchemaInstanceValidationHttpFailure",
    "SchemaUnauthorizedAccessError",
    "ServiceAuthorizationExceptionCode",
    "SynchronicityType",
    "ValueDoesNotMatchKeyTypeError",
    "Vitals",
    "VitalsUpdate",
]
