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

    Meta: "CancelMeta" = Field(...)
    Patient: "CancelPatient" = Field(...)
    Procedures: List["CancelProcedure"] = Field(...)
    SurgeryStaff: List["CancelSurgeryStaff"] = Field(None)
    SurgicalCase: "CancelSurgicalCase" = Field(None)
    SurgicalInfo: List["CancelSurgicalInfo"] = Field(None)
    Visit: "CancelVisit" = Field(...)


class CancelMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["CancelMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["CancelMetaLog"] = Field(None)
    Message: "CancelMetaMessage" = Field(None)
    Source: "CancelMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "CancelMetaTransmission" = Field(None)


class CancelMetaDestination(RedoxAbstractModel):

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


class CancelMetaLog(RedoxAbstractModel):

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


class CancelMetaMessage(RedoxAbstractModel):

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


class CancelMetaSource(RedoxAbstractModel):

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


class CancelMetaTransmission(RedoxAbstractModel):

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


class CancelPatient(RedoxAbstractModel):

    Demographics: "CancelPatientDemographics" = Field(None)
    Identifiers: List["CancelPatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)


class CancelPatientDemographics(RedoxAbstractModel):

    Address: "CancelPatientDemographicsAddress" = 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: "CancelPatientDemographicsPhoneNumber" = 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 CancelPatientDemographicsAddress(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 CancelPatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class CancelPatientIdentifier(RedoxAbstractModel):

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


class CancelProcedure(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    Duration: Number = Field(...)
    ProcedureInfo: List["CancelProcedureProcedureInfo"] = Field(None)


class CancelProcedureProcedureInfo(RedoxAbstractModel):

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


class CancelSurgeryStaff(RedoxAbstractModel):

    Address: "CancelSurgeryStaffAddress" = 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: "CancelSurgeryStaffLocation" = Field(None)
    PhoneNumber: "CancelSurgeryStaffPhoneNumber" = Field(None)
    Role: "CancelSurgeryStaffRole" = Field(None)
    StartDateTime: Union[str, None] = Field(None)


class CancelSurgeryStaffAddress(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 CancelSurgeryStaffLocation(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 CancelSurgeryStaffPhoneNumber(RedoxAbstractModel):

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


class CancelSurgeryStaffRole(RedoxAbstractModel):

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


class CancelSurgicalCase(RedoxAbstractModel):

    Number: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)


class CancelSurgicalInfo(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 CancelVisit(RedoxAbstractModel):

    AccountNumber: Union[str, None] = Field(None)
    AttendingProvider: "CancelVisitAttendingProvider" = Field(None)
    CancelReason: Union[str, None] = Field(None)
    Diagnoses: List["CancelVisitDiagnosis"] = Field(None)
    Duration: Union[Number, None] = Field(None)
    Equipment: List["CancelVisitEquipment"] = Field(None)
    Location: "CancelVisitLocation" = Field(...)
    Notes: List[str] = Field(None)
    PatientClass: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    VisitDateTime: Union[str, None] = Field(None)
    VisitNumber: str = Field(...)


class CancelVisitAttendingProvider(RedoxAbstractModel):

    Address: "CancelVisitAttendingProviderAddress" = 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: "CancelVisitAttendingProviderLocation" = Field(None)
    PhoneNumber: "CancelVisitAttendingProviderPhoneNumber" = Field(None)


class CancelVisitAttendingProviderAddress(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 CancelVisitAttendingProviderLocation(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 CancelVisitAttendingProviderPhoneNumber(RedoxAbstractModel):

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


class CancelVisitDiagnosis(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 CancelVisitEquipment(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 CancelVisitLocation(RedoxAbstractModel):

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


Cancel.update_forward_refs()
CancelMeta.update_forward_refs()
CancelPatient.update_forward_refs()
CancelPatientDemographics.update_forward_refs()
CancelProcedure.update_forward_refs()
CancelSurgeryStaff.update_forward_refs()
CancelVisit.update_forward_refs()
CancelVisitAttendingProvider.update_forward_refs()
