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

import typing

import pydantic
from ......core.pydantic_utilities import IS_PYDANTIC_V2
from .....diagnoses.types.diagnosis_id import DiagnosisId
from .....encounters_universal.types.universal_encounter_update_base import UniversalEncounterUpdateBase
from .vitals_update import VitalsUpdate


class EncounterUpdate(UniversalEncounterUpdateBase):
    vitals: typing.Optional[VitalsUpdate] = pydantic.Field(default=None)
    """
    If a vitals entity already exists for the encounter, then all values will be updated to the provided values.
    Otherwise, a new vitals object will be created for the encounter.
    """

    diagnosis_ids: typing.Optional[typing.List[DiagnosisId]] = pydantic.Field(default=None)
    """
    Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
    may be submitted at this time, and coders will later prioritize the 12 that will be
    submitted to the payor.
    """

    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
