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

    Meta: "PatientMergeMeta" = Field(...)
    Patient: "PatientMergePatient" = Field(...)


class PatientMergeMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["PatientMergeMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["PatientMergeMetaLog"] = Field(None)
    Message: "PatientMergeMetaMessage" = Field(None)
    Source: "PatientMergeMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "PatientMergeMetaTransmission" = Field(None)


class PatientMergeMetaDestination(RedoxAbstractModel):

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


class PatientMergeMetaLog(RedoxAbstractModel):

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


class PatientMergeMetaMessage(RedoxAbstractModel):

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


class PatientMergeMetaSource(RedoxAbstractModel):

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


class PatientMergeMetaTransmission(RedoxAbstractModel):

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


class PatientMergePatient(RedoxAbstractModel):

    Demographics: "PatientMergePatientDemographics" = Field(None)
    Identifiers: List["PatientMergePatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)
    PreviousIdentifiers: List["PatientMergePatientPreviousIdentifier"] = Field(...)


class PatientMergePatientDemographics(RedoxAbstractModel):

    Address: "PatientMergePatientDemographicsAddress" = 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: "PatientMergePatientDemographicsPhoneNumber" = 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 PatientMergePatientDemographicsAddress(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 PatientMergePatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class PatientMergePatientIdentifier(RedoxAbstractModel):

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


class PatientMergePatientPreviousIdentifier(RedoxAbstractModel):

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


PatientMerge.update_forward_refs()
PatientMergeMeta.update_forward_refs()
PatientMergePatient.update_forward_refs()
PatientMergePatientDemographics.update_forward_refs()
