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

    Meta: "BookedResponseMeta" = Field(...)
    Visits: List["BookedResponseVisit"] = Field(...)


class BookedResponseMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["BookedResponseMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    IsIncomplete: Union[bool, None] = Field(None)
    Logs: List["BookedResponseMetaLog"] = Field(None)
    Message: "BookedResponseMetaMessage" = Field(None)
    Source: "BookedResponseMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "BookedResponseMetaTransmission" = Field(None)


class BookedResponseMetaDestination(RedoxAbstractModel):

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


class BookedResponseMetaLog(RedoxAbstractModel):

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


class BookedResponseMetaMessage(RedoxAbstractModel):

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


class BookedResponseMetaSource(RedoxAbstractModel):

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


class BookedResponseMetaTransmission(RedoxAbstractModel):

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


class BookedResponseVisit(RedoxAbstractModel):

    AccountNumber: Union[str, None] = Field(None)
    AdditionalStaff: List["BookedResponseVisitAdditionalStaff"] = Field(None)
    AppointmentInfo: List["BookedResponseVisitAppointmentInfo"] = Field(None)
    AttendingProvider: "BookedResponseVisitAttendingProvider" = Field(None)
    CancelDateTime: Union[str, None] = Field(None)
    CancelReason: Union[str, None] = Field(None)
    ConsultingProvider: "BookedResponseVisitConsultingProvider" = Field(None)
    Diagnoses: List["BookedResponseVisitDiagnosis"] = Field(None)
    Duration: Number = Field(...)
    Equipment: List["BookedResponseVisitEquipment"] = Field(None)
    Instructions: List[str] = Field(None)
    LastUpdated: Union[str, None] = Field(None)
    Location: "BookedResponseVisitLocation" = Field(...)
    Patient: "BookedResponseVisitPatient" = Field(...)
    PatientClass: Union[str, None] = Field(None)
    Reason: Union[str, None] = Field(None)
    ReferringProvider: "BookedResponseVisitReferringProvider" = Field(None)
    ScheduledDateTime: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)
    VisitDateTime: str = Field(...)
    VisitNumber: str = Field(...)
    VisitProvider: "BookedResponseVisitVisitProvider" = Field(None)


class BookedResponseVisitAdditionalStaff(RedoxAbstractModel):

    Address: "BookedResponseVisitAdditionalStaffAddress" = Field(None)
    Credentials: List[str] = Field(None)
    Duration: Union[Number, None] = 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: "BookedResponseVisitAdditionalStaffLocation" = Field(None)
    PhoneNumber: "BookedResponseVisitAdditionalStaffPhoneNumber" = Field(None)
    Role: "BookedResponseVisitAdditionalStaffRole" = Field(None)
    StartDateTime: Union[str, None] = Field(None)


class BookedResponseVisitAdditionalStaffAddress(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 BookedResponseVisitAdditionalStaffLocation(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 BookedResponseVisitAdditionalStaffPhoneNumber(RedoxAbstractModel):

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


class BookedResponseVisitAdditionalStaffRole(RedoxAbstractModel):

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


class BookedResponseVisitAppointmentInfo(RedoxAbstractModel):

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


class BookedResponseVisitAttendingProvider(RedoxAbstractModel):

    Address: "BookedResponseVisitAttendingProviderAddress" = 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: "BookedResponseVisitAttendingProviderLocation" = Field(None)
    PhoneNumber: "BookedResponseVisitAttendingProviderPhoneNumber" = Field(None)


class BookedResponseVisitAttendingProviderAddress(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 BookedResponseVisitAttendingProviderLocation(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 BookedResponseVisitAttendingProviderPhoneNumber(RedoxAbstractModel):

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


class BookedResponseVisitConsultingProvider(RedoxAbstractModel):

    Address: "BookedResponseVisitConsultingProviderAddress" = 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: "BookedResponseVisitConsultingProviderLocation" = Field(None)
    PhoneNumber: "BookedResponseVisitConsultingProviderPhoneNumber" = Field(None)


class BookedResponseVisitConsultingProviderAddress(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 BookedResponseVisitConsultingProviderLocation(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 BookedResponseVisitConsultingProviderPhoneNumber(RedoxAbstractModel):

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


class BookedResponseVisitDiagnosis(RedoxAbstractModel):

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


class BookedResponseVisitEquipment(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    Duration: Union[Number, None] = Field(None)
    StartDateTime: Union[str, None] = Field(None)


class BookedResponseVisitLocation(RedoxAbstractModel):

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


class BookedResponseVisitPatient(RedoxAbstractModel):

    Demographics: "BookedResponseVisitPatientDemographics" = Field(None)
    Identifiers: List["BookedResponseVisitPatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)


class BookedResponseVisitPatientDemographics(RedoxAbstractModel):

    Address: "BookedResponseVisitPatientDemographicsAddress" = 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: "BookedResponseVisitPatientDemographicsPhoneNumber" = 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 BookedResponseVisitPatientDemographicsAddress(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 BookedResponseVisitPatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class BookedResponseVisitPatientIdentifier(RedoxAbstractModel):

    ID: str = Field(...)
    IDType: str = Field(...)


class BookedResponseVisitReferringProvider(RedoxAbstractModel):

    Address: "BookedResponseVisitReferringProviderAddress" = 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: "BookedResponseVisitReferringProviderLocation" = Field(None)
    PhoneNumber: "BookedResponseVisitReferringProviderPhoneNumber" = Field(None)


class BookedResponseVisitReferringProviderAddress(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 BookedResponseVisitReferringProviderLocation(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 BookedResponseVisitReferringProviderPhoneNumber(RedoxAbstractModel):

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


class BookedResponseVisitVisitProvider(RedoxAbstractModel):

    Address: "BookedResponseVisitVisitProviderAddress" = 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: "BookedResponseVisitVisitProviderLocation" = Field(None)
    PhoneNumber: "BookedResponseVisitVisitProviderPhoneNumber" = Field(None)


class BookedResponseVisitVisitProviderAddress(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 BookedResponseVisitVisitProviderLocation(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 BookedResponseVisitVisitProviderPhoneNumber(RedoxAbstractModel):

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


BookedResponse.update_forward_refs()
BookedResponseMeta.update_forward_refs()
BookedResponseVisit.update_forward_refs()
BookedResponseVisitAdditionalStaff.update_forward_refs()
BookedResponseVisitAttendingProvider.update_forward_refs()
BookedResponseVisitConsultingProvider.update_forward_refs()
BookedResponseVisitPatient.update_forward_refs()
BookedResponseVisitPatientDemographics.update_forward_refs()
BookedResponseVisitReferringProvider.update_forward_refs()
BookedResponseVisitVisitProvider.update_forward_refs()
