# 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 (
        AdmittingDiagnosis,
        AdmittingDiagnosisCodeQualifier,
        AdmittingDiagnosisNew,
        ConditionCode,
        ConditionInformation,
        ConditionInformationCodeQualifier,
        ConditionInformationNew,
        D8Date,
        DiagnosisRelatedGroup,
        DiagnosisRelatedGroupCodeQualifier,
        DiagnosisRelatedGroupNew,
        ExternalCauseOfInjury,
        ExternalCauseOfInjuryCodeQualifier,
        ExternalCauseOfInjuryNew,
        HealthCareCodeInformation,
        HealthCareCodeInformationCreate,
        HealthCareCodeInformationGetAllResponse,
        HealthCareCodeInformationNew,
        HealthCareCodeInformationUpdate,
        IcdCode,
        MsdrgCode,
        OccurrenceCode,
        OccurrenceInformation,
        OccurrenceInformationCodeQualifier,
        OccurrenceInformationNew,
        OccurrenceSpanCode,
        OccurrenceSpanCodeQualifier,
        OccurrenceSpanInformation,
        OccurrenceSpanInformationNew,
        OtherDiagnosisInformation,
        OtherDiagnosisInformationCodeQualifier,
        OtherDiagnosisInformationNew,
        OtherProcedureInformation,
        OtherProcedureInformationCodeQualifier,
        OtherProcedureInformationNew,
        PatientReasonForVisit,
        PatientReasonForVisitCodeQualifier,
        PatientReasonForVisitNew,
        PresentOnAdmissionIndicatorCode,
        PrincipalDiagnosis,
        PrincipalDiagnosisCodeQualifier,
        PrincipalDiagnosisNew,
        PrincipalProcedureInformation,
        PrincipalProcedureInformationCodeQualifier,
        PrincipalProcedureInformationNew,
        Rd8Date,
        SetOrClearAdmittingDiagnosis,
        SetOrClearDiagnosisRelatedGroup,
        SetOrClearPrincipalDiagnosis,
        SetOrClearPrincipalProcedureInformation,
        TreatmentCode,
        TreatmentCodeInformation,
        TreatmentCodeInformationNew,
        TreatmentCodeQualifier,
        ValueCode,
        ValueCodeQualifier,
        ValueInformation,
        ValueInformationNew,
    )
