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

    Meta: "VisitMergeMeta" = Field(...)
    Patient: "VisitMergePatient" = Field(...)
    Visit: "VisitMergeVisit" = Field(...)


class VisitMergeMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["VisitMergeMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["VisitMergeMetaLog"] = Field(None)
    Message: "VisitMergeMetaMessage" = Field(None)
    Source: "VisitMergeMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "VisitMergeMetaTransmission" = Field(None)


class VisitMergeMetaDestination(RedoxAbstractModel):

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


class VisitMergeMetaLog(RedoxAbstractModel):

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


class VisitMergeMetaMessage(RedoxAbstractModel):

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


class VisitMergeMetaSource(RedoxAbstractModel):

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


class VisitMergeMetaTransmission(RedoxAbstractModel):

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


class VisitMergePatient(RedoxAbstractModel):

    Demographics: "VisitMergePatientDemographics" = Field(None)
    Identifiers: List["VisitMergePatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)
    PreviousIdentifiers: List["VisitMergePatientPreviousIdentifier"] = Field(None)


class VisitMergePatientDemographics(RedoxAbstractModel):

    Address: "VisitMergePatientDemographicsAddress" = 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: "VisitMergePatientDemographicsPhoneNumber" = 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 VisitMergePatientDemographicsAddress(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 VisitMergePatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class VisitMergePatientIdentifier(RedoxAbstractModel):

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


class VisitMergePatientPreviousIdentifier(RedoxAbstractModel):

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


class VisitMergeVisit(RedoxAbstractModel):

    VisitNumber: str = Field(...)


VisitMerge.update_forward_refs()
VisitMergeMeta.update_forward_refs()
VisitMergePatient.update_forward_refs()
VisitMergePatientDemographics.update_forward_refs()
