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

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .admitting_diagnosis import AdmittingDiagnosis
from .condition_information import ConditionInformation
from .diagnosis_related_group import DiagnosisRelatedGroup
from .external_cause_of_injury import ExternalCauseOfInjury
from .occurrence_information import OccurrenceInformation
from .occurrence_span_information import OccurrenceSpanInformation
from .other_diagnosis_information import OtherDiagnosisInformation
from .other_procedure_information import OtherProcedureInformation
from .patient_reason_for_visit import PatientReasonForVisit
from .principal_diagnosis import PrincipalDiagnosis
from .principal_procedure_information import PrincipalProcedureInformation
from .treatment_code_information import TreatmentCodeInformation
from .value_information import ValueInformation


class HealthCareCodeInformationGetAllResponse(UniversalBaseModel):
    principal_diagnosis: typing.Optional[PrincipalDiagnosis] = None
    other_diagnosis_information: typing.List[OtherDiagnosisInformation]
    admitting_diagnosis: typing.Optional[AdmittingDiagnosis] = pydantic.Field(default=None)
    """
    This object only applies to 837i institutional claim forms.
    """

    patient_reasons_for_visit: typing.List[PatientReasonForVisit] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    external_causes_of_injury: typing.List[ExternalCauseOfInjury] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    diagnosis_related_groups: typing.Optional[DiagnosisRelatedGroup] = pydantic.Field(default=None)
    """
    This object only applies to 837i institutional claim forms.
    """

    principal_procedure: typing.Optional[PrincipalProcedureInformation] = pydantic.Field(default=None)
    """
    This object only applies to 837i institutional claim forms.
    """

    other_procedure_information: typing.List[OtherProcedureInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    occurrence_span_information: typing.List[OccurrenceSpanInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    occurrence_information: typing.List[OccurrenceInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    treatment_code_information: typing.List[TreatmentCodeInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    value_information: typing.List[ValueInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    condition_information: typing.List[ConditionInformation] = pydantic.Field()
    """
    This object only applies to 837i institutional claim forms.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