_dynamic_imports: typing.Dict[str, str] = {
    "AdmittingDiagnosis": ".types",
    "AdmittingDiagnosisCodeQualifier": ".types",
    "AdmittingDiagnosisNew": ".types",
    "ConditionCode": ".types",
    "ConditionInformation": ".types",
    "ConditionInformationCodeQualifier": ".types",
    "ConditionInformationNew": ".types",
    "D8Date": ".types",
    "DiagnosisRelatedGroup": ".types",
    "DiagnosisRelatedGroupCodeQualifier": ".types",
    "DiagnosisRelatedGroupNew": ".types",
    "ExternalCauseOfInjury": ".types",
    "ExternalCauseOfInjuryCodeQualifier": ".types",
    "ExternalCauseOfInjuryNew": ".types",
    "HealthCareCodeInformation": ".types",
    "HealthCareCodeInformationCreate": ".types",
    "HealthCareCodeInformationGetAllResponse": ".types",
    "HealthCareCodeInformationNew": ".types",
    "HealthCareCodeInformationUpdate": ".types",
    "IcdCode": ".types",
    "MsdrgCode": ".types",
    "OccurrenceCode": ".types",
    "OccurrenceInformation": ".types",
    "OccurrenceInformationCodeQualifier": ".types",
    "OccurrenceInformationNew": ".types",
    "OccurrenceSpanCode": ".types",
    "OccurrenceSpanCodeQualifier": ".types",
    "OccurrenceSpanInformation": ".types",
    "OccurrenceSpanInformationNew": ".types",
    "OtherDiagnosisInformation": ".types",
    "OtherDiagnosisInformationCodeQualifier": ".types",
    "OtherDiagnosisInformationNew": ".types",
    "OtherProcedureInformation": ".types",
    "OtherProcedureInformationCodeQualifier": ".types",
    "OtherProcedureInformationNew": ".types",
    "PatientReasonForVisit": ".types",
    "PatientReasonForVisitCodeQualifier": ".types",
    "PatientReasonForVisitNew": ".types",
    "PresentOnAdmissionIndicatorCode": ".types",
    "PrincipalDiagnosis": ".types",
    "PrincipalDiagnosisCodeQualifier": ".types",
    "PrincipalDiagnosisNew": ".types",
    "PrincipalProcedureInformation": ".types",
    "PrincipalProcedureInformationCodeQualifier": ".types",
    "PrincipalProcedureInformationNew": ".types",
    "Rd8Date": ".types",
    "SetOrClearAdmittingDiagnosis": ".types",
    "SetOrClearDiagnosisRelatedGroup": ".types",
    "SetOrClearPrincipalDiagnosis": ".types",
    "SetOrClearPrincipalProcedureInformation": ".types",
    "TreatmentCode": ".types",
    "TreatmentCodeInformation": ".types",
    "TreatmentCodeInformationNew": ".types",
    "TreatmentCodeQualifier": ".types",
    "ValueCode": ".types",
    "ValueCodeQualifier": ".types",
    "ValueInformation": ".types",
    "ValueInformationNew": ".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__ = [
    "AdmittingDiagnosis",
    "AdmittingDiagnosisCodeQualifier",
    "AdmittingDiagnosisNew",
    "ConditionCode",
    "ConditionInformation",
    "ConditionInformationCodeQualifier",
    "ConditionInformationNew",
    "D8Date",
    "DiagnosisRelatedGroup",
    "DiagnosisRelatedGroupCodeQualifier",
    "DiagnosisRelatedGroupNew",
    "ExternalCauseOfInjury",
    "ExternalCauseOfInjuryCodeQualifier",
    "ExternalCauseOfInjuryNew",
    "HealthCareCodeInformation",
    "HealthCareCodeInformationCreate",
    "HealthCareCodeInformationGetAllResponse",
    "HealthCareCodeInformationNew",
    "HealthCareCodeInformationUpdate",
    "IcdCode",
    "MsdrgCode",
    "OccurrenceCode",
    "OccurrenceInformation",
    "OccurrenceInformationCodeQualifier",
    "OccurrenceInformationNew",
    "OccurrenceSpanCode",
    "OccurrenceSpanCodeQualifier",
    "OccurrenceSpanInformation",
    "OccurrenceSpanInformationNew",
    "OtherDiagnosisInformation",
    "OtherDiagnosisInformationCodeQualifier",
    "OtherDiagnosisInformationNew",
    "OtherProcedureInformation",
    "OtherProcedureInformationCodeQualifier",
    "OtherProcedureInformationNew",
    "PatientReasonForVisit",
    "PatientReasonForVisitCodeQualifier",
    "PatientReasonForVisitNew",
    "PresentOnAdmissionIndicatorCode",
    "PrincipalDiagnosis",
    "PrincipalDiagnosisCodeQualifier",
    "PrincipalDiagnosisNew",
    "PrincipalProcedureInformation",
    "PrincipalProcedureInformationCodeQualifier",
    "PrincipalProcedureInformationNew",
    "Rd8Date",
    "SetOrClearAdmittingDiagnosis",
    "SetOrClearDiagnosisRelatedGroup",
    "SetOrClearPrincipalDiagnosis",
    "SetOrClearPrincipalProcedureInformation",
    "TreatmentCode",
    "TreatmentCodeInformation",
    "TreatmentCodeInformationNew",
    "TreatmentCodeQualifier",
    "ValueCode",
    "ValueCodeQualifier",
    "ValueInformation",
    "ValueInformationNew",
]
