# -*- coding: utf-8 -*-
# ----  AUTO-GENERATED BY redox_lib_gen. DO NOT MODIFY MANUALLY!!  ---- #

from typing import List, Union

from pydantic import Field

from ..abstract_base import EventTypeAbstractModel, RedoxAbstractModel
from ..field_types import Number


class VisitQueryResponse(EventTypeAbstractModel):

    AdmissionDiagnosis: List["VisitQueryResponseAdmissionDiagnosis"] = Field(None)
    AdmissionDiagnosisText: Union[str, None] = Field(None)
    AdvanceDirectives: List["VisitQueryResponseAdvanceDirective"] = Field(None)
    AdvanceDirectivesText: Union[str, None] = Field(None)
    Allergies: List["VisitQueryResponseAllergy"] = Field(None)
    AllergyText: Union[str, None] = Field(None)
    Assessment: "VisitQueryResponseAssessment" = Field(None)
    AssessmentText: Union[str, None] = Field(None)
    ChiefComplaintText: Union[str, None] = Field(None)
    DischargeDiagnosis: List["VisitQueryResponseDischargeDiagnosis"] = Field(None)
    DischargeDiagnosisText: Union[str, None] = Field(None)
    DischargeMedications: List["VisitQueryResponseDischargeMedication"] = Field(None)
    DischargeMedicationsText: Union[str, None] = Field(None)
    Encounters: List["VisitQueryResponseEncounter"] = Field(None)
    EncountersText: Union[str, None] = Field(None)
    FamilyHistory: List["VisitQueryResponseFamilyHistory"] = Field(None)
    FamilyHistoryText: Union[str, None] = Field(None)
    FunctionalStatus: "VisitQueryResponseFunctionalStatus" = Field(None)
    FunctionalStatusText: Union[str, None] = Field(None)
    Goals: List["VisitQueryResponseGoal"] = Field(None)
    GoalsText: Union[str, None] = Field(None)
    Header: "VisitQueryResponseHeader" = Field(None)
    HealthConcerns: List["VisitQueryResponseHealthConcern"] = Field(None)
    HealthConcernsText: Union[str, None] = Field(None)
    HistoryOfPresentIllnessText: Union[str, None] = Field(None)
    Immunizations: List["VisitQueryResponseImmunization"] = Field(None)
    ImmunizationText: Union[str, None] = Field(None)
    InstructionsText: Union[str, None] = Field(None)
    Insurances: List["VisitQueryResponseInsurance"] = Field(None)
    InsurancesText: Union[str, None] = Field(None)
    InterventionsText: Union[str, None] = Field(None)
    MedicalEquipment: List["VisitQueryResponseMedicalEquipment"] = Field(None)
    MedicalEquipmentText: Union[str, None] = Field(None)
    Medications: List["VisitQueryResponseMedication"] = Field(None)
    MedicationsAdministered: List["VisitQueryResponseMedicationsAdministered"] = Field(
        None
    )
    MedicationsAdministeredText: Union[str, None] = Field(None)
    MedicationsText: Union[str, None] = Field(None)
    Meta: "VisitQueryResponseMeta" = Field(...)
    ObjectiveText: Union[str, None] = Field(None)
    PhysicalExamText: Union[str, None] = Field(None)
    PlanOfCare: "VisitQueryResponsePlanOfCare" = Field(None)
    PlanOfCareText: Union[str, None] = Field(None)
    Problems: List["VisitQueryResponseProblem"] = Field(None)
    ProblemsText: Union[str, None] = Field(None)
    Procedures: "VisitQueryResponseProcedures" = Field(None)
    ProceduresText: Union[str, None] = Field(None)
    ReasonForReferralText: Union[str, None] = Field(None)
    ReasonForVisit: List["VisitQueryResponseReasonForVisit"] = Field(None)
    ReasonForVisitText: Union[str, None] = Field(None)
    ResolvedProblems: List["VisitQueryResponseResolvedProblem"] = Field(None)
    ResolvedProblemsText: Union[str, None] = Field(None)
    Results: List["VisitQueryResponseResult"] = Field(None)
    ResultText: Union[str, None] = Field(None)
    ReviewOfSystemsText: Union[str, None] = Field(None)
    SocialHistory: "VisitQueryResponseSocialHistory" = Field(None)
    SocialHistoryText: Union[str, None] = Field(None)
    SubjectiveText: Union[str, None] = Field(None)
    VitalSigns: List["VisitQueryResponseVitalSign"] = Field(None)
    VitalSignsText: Union[str, None] = Field(None)


