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

    Meta: "ReplaceMeta" = Field(...)
    Note: "ReplaceNote" = Field(...)
    Orders: List["ReplaceOrder"] = Field(None)
    Patient: "ReplacePatient" = Field(...)
    Visit: "ReplaceVisit" = Field(None)


class ReplaceMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["ReplaceMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["ReplaceMetaLog"] = Field(None)
    Message: "ReplaceMetaMessage" = Field(None)
    Source: "ReplaceMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "ReplaceMetaTransmission" = Field(None)


class ReplaceMetaDestination(RedoxAbstractModel):

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


class ReplaceMetaLog(RedoxAbstractModel):

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


class ReplaceMetaMessage(RedoxAbstractModel):

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


class ReplaceMetaSource(RedoxAbstractModel):

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


class ReplaceMetaTransmission(RedoxAbstractModel):

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


class ReplaceNote(RedoxAbstractModel):

    Authenticator: "ReplaceNoteAuthenticator" = Field(None)
    Availability: Union[str, None] = Field(None)
    Components: List["ReplaceNoteComponent"] = Field(None)
    ContentType: str = Field(...)
    DocumentationDateTime: Union[str, None] = Field(None)
    DocumentDescription: Union[str, None] = Field(None)
    DocumentID: str = Field(...)
    DocumentType: str = Field(...)
    FileContents: Union[str, None] = Field(None)
    FileName: Union[str, None] = Field(None)
    FileType: Union[str, None] = Field(None)
    Notifications: List["ReplaceNoteNotification"] = Field(None)
    OriginalDocumentID: str = Field(...)
    Provider: "ReplaceNoteProvider" = Field(...)
    ServiceDateTime: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class ReplaceNoteAuthenticator(RedoxAbstractModel):

    Address: "ReplaceNoteAuthenticatorAddress" = 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: "ReplaceNoteAuthenticatorLocation" = Field(None)
    PhoneNumber: "ReplaceNoteAuthenticatorPhoneNumber" = Field(None)


class ReplaceNoteAuthenticatorAddress(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 ReplaceNoteAuthenticatorLocation(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 ReplaceNoteAuthenticatorPhoneNumber(RedoxAbstractModel):

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


class ReplaceNoteComponent(RedoxAbstractModel):

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


class ReplaceNoteNotification(RedoxAbstractModel):

    Address: "ReplaceNoteNotificationAddress" = 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: "ReplaceNoteNotificationLocation" = Field(None)
    PhoneNumber: "ReplaceNoteNotificationPhoneNumber" = Field(None)


class ReplaceNoteNotificationAddress(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 ReplaceNoteNotificationLocation(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 ReplaceNoteNotificationPhoneNumber(RedoxAbstractModel):

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


class ReplaceNoteProvider(RedoxAbstractModel):

    Address: "ReplaceNoteProviderAddress" = Field(None)
    Credentials: List[str] = Field(None)
    EmailAddresses: List[str] = Field(None)
    FirstName: Union[str, None] = Field(None)
    ID: str = Field(...)
    IDType: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    Location: "ReplaceNoteProviderLocation" = Field(None)
    PhoneNumber: "ReplaceNoteProviderPhoneNumber" = Field(None)


class ReplaceNoteProviderAddress(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 ReplaceNoteProviderLocation(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 ReplaceNoteProviderPhoneNumber(RedoxAbstractModel):

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


class ReplaceOrder(RedoxAbstractModel):

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


class ReplacePatient(RedoxAbstractModel):

    Demographics: "ReplacePatientDemographics" = Field(None)
    Identifiers: List["ReplacePatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)


class ReplacePatientDemographics(RedoxAbstractModel):

    Address: "ReplacePatientDemographicsAddress" = 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: "ReplacePatientDemographicsPhoneNumber" = 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 ReplacePatientDemographicsAddress(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 ReplacePatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class ReplacePatientIdentifier(RedoxAbstractModel):

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


class ReplaceVisit(RedoxAbstractModel):

    AccountNumber: Union[str, None] = Field(None)
    AdditionalStaff: List["ReplaceVisitAdditionalStaff"] = Field(None)
    Location: "ReplaceVisitLocation" = Field(None)
    PatientClass: Union[str, None] = Field(None)
    VisitDateTime: Union[str, None] = Field(None)
    VisitNumber: Union[str, None] = Field(None)


class ReplaceVisitAdditionalStaff(RedoxAbstractModel):

    Address: "ReplaceVisitAdditionalStaffAddress" = 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: "ReplaceVisitAdditionalStaffLocation" = Field(None)
    PhoneNumber: "ReplaceVisitAdditionalStaffPhoneNumber" = Field(None)
    Role: "ReplaceVisitAdditionalStaffRole" = Field(None)


class ReplaceVisitAdditionalStaffAddress(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 ReplaceVisitAdditionalStaffLocation(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 ReplaceVisitAdditionalStaffPhoneNumber(RedoxAbstractModel):

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


class ReplaceVisitAdditionalStaffRole(RedoxAbstractModel):

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


class ReplaceVisitLocation(RedoxAbstractModel):

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


Replace.update_forward_refs()
ReplaceMeta.update_forward_refs()
ReplaceNote.update_forward_refs()
ReplaceNoteAuthenticator.update_forward_refs()
ReplaceNoteNotification.update_forward_refs()
ReplaceNoteProvider.update_forward_refs()
ReplacePatient.update_forward_refs()
ReplacePatientDemographics.update_forward_refs()
ReplaceVisit.update_forward_refs()
ReplaceVisitAdditionalStaff.update_forward_refs()
