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

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


class ReplaceMedia(RedoxAbstractModel):

    Authenticated: Union[str, None] = Field(None)
    Authenticator: "ReplaceMediaAuthenticator" = Field(None)
    Availability: str = Field(...)
    CreationDateTime: Union[str, None] = Field(None)
    DirectAddressFrom: Union[str, None] = Field(None)
    DirectAddressTo: Union[str, None] = Field(None)
    DocumentDescription: Union[str, None] = Field(None)
    DocumentID: str = Field(...)
    DocumentType: str = Field(...)
    FileContents: str = Field(...)
    FileName: str = Field(...)
    FileType: str = Field(...)
    Notifications: List["ReplaceMediaNotification"] = Field(None)
    OriginalDocumentID: str = Field(...)
    Provider: "ReplaceMediaProvider" = Field(...)
    ServiceDateTime: Union[str, None] = Field(None)


class ReplaceMediaAuthenticator(RedoxAbstractModel):

    Address: "ReplaceMediaAuthenticatorAddress" = 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: "ReplaceMediaAuthenticatorLocation" = Field(None)
    PhoneNumber: "ReplaceMediaAuthenticatorPhoneNumber" = Field(None)


class ReplaceMediaAuthenticatorAddress(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 ReplaceMediaAuthenticatorLocation(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 ReplaceMediaAuthenticatorPhoneNumber(RedoxAbstractModel):

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


class ReplaceMediaNotification(RedoxAbstractModel):

    Address: "ReplaceMediaNotificationAddress" = 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: "ReplaceMediaNotificationLocation" = Field(None)
    PhoneNumber: "ReplaceMediaNotificationPhoneNumber" = Field(None)


class ReplaceMediaNotificationAddress(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 ReplaceMediaNotificationLocation(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 ReplaceMediaNotificationPhoneNumber(RedoxAbstractModel):

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


class ReplaceMediaProvider(RedoxAbstractModel):

    Address: "ReplaceMediaProviderAddress" = 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: "ReplaceMediaProviderLocation" = Field(None)
    PhoneNumber: "ReplaceMediaProviderPhoneNumber" = Field(None)


class ReplaceMediaProviderAddress(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 ReplaceMediaProviderLocation(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 ReplaceMediaProviderPhoneNumber(RedoxAbstractModel):

    Office: Union[str, None] = 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 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)
    Location: "ReplaceVisitLocation" = Field(None)
    VisitNumber: 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()
ReplaceMedia.update_forward_refs()
ReplaceMediaAuthenticator.update_forward_refs()
ReplaceMediaNotification.update_forward_refs()
ReplaceMediaProvider.update_forward_refs()
ReplaceMeta.update_forward_refs()
ReplacePatient.update_forward_refs()
ReplacePatientDemographics.update_forward_refs()
ReplaceVisit.update_forward_refs()