class VisitQueryResponseAdmissionDiagnosis(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAdmissionDiagnosisAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    IsNegativeIndicator: Union[bool, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)


class VisitQueryResponseAdmissionDiagnosisAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirective(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAdvanceDirectiveAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Custodians: List["VisitQueryResponseAdvanceDirectiveCustodian"] = Field(None)
    EndDate: Union[str, None] = Field(None)
    ExternalReference: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Type: "VisitQueryResponseAdvanceDirectiveType" = Field(None)
    VerifiedBy: List["VisitQueryResponseAdvanceDirectiveVerifiedBy"] = Field(None)


class VisitQueryResponseAdvanceDirectiveAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirectiveCustodian(RedoxAbstractModel):

    Address: "VisitQueryResponseAdvanceDirectiveCustodianAddress" = Field(None)
    Credentials: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirectiveCustodianAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirectiveType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAdvanceDirectiveTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirectiveTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAdvanceDirectiveVerifiedBy(RedoxAbstractModel):

    Credentials: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)


class VisitQueryResponseAllergy(RedoxAbstractModel):

    Comment: Union[str, None] = Field(None)
    Criticality: "VisitQueryResponseAllergyCriticality" = Field(None)
    EndDate: Union[str, None] = Field(None)
    Reaction: List["VisitQueryResponseAllergyReaction"] = Field(None)
    Severity: "VisitQueryResponseAllergySeverity" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: "VisitQueryResponseAllergyStatus" = Field(None)
    Substance: "VisitQueryResponseAllergySubstance" = Field(None)
    Type: "VisitQueryResponseAllergyType" = Field(None)


class VisitQueryResponseAllergyCriticality(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergyReaction(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAllergyReactionAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Severity: "VisitQueryResponseAllergyReactionSeverity" = Field(None)
    Text: Union[str, None] = Field(None)


class VisitQueryResponseAllergyReactionAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergyReactionSeverity(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergySeverity(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergyStatus(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergySubstance(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAllergySubstanceAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergySubstanceAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergyType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseAllergyTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAllergyTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseAssessment(RedoxAbstractModel):

    Diagnoses: List["VisitQueryResponseAssessmentDiagnosis"] = Field(None)


class VisitQueryResponseAssessmentDiagnosis(RedoxAbstractModel):

    Codes: List["VisitQueryResponseAssessmentDiagnosisCode"] = Field(None)
    DateTime: Union[str, None] = Field(None)
    IsNegativeIndicator: Union[bool, None] = Field(None)
    Value: Union[str, None] = Field(None)


class VisitQueryResponseAssessmentDiagnosisCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeDiagnosis(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseDischargeDiagnosisAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    IsNegativeIndicator: Union[bool, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)


class VisitQueryResponseDischargeDiagnosisAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedication(RedoxAbstractModel):

    Dose: "VisitQueryResponseDischargeMedicationDose" = Field(None)
    EndDate: Union[str, None] = Field(None)
    FreeTextSig: Union[str, None] = Field(None)
    Frequency: "VisitQueryResponseDischargeMedicationFrequency" = Field(None)
    Indications: List["VisitQueryResponseDischargeMedicationIndication"] = Field(None)
    IsPRN: Union[bool, None] = Field(None)
    NumberOfRefillsRemaining: Union[Number, None] = Field(None)
    Prescription: Union[bool, None] = Field(None)
    Product: "VisitQueryResponseDischargeMedicationProduct" = Field(None)
    Rate: "VisitQueryResponseDischargeMedicationRate" = Field(None)
    Route: "VisitQueryResponseDischargeMedicationRoute" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    SupplyOrder: "VisitQueryResponseDischargeMedicationSupplyOrder" = Field(None)


class VisitQueryResponseDischargeMedicationDose(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationFrequency(RedoxAbstractModel):

    EventCode: Union[str, None] = Field(None)
    InstitutionSpecified: Union[bool, None] = Field(None)
    Period: Union[str, None] = Field(None)
    PeriodMax: Union[str, None] = Field(None)
    Unit: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationIndication(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseDischargeMedicationIndicationAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationIndicationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationProduct(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseDischargeMedicationProductAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationRate(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationRoute(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseDischargeMedicationRouteAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationRouteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseDischargeMedicationSupplyOrder(RedoxAbstractModel):

    EndDate: Union[str, None] = Field(None)
    NumberOfRefillsRemaining: Union[Number, None] = Field(None)
    Quantity: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseEncounter(RedoxAbstractModel):

    DateTime: Union[str, None] = Field(None)
    Diagnosis: List["VisitQueryResponseEncounterDiagnosis"] = Field(None)
    EndDateTime: Union[str, None] = Field(None)
    Identifiers: List["VisitQueryResponseEncounterIdentifier"] = Field(None)
    Locations: List["VisitQueryResponseEncounterLocation"] = Field(None)
    Providers: List["VisitQueryResponseEncounterProvider"] = Field(None)
    ReasonForVisit: List["VisitQueryResponseEncounterReasonForVisit"] = Field(None)
    Type: "VisitQueryResponseEncounterType" = Field(None)


class VisitQueryResponseEncounterDiagnosis(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseEncounterDiagnosisAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterDiagnosisAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


class VisitQueryResponseEncounterLocation(RedoxAbstractModel):

    Address: "VisitQueryResponseEncounterLocationAddress" = Field(None)
    Name: Union[str, None] = Field(None)
    Type: "VisitQueryResponseEncounterLocationType" = Field(None)


class VisitQueryResponseEncounterLocationAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseEncounterLocationType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseEncounterLocationTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterLocationTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterProvider(RedoxAbstractModel):

    Address: "VisitQueryResponseEncounterProviderAddress" = Field(None)
    Credentials: List[str] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    Location: "VisitQueryResponseEncounterProviderLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "VisitQueryResponseEncounterProviderPhoneNumber" = Field(None)
    Role: "VisitQueryResponseEncounterProviderRole" = Field(None)


class VisitQueryResponseEncounterProviderAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseEncounterProviderLocation(RedoxAbstractModel):

    Department: Union[str, None] = Field(None)
    Facility: Union[str, None] = Field(None)
    Room: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseEncounterProviderPhoneNumber(RedoxAbstractModel):

    Office: Union[str, None] = Field(None)


class VisitQueryResponseEncounterProviderRole(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseEncounterProviderRoleAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterProviderRoleAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterReasonForVisit(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseEncounterReasonForVisitAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterReasonForVisitAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseEncounterTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseEncounterTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFamilyHistory(RedoxAbstractModel):

    Problems: List["VisitQueryResponseFamilyHistoryProblem"] = Field(None)
    Relation: "VisitQueryResponseFamilyHistoryRelation" = Field(None)


class VisitQueryResponseFamilyHistoryProblem(RedoxAbstractModel):

    AgeAtOnset: Union[str, None] = Field(None)
    AltCodes: List["VisitQueryResponseFamilyHistoryProblemAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    IsCauseOfDeath: Union[bool, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Type: "VisitQueryResponseFamilyHistoryProblemType" = Field(None)


class VisitQueryResponseFamilyHistoryProblemAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFamilyHistoryProblemType(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFamilyHistoryRelation(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Demographics: "VisitQueryResponseFamilyHistoryRelationDemographics" = Field(None)
    IsDeceased: Union[bool, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFamilyHistoryRelationDemographics(RedoxAbstractModel):

    DOB: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatus(RedoxAbstractModel):

    Observations: List["VisitQueryResponseFunctionalStatusObservation"] = Field(None)
    Supplies: List["VisitQueryResponseFunctionalStatusSupply"] = Field(None)


class VisitQueryResponseFunctionalStatusObservation(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseFunctionalStatusObservationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodedValue: "VisitQueryResponseFunctionalStatusObservationCodedValue" = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    ReferenceRange: "VisitQueryResponseFunctionalStatusObservationReferenceRange" = (
        Field(None)
    )
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusObservationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusObservationCodedValue(RedoxAbstractModel):

    AltCodes: List[
        "VisitQueryResponseFunctionalStatusObservationCodedValueAltCode"
    ] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusObservationCodedValueAltCode(
    RedoxAbstractModel
):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusObservationReferenceRange(RedoxAbstractModel):

    High: Union[Number, None] = Field(None)
    Low: Union[Number, None] = Field(None)
    Text: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusSupply(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseFunctionalStatusSupplyAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponseFunctionalStatusSupplyAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoal(RedoxAbstractModel):

    AchievementStatus: "VisitQueryResponseGoalAchievementStatus" = Field(None)
    AltCodes: List["VisitQueryResponseGoalAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodedValue: "VisitQueryResponseGoalCodedValue" = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    Milestones: List["VisitQueryResponseGoalMilestone"] = Field(None)
    Name: Union[str, None] = Field(None)
    Priority: "VisitQueryResponseGoalPriority" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)


class VisitQueryResponseGoalAchievementStatus(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalCodedValue(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseGoalCodedValueAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalCodedValueAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestone(RedoxAbstractModel):

    AchievementStatus: "VisitQueryResponseGoalMilestoneAchievementStatus" = Field(None)
    AltCodes: List["VisitQueryResponseGoalMilestoneAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodedValue: "VisitQueryResponseGoalMilestoneCodedValue" = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Priority: "VisitQueryResponseGoalMilestonePriority" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestoneAchievementStatus(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestoneAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestoneCodedValue(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseGoalMilestoneCodedValueAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestoneCodedValueAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalMilestonePriority(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseGoalPriority(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeader(RedoxAbstractModel):

    Document: "VisitQueryResponseHeaderDocument" = Field(None)
    Patient: "VisitQueryResponseHeaderPatient" = Field(None)
    PCP: "VisitQueryResponseHeaderPCP" = Field(None)


class VisitQueryResponseHeaderDocument(RedoxAbstractModel):

    Author: "VisitQueryResponseHeaderDocumentAuthor" = Field(None)
    Custodian: "VisitQueryResponseHeaderDocumentCustodian" = Field(None)
    DateTime: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    Locale: Union[str, None] = Field(None)
    Title: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)
    TypeCode: "VisitQueryResponseHeaderDocumentTypeCode" = Field(None)
    Visit: "VisitQueryResponseHeaderDocumentVisit" = Field(None)


class VisitQueryResponseHeaderDocumentAuthor(RedoxAbstractModel):

    Address: "VisitQueryResponseHeaderDocumentAuthorAddress" = Field(None)
    Credentials: List[str] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    Location: "VisitQueryResponseHeaderDocumentAuthorLocation" = Field(None)
    PhoneNumber: "VisitQueryResponseHeaderDocumentAuthorPhoneNumber" = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentAuthorAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentAuthorLocation(RedoxAbstractModel):

    Department: Union[str, None] = Field(None)
    Facility: Union[str, None] = Field(None)
    Room: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentAuthorPhoneNumber(RedoxAbstractModel):

    Office: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentCustodian(RedoxAbstractModel):

    Address: "VisitQueryResponseHeaderDocumentCustodianAddress" = Field(None)
    Identifiers: List["VisitQueryResponseHeaderDocumentCustodianIdentifier"] = Field(
        None
    )
    Name: Union[None] = Field(None)
    Telecom: List["VisitQueryResponseHeaderDocumentCustodianTelecom"] = Field(None)
    Type: "VisitQueryResponseHeaderDocumentCustodianType" = Field(None)


class VisitQueryResponseHeaderDocumentCustodianAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentCustodianIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentCustodianTelecom(RedoxAbstractModel):

    System: Union[None] = Field(None)
    Use: Union[None] = Field(None)
    Value: Union[None] = Field(None)


class VisitQueryResponseHeaderDocumentCustodianType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseHeaderDocumentCustodianTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentCustodianTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentTypeCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentVisit(RedoxAbstractModel):

    EndDateTime: Union[str, None] = Field(None)
    Location: "VisitQueryResponseHeaderDocumentVisitLocation" = Field(None)
    Reason: Union[str, None] = Field(None)
    StartDateTime: Union[str, None] = Field(None)
    Type: "VisitQueryResponseHeaderDocumentVisitType" = Field(None)
    VisitNumber: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentVisitLocation(RedoxAbstractModel):

    Department: Union[str, None] = Field(None)
    Facility: Union[str, None] = Field(None)
    Room: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentVisitType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseHeaderDocumentVisitTypeAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderDocumentVisitTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatient(RedoxAbstractModel):

    Demographics: "VisitQueryResponseHeaderPatientDemographics" = Field(None)
    Identifiers: List["VisitQueryResponseHeaderPatientIdentifier"] = Field(None)
    Organization: "VisitQueryResponseHeaderPatientOrganization" = Field(None)


class VisitQueryResponseHeaderPatientDemographics(RedoxAbstractModel):

    Address: "VisitQueryResponseHeaderPatientDemographicsAddress" = Field(None)
    DeathDateTime: Union[str, None] = Field(None)
    DOB: Union[str, None] = Field(None)
    EmailAddresses: List[
        "VisitQueryResponseHeaderPatientDemographicsEmailAddress"
    ] = Field(None)
    EthnicGroupCodes: List[
        "VisitQueryResponseHeaderPatientDemographicsEthnicGroupCode"
    ] = Field(None)
    Ethnicity: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    IsDeceased: Union[bool, None] = Field(None)
    Language: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    MaritalStatus: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    PhoneNumber: "VisitQueryResponseHeaderPatientDemographicsPhoneNumber" = Field(None)
    Race: Union[str, None] = Field(None)
    RaceCodes: List["VisitQueryResponseHeaderPatientDemographicsRaceCode"] = Field(None)
    Religion: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)
    SSN: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientDemographicsAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientDemographicsEmailAddress(RedoxAbstractModel):

    Address: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientDemographicsEthnicGroupCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientDemographicsPhoneNumber(RedoxAbstractModel):

    Home: Union[str, None] = Field(None)
    Mobile: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientDemographicsRaceCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientOrganization(RedoxAbstractModel):

    Address: "VisitQueryResponseHeaderPatientOrganizationAddress" = Field(None)
    Identifiers: List["VisitQueryResponseHeaderPatientOrganizationIdentifier"] = Field(
        None
    )
    Name: Union[None] = Field(None)
    Telecom: List["VisitQueryResponseHeaderPatientOrganizationTelecom"] = Field(None)
    Type: "VisitQueryResponseHeaderPatientOrganizationType" = Field(None)


class VisitQueryResponseHeaderPatientOrganizationAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientOrganizationIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientOrganizationTelecom(RedoxAbstractModel):

    System: Union[None] = Field(None)
    Use: Union[None] = Field(None)
    Value: Union[None] = Field(None)


class VisitQueryResponseHeaderPatientOrganizationType(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseHeaderPatientOrganizationTypeAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPatientOrganizationTypeAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPCP(RedoxAbstractModel):

    Address: "VisitQueryResponseHeaderPCPAddress" = Field(None)
    Credentials: List[str] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    Location: "VisitQueryResponseHeaderPCPLocation" = Field(None)
    PhoneNumber: "VisitQueryResponseHeaderPCPPhoneNumber" = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPCPAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPCPLocation(RedoxAbstractModel):

    Department: Union[str, None] = Field(None)
    Facility: Union[str, None] = Field(None)
    Room: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseHeaderPCPPhoneNumber(RedoxAbstractModel):

    Office: Union[str, None] = Field(None)


class VisitQueryResponseHealthConcern(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseHealthConcernAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponseHealthConcernAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseImmunization(RedoxAbstractModel):

    DateTime: Union[str, None] = Field(None)
    Dose: "VisitQueryResponseImmunizationDose" = Field(None)
    Product: "VisitQueryResponseImmunizationProduct" = Field(None)
    Route: "VisitQueryResponseImmunizationRoute" = Field(None)


class VisitQueryResponseImmunizationDose(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseImmunizationProduct(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseImmunizationProductAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    LotNumber: Union[str, None] = Field(None)
    Manufacturer: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseImmunizationProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseImmunizationRoute(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseImmunizationRouteAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseImmunizationRouteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseInsurance(RedoxAbstractModel):

    AgreementType: Union[str, None] = Field(None)
    Company: "VisitQueryResponseInsuranceCompany" = Field(None)
    CoverageType: Union[str, None] = Field(None)
    EffectiveDate: Union[str, None] = Field(None)
    ExpirationDate: Union[str, None] = Field(None)
    GroupName: Union[str, None] = Field(None)
    GroupNumber: Union[str, None] = Field(None)
    Insured: "VisitQueryResponseInsuranceInsured" = Field(None)
    MemberNumber: Union[str, None] = Field(None)
    Plan: "VisitQueryResponseInsurancePlan" = Field(None)
    PolicyNumber: Union[str, None] = Field(None)
    Priority: Union[str, None] = Field(None)


class VisitQueryResponseInsuranceCompany(RedoxAbstractModel):

    Address: "VisitQueryResponseInsuranceCompanyAddress" = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    PhoneNumber: Union[str, None] = Field(None)


class VisitQueryResponseInsuranceCompanyAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseInsuranceInsured(RedoxAbstractModel):

    Address: "VisitQueryResponseInsuranceInsuredAddress" = Field(None)
    DOB: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    Identifiers: List["VisitQueryResponseInsuranceInsuredIdentifier"] = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    Relationship: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)
    SSN: Union[str, None] = Field(None)


class VisitQueryResponseInsuranceInsuredAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseInsuranceInsuredIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


class VisitQueryResponseInsurancePlan(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class VisitQueryResponseMedicalEquipment(RedoxAbstractModel):

    Product: "VisitQueryResponseMedicalEquipmentProduct" = Field(None)
    Quantity: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponseMedicalEquipmentProduct(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicalEquipmentProductAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicalEquipmentProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedication(RedoxAbstractModel):

    Dose: "VisitQueryResponseMedicationDose" = Field(None)
    EndDate: Union[str, None] = Field(None)
    FreeTextSig: Union[str, None] = Field(None)
    Frequency: "VisitQueryResponseMedicationFrequency" = Field(None)
    Indications: List["VisitQueryResponseMedicationIndication"] = Field(None)
    IsPRN: Union[bool, None] = Field(None)
    NumberOfRefillsRemaining: Union[Number, None] = Field(None)
    Prescription: Union[bool, None] = Field(None)
    Product: "VisitQueryResponseMedicationProduct" = Field(None)
    Rate: "VisitQueryResponseMedicationRate" = Field(None)
    Route: "VisitQueryResponseMedicationRoute" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    SupplyOrder: "VisitQueryResponseMedicationSupplyOrder" = Field(None)


class VisitQueryResponseMedicationDose(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseMedicationFrequency(RedoxAbstractModel):

    EventCode: Union[str, None] = Field(None)
    InstitutionSpecified: Union[bool, None] = Field(None)
    Period: Union[str, None] = Field(None)
    PeriodMax: Union[str, None] = Field(None)
    Unit: Union[str, None] = Field(None)


class VisitQueryResponseMedicationIndication(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicationIndicationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationIndicationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationProduct(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicationProductAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationRate(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseMedicationRoute(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicationRouteAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationRouteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministered(RedoxAbstractModel):

    Dose: "VisitQueryResponseMedicationsAdministeredDose" = Field(None)
    EndDate: Union[str, None] = Field(None)
    Frequency: "VisitQueryResponseMedicationsAdministeredFrequency" = Field(None)
    Product: "VisitQueryResponseMedicationsAdministeredProduct" = Field(None)
    Rate: "VisitQueryResponseMedicationsAdministeredRate" = Field(None)
    ReasonNotGiven: Union[str, None] = Field(None)
    Route: "VisitQueryResponseMedicationsAdministeredRoute" = Field(None)
    StartDate: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredDose(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredFrequency(RedoxAbstractModel):

    Period: Union[str, None] = Field(None)
    Unit: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredProduct(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicationsAdministeredProductAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredRate(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredRoute(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseMedicationsAdministeredRouteAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationsAdministeredRouteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMedicationSupplyOrder(RedoxAbstractModel):

    EndDate: Union[str, None] = Field(None)
    NumberOfRefillsRemaining: Union[Number, None] = Field(None)
    Quantity: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponseMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["VisitQueryResponseMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["VisitQueryResponseMetaLog"] = Field(None)
    Message: "VisitQueryResponseMetaMessage" = Field(None)
    Source: "VisitQueryResponseMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "VisitQueryResponseMetaTransmission" = Field(None)


class VisitQueryResponseMetaDestination(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMetaLog(RedoxAbstractModel):

    AttemptID: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)


class VisitQueryResponseMetaMessage(RedoxAbstractModel):

    ID: Union[Number, None] = Field(None)


class VisitQueryResponseMetaSource(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseMetaTransmission(RedoxAbstractModel):

    ID: Union[Number, None] = Field(None)


class VisitQueryResponsePlanOfCare(RedoxAbstractModel):

    Encounters: List["VisitQueryResponsePlanOfCareEncounter"] = Field(None)
    MedicationAdministration: List[
        "VisitQueryResponsePlanOfCareMedicationAdministration"
    ] = Field(None)
    Orders: List["VisitQueryResponsePlanOfCareOrder"] = Field(None)
    Procedures: List["VisitQueryResponsePlanOfCareProcedure"] = Field(None)
    Services: List["VisitQueryResponsePlanOfCareService"] = Field(None)
    Supplies: List["VisitQueryResponsePlanOfCareSupply"] = Field(None)


class VisitQueryResponsePlanOfCareEncounter(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponsePlanOfCareEncounterAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Identifiers: List["VisitQueryResponsePlanOfCareEncounterIdentifier"] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareEncounterAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareEncounterIdentifier(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministration(RedoxAbstractModel):

    Dose: "VisitQueryResponsePlanOfCareMedicationAdministrationDose" = Field(None)
    EndDate: Union[str, None] = Field(None)
    Frequency: "VisitQueryResponsePlanOfCareMedicationAdministrationFrequency" = Field(
        None
    )
    Product: "VisitQueryResponsePlanOfCareMedicationAdministrationProduct" = Field(None)
    Rate: "VisitQueryResponsePlanOfCareMedicationAdministrationRate" = Field(None)
    Route: "VisitQueryResponsePlanOfCareMedicationAdministrationRoute" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationDose(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationFrequency(RedoxAbstractModel):

    Period: Union[str, None] = Field(None)
    Unit: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationProduct(RedoxAbstractModel):

    AltCodes: List[
        "VisitQueryResponsePlanOfCareMedicationAdministrationProductAltCode"
    ] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationProductAltCode(
    RedoxAbstractModel
):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationRate(RedoxAbstractModel):

    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationRoute(RedoxAbstractModel):

    AltCodes: List[
        "VisitQueryResponsePlanOfCareMedicationAdministrationRouteAltCode"
    ] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareMedicationAdministrationRouteAltCode(
    RedoxAbstractModel
):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareOrder(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponsePlanOfCareOrderAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareOrderAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareProcedure(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponsePlanOfCareProcedureAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareProcedureAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareService(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponsePlanOfCareServiceAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareServiceAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareSupply(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponsePlanOfCareSupplyAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponsePlanOfCareSupplyAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblem(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProblemAltCode"] = Field(None)
    Category: "VisitQueryResponseProblemCategory" = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Comment: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    HealthStatus: "VisitQueryResponseProblemHealthStatus" = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: "VisitQueryResponseProblemStatus" = Field(None)


class VisitQueryResponseProblemAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblemCategory(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProblemCategoryAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblemCategoryAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblemHealthStatus(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProblemHealthStatusAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblemHealthStatusAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProblemStatus(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProcedures(RedoxAbstractModel):

    Observations: List["VisitQueryResponseProceduresObservation"] = Field(None)
    Procedures: List["VisitQueryResponseProceduresProcedure"] = Field(None)
    Services: List["VisitQueryResponseProceduresService"] = Field(None)


class VisitQueryResponseProceduresObservation(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProceduresObservationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    TargetSite: "VisitQueryResponseProceduresObservationTargetSite" = Field(None)


class VisitQueryResponseProceduresObservationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresObservationTargetSite(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProceduresObservationTargetSiteAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresObservationTargetSiteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresProcedure(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProceduresProcedureAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    TargetSite: "VisitQueryResponseProceduresProcedureTargetSite" = Field(None)


class VisitQueryResponseProceduresProcedureAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresProcedureTargetSite(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProceduresProcedureTargetSiteAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresProcedureTargetSiteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseProceduresService(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseProceduresServiceAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponseProceduresServiceAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseReasonForVisit(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseReasonForVisitAltCode"] = Field(None)
    Category: "VisitQueryResponseReasonForVisitCategory" = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseReasonForVisitAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseReasonForVisitCategory(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseReasonForVisitCategoryAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseReasonForVisitCategoryAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResolvedProblem(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseResolvedProblemAltCode"] = Field(None)
    Category: "VisitQueryResponseResolvedProblemCategory" = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Comment: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: "VisitQueryResponseResolvedProblemStatus" = Field(None)


class VisitQueryResponseResolvedProblemAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResolvedProblemCategory(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseResolvedProblemCategoryAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResolvedProblemCategoryAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResolvedProblemStatus(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResult(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseResultAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Observations: List["VisitQueryResponseResultObservation"] = Field(None)
    Producer: "VisitQueryResponseResultProducer" = Field(None)
    Status: Union[str, None] = Field(None)


class VisitQueryResponseResultAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResultObservation(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseResultObservationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodedValue: "VisitQueryResponseResultObservationCodedValue" = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Interpretation: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    ReferenceRange: "VisitQueryResponseResultObservationReferenceRange" = Field(None)
    Status: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)
    ValueType: Union[str, None] = Field(None)


class VisitQueryResponseResultObservationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResultObservationCodedValue(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseResultObservationCodedValueAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResultObservationCodedValueAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResultObservationReferenceRange(RedoxAbstractModel):

    High: Union[str, None] = Field(None)
    Low: Union[str, None] = Field(None)
    Text: Union[str, None] = Field(None)


class VisitQueryResponseResultProducer(RedoxAbstractModel):

    Address: "VisitQueryResponseResultProducerAddress" = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseResultProducerAddress(RedoxAbstractModel):

    City: Union[str, None] = Field(None)
    Country: Union[str, None] = Field(None)
    County: Union[str, None] = Field(None)
    State: Union[str, None] = Field(None)
    StreetAddress: Union[str, None] = Field(None)
    ZIP: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistory(RedoxAbstractModel):

    Observations: List["VisitQueryResponseSocialHistoryObservation"] = Field(None)
    Pregnancy: List["VisitQueryResponseSocialHistoryPregnancy"] = Field(None)
    TobaccoUse: List["VisitQueryResponseSocialHistoryTobaccoUse"] = Field(None)


class VisitQueryResponseSocialHistoryObservation(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseSocialHistoryObservationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)
    Value: "VisitQueryResponseSocialHistoryObservationValue" = Field(None)
    ValueText: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryObservationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryObservationValue(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseSocialHistoryObservationValueAltCode"] = Field(
        None
    )
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryObservationValueAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryPregnancy(RedoxAbstractModel):

    EndDate: Union[str, None] = Field(None)
    EstimatedDelivery: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryTobaccoUse(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseSocialHistoryTobaccoUseAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    EndDate: Union[str, None] = Field(None)
    IsSmokingStatus: Union[bool, None] = Field(None)
    Name: Union[str, None] = Field(None)
    StartDate: Union[str, None] = Field(None)


class VisitQueryResponseSocialHistoryTobaccoUseAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class VisitQueryResponseVitalSign(RedoxAbstractModel):

    DateTime: Union[str, None] = Field(None)
    Observations: List["VisitQueryResponseVitalSignObservation"] = Field(None)


class VisitQueryResponseVitalSignObservation(RedoxAbstractModel):

    AltCodes: List["VisitQueryResponseVitalSignObservationAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Interpretation: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)


class VisitQueryResponseVitalSignObservationAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


VisitQueryResponse.update_forward_refs()
VisitQueryResponseAdmissionDiagnosis.update_forward_refs()
VisitQueryResponseAdvanceDirective.update_forward_refs()
VisitQueryResponseAdvanceDirectiveCustodian.update_forward_refs()
VisitQueryResponseAdvanceDirectiveType.update_forward_refs()
VisitQueryResponseAllergy.update_forward_refs()
VisitQueryResponseAllergyReaction.update_forward_refs()
VisitQueryResponseAllergySubstance.update_forward_refs()
VisitQueryResponseAllergyType.update_forward_refs()
VisitQueryResponseAssessment.update_forward_refs()
VisitQueryResponseAssessmentDiagnosis.update_forward_refs()
VisitQueryResponseDischargeDiagnosis.update_forward_refs()
VisitQueryResponseDischargeMedication.update_forward_refs()
VisitQueryResponseDischargeMedicationIndication.update_forward_refs()
VisitQueryResponseDischargeMedicationProduct.update_forward_refs()
VisitQueryResponseDischargeMedicationRoute.update_forward_refs()
VisitQueryResponseEncounter.update_forward_refs()
VisitQueryResponseEncounterDiagnosis.update_forward_refs()
VisitQueryResponseEncounterLocation.update_forward_refs()
VisitQueryResponseEncounterLocationType.update_forward_refs()
VisitQueryResponseEncounterProvider.update_forward_refs()
VisitQueryResponseEncounterProviderRole.update_forward_refs()
VisitQueryResponseEncounterReasonForVisit.update_forward_refs()
VisitQueryResponseEncounterType.update_forward_refs()
VisitQueryResponseFamilyHistory.update_forward_refs()
VisitQueryResponseFamilyHistoryProblem.update_forward_refs()
VisitQueryResponseFamilyHistoryRelation.update_forward_refs()
VisitQueryResponseFunctionalStatus.update_forward_refs()
VisitQueryResponseFunctionalStatusObservation.update_forward_refs()
VisitQueryResponseFunctionalStatusObservationCodedValue.update_forward_refs()
VisitQueryResponseFunctionalStatusSupply.update_forward_refs()
VisitQueryResponseGoal.update_forward_refs()
VisitQueryResponseGoalCodedValue.update_forward_refs()
VisitQueryResponseGoalMilestone.update_forward_refs()
VisitQueryResponseGoalMilestoneCodedValue.update_forward_refs()
VisitQueryResponseHeader.update_forward_refs()
VisitQueryResponseHeaderDocument.update_forward_refs()
VisitQueryResponseHeaderDocumentAuthor.update_forward_refs()
VisitQueryResponseHeaderDocumentCustodian.update_forward_refs()
VisitQueryResponseHeaderDocumentCustodianType.update_forward_refs()
VisitQueryResponseHeaderDocumentVisit.update_forward_refs()
VisitQueryResponseHeaderDocumentVisitType.update_forward_refs()
VisitQueryResponseHeaderPatient.update_forward_refs()
VisitQueryResponseHeaderPatientDemographics.update_forward_refs()
VisitQueryResponseHeaderPatientOrganization.update_forward_refs()
VisitQueryResponseHeaderPatientOrganizationType.update_forward_refs()
VisitQueryResponseHeaderPCP.update_forward_refs()
VisitQueryResponseHealthConcern.update_forward_refs()
VisitQueryResponseImmunization.update_forward_refs()
VisitQueryResponseImmunizationProduct.update_forward_refs()
VisitQueryResponseImmunizationRoute.update_forward_refs()
VisitQueryResponseInsurance.update_forward_refs()
VisitQueryResponseInsuranceCompany.update_forward_refs()
VisitQueryResponseInsuranceInsured.update_forward_refs()
VisitQueryResponseMedicalEquipment.update_forward_refs()
VisitQueryResponseMedicalEquipmentProduct.update_forward_refs()
VisitQueryResponseMedication.update_forward_refs()
VisitQueryResponseMedicationIndication.update_forward_refs()
VisitQueryResponseMedicationProduct.update_forward_refs()
VisitQueryResponseMedicationRoute.update_forward_refs()
VisitQueryResponseMedicationsAdministered.update_forward_refs()
VisitQueryResponseMedicationsAdministeredProduct.update_forward_refs()
VisitQueryResponseMedicationsAdministeredRoute.update_forward_refs()
VisitQueryResponseMeta.update_forward_refs()
VisitQueryResponsePlanOfCare.update_forward_refs()
VisitQueryResponsePlanOfCareEncounter.update_forward_refs()
VisitQueryResponsePlanOfCareMedicationAdministration.update_forward_refs()
VisitQueryResponsePlanOfCareMedicationAdministrationProduct.update_forward_refs()
VisitQueryResponsePlanOfCareMedicationAdministrationRoute.update_forward_refs()
VisitQueryResponsePlanOfCareOrder.update_forward_refs()
VisitQueryResponsePlanOfCareProcedure.update_forward_refs()
VisitQueryResponsePlanOfCareService.update_forward_refs()
VisitQueryResponsePlanOfCareSupply.update_forward_refs()
VisitQueryResponseProblem.update_forward_refs()
VisitQueryResponseProblemCategory.update_forward_refs()
VisitQueryResponseProblemHealthStatus.update_forward_refs()
VisitQueryResponseProcedures.update_forward_refs()
VisitQueryResponseProceduresObservation.update_forward_refs()
VisitQueryResponseProceduresObservationTargetSite.update_forward_refs()
VisitQueryResponseProceduresProcedure.update_forward_refs()
VisitQueryResponseProceduresProcedureTargetSite.update_forward_refs()
VisitQueryResponseProceduresService.update_forward_refs()
VisitQueryResponseReasonForVisit.update_forward_refs()
VisitQueryResponseReasonForVisitCategory.update_forward_refs()
VisitQueryResponseResolvedProblem.update_forward_refs()
VisitQueryResponseResolvedProblemCategory.update_forward_refs()
VisitQueryResponseResult.update_forward_refs()
VisitQueryResponseResultObservation.update_forward_refs()
VisitQueryResponseResultObservationCodedValue.update_forward_refs()
VisitQueryResponseResultProducer.update_forward_refs()
VisitQueryResponseSocialHistory.update_forward_refs()
VisitQueryResponseSocialHistoryObservation.update_forward_refs()
VisitQueryResponseSocialHistoryObservationValue.update_forward_refs()
VisitQueryResponseSocialHistoryTobaccoUse.update_forward_refs()
VisitQueryResponseVitalSign.update_forward_refs()
VisitQueryResponseVitalSignObservation.update_forward_refs()
