# -*- 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 PatientQueryResponse(EventTypeAbstractModel):

    Meta: "PatientQueryResponseMeta" = Field(...)
    Patient: "PatientQueryResponsePatient" = Field(None)
    PotentialMatches: List["PatientQueryResponsePotentialMatch"] = Field(None)


class PatientQueryResponseMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["PatientQueryResponseMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["PatientQueryResponseMetaLog"] = Field(None)
    Message: "PatientQueryResponseMetaMessage" = Field(None)
    Source: "PatientQueryResponseMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "PatientQueryResponseMetaTransmission" = Field(None)


class PatientQueryResponseMetaDestination(RedoxAbstractModel):

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


class PatientQueryResponseMetaLog(RedoxAbstractModel):

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


class PatientQueryResponseMetaMessage(RedoxAbstractModel):

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


class PatientQueryResponseMetaSource(RedoxAbstractModel):

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


class PatientQueryResponseMetaTransmission(RedoxAbstractModel):

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


class PatientQueryResponsePatient(RedoxAbstractModel):

    Contacts: List["PatientQueryResponsePatientContact"] = Field(None)
    Demographics: "PatientQueryResponsePatientDemographics" = Field(None)
    Identifiers: List["PatientQueryResponsePatientIdentifier"] = Field(None)
    Notes: List[str] = Field(None)
    PCP: "PatientQueryResponsePatientPCP" = Field(None)
    Vaccinations: List["PatientQueryResponsePatientVaccination"] = Field(None)


class PatientQueryResponsePatientContact(RedoxAbstractModel):

    Address: "PatientQueryResponsePatientContactAddress" = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    PhoneNumber: "PatientQueryResponsePatientContactPhoneNumber" = Field(None)
    RelationToPatient: Union[str, None] = Field(None)
    Roles: List[str] = Field(None)


class PatientQueryResponsePatientContactAddress(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 PatientQueryResponsePatientContactPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePatientDemographics(RedoxAbstractModel):

    Address: "PatientQueryResponsePatientDemographicsAddress" = Field(None)
    Citizenship: List[str] = Field(None)
    DeathDateTime: Union[str, None] = Field(None)
    DOB: Union[str, None] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    IsDeceased: Union[bool, None] = Field(None)
    IsHispanic: 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: "PatientQueryResponsePatientDemographicsPhoneNumber" = Field(None)
    Race: Union[str, None] = Field(None)
    Religion: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)
    SSN: Union[str, None] = Field(None)


class PatientQueryResponsePatientDemographicsAddress(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 PatientQueryResponsePatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePatientIdentifier(RedoxAbstractModel):

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


class PatientQueryResponsePatientPCP(RedoxAbstractModel):

    Address: "PatientQueryResponsePatientPCPAddress" = 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: "PatientQueryResponsePatientPCPLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "PatientQueryResponsePatientPCPPhoneNumber" = Field(None)


class PatientQueryResponsePatientPCPAddress(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 PatientQueryResponsePatientPCPLocation(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 PatientQueryResponsePatientPCPPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePatientVaccination(RedoxAbstractModel):

    ClinicalInfo: List["PatientQueryResponsePatientVaccinationClinicalInfo"] = Field(
        None
    )
    DateTime: Union[str, None] = Field(None)
    Dose: "PatientQueryResponsePatientVaccinationDose" = Field(None)
    Location: "PatientQueryResponsePatientVaccinationLocation" = Field(None)
    Notes: List[str] = Field(None)
    Order: "PatientQueryResponsePatientVaccinationOrder" = Field(None)
    Product: "PatientQueryResponsePatientVaccinationProduct" = Field(None)
    Provider: "PatientQueryResponsePatientVaccinationProvider" = Field(None)
    RefusalReason: Union[str, None] = Field(None)
    Route: "PatientQueryResponsePatientVaccinationRoute" = Field(None)
    Site: "PatientQueryResponsePatientVaccinationSite" = Field(None)


class PatientQueryResponsePatientVaccinationClinicalInfo(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    CompletionDateTime: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    RelatedGroupID: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)
    Value: Union[str, None] = Field(None)
    ValueType: Union[str, None] = Field(None)


class PatientQueryResponsePatientVaccinationDose(RedoxAbstractModel):

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


class PatientQueryResponsePatientVaccinationLocation(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 PatientQueryResponsePatientVaccinationOrder(RedoxAbstractModel):

    EHRID: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    Provider: "PatientQueryResponsePatientVaccinationOrderProvider" = Field(None)


class PatientQueryResponsePatientVaccinationOrderProvider(RedoxAbstractModel):

    Address: "PatientQueryResponsePatientVaccinationOrderProviderAddress" = 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: "PatientQueryResponsePatientVaccinationOrderProviderLocation" = Field(
        None
    )
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "PatientQueryResponsePatientVaccinationOrderProviderPhoneNumber" = (
        Field(None)
    )


class PatientQueryResponsePatientVaccinationOrderProviderAddress(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 PatientQueryResponsePatientVaccinationOrderProviderLocation(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 PatientQueryResponsePatientVaccinationOrderProviderPhoneNumber(
    RedoxAbstractModel
):

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


class PatientQueryResponsePatientVaccinationProduct(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    ExpirationDate: Union[str, None] = Field(None)
    LotNumber: Union[str, None] = Field(None)
    Manufacturer: "PatientQueryResponsePatientVaccinationProductManufacturer" = Field(
        None
    )


class PatientQueryResponsePatientVaccinationProductManufacturer(RedoxAbstractModel):

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


class PatientQueryResponsePatientVaccinationProvider(RedoxAbstractModel):

    Address: "PatientQueryResponsePatientVaccinationProviderAddress" = 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: "PatientQueryResponsePatientVaccinationProviderLocation" = Field(None)
    PhoneNumber: "PatientQueryResponsePatientVaccinationProviderPhoneNumber" = Field(
        None
    )


class PatientQueryResponsePatientVaccinationProviderAddress(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 PatientQueryResponsePatientVaccinationProviderLocation(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 PatientQueryResponsePatientVaccinationProviderPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePatientVaccinationRoute(RedoxAbstractModel):

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


class PatientQueryResponsePatientVaccinationSite(RedoxAbstractModel):

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


class PatientQueryResponsePotentialMatch(RedoxAbstractModel):

    Contacts: List["PatientQueryResponsePotentialMatchContact"] = Field(None)
    Demographics: "PatientQueryResponsePotentialMatchDemographics" = Field(None)
    Identifiers: List["PatientQueryResponsePotentialMatchIdentifier"] = Field(None)
    Notes: List[str] = Field(None)
    PCP: "PatientQueryResponsePotentialMatchPCP" = Field(None)


class PatientQueryResponsePotentialMatchContact(RedoxAbstractModel):

    Address: "PatientQueryResponsePotentialMatchContactAddress" = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    PhoneNumber: "PatientQueryResponsePotentialMatchContactPhoneNumber" = Field(None)
    RelationToPatient: Union[str, None] = Field(None)
    Roles: List[str] = Field(None)


class PatientQueryResponsePotentialMatchContactAddress(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 PatientQueryResponsePotentialMatchContactPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePotentialMatchDemographics(RedoxAbstractModel):

    Address: "PatientQueryResponsePotentialMatchDemographicsAddress" = Field(None)
    Citizenship: List[str] = Field(None)
    DeathDateTime: Union[str, None] = Field(None)
    DOB: Union[str, None] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    IsDeceased: Union[bool, None] = Field(None)
    IsHispanic: 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: "PatientQueryResponsePotentialMatchDemographicsPhoneNumber" = Field(
        None
    )
    Race: Union[str, None] = Field(None)
    Religion: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)
    SSN: Union[str, None] = Field(None)


class PatientQueryResponsePotentialMatchDemographicsAddress(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 PatientQueryResponsePotentialMatchDemographicsPhoneNumber(RedoxAbstractModel):

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


class PatientQueryResponsePotentialMatchIdentifier(RedoxAbstractModel):

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


class PatientQueryResponsePotentialMatchPCP(RedoxAbstractModel):

    Address: "PatientQueryResponsePotentialMatchPCPAddress" = 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: "PatientQueryResponsePotentialMatchPCPLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "PatientQueryResponsePotentialMatchPCPPhoneNumber" = Field(None)


class PatientQueryResponsePotentialMatchPCPAddress(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 PatientQueryResponsePotentialMatchPCPLocation(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 PatientQueryResponsePotentialMatchPCPPhoneNumber(RedoxAbstractModel):

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


PatientQueryResponse.update_forward_refs()
PatientQueryResponseMeta.update_forward_refs()
PatientQueryResponsePatient.update_forward_refs()
PatientQueryResponsePatientContact.update_forward_refs()
PatientQueryResponsePatientDemographics.update_forward_refs()
PatientQueryResponsePatientPCP.update_forward_refs()
PatientQueryResponsePatientVaccination.update_forward_refs()
PatientQueryResponsePatientVaccinationOrder.update_forward_refs()
PatientQueryResponsePatientVaccinationOrderProvider.update_forward_refs()
PatientQueryResponsePatientVaccinationProduct.update_forward_refs()
PatientQueryResponsePatientVaccinationProvider.update_forward_refs()
PatientQueryResponsePotentialMatch.update_forward_refs()
PatientQueryResponsePotentialMatchContact.update_forward_refs()
PatientQueryResponsePotentialMatchDemographics.update_forward_refs()
PatientQueryResponsePotentialMatchPCP.update_forward_refs()
