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

    Education: List["UpdateEducation"] = Field(...)
    Meta: "UpdateMeta" = Field(...)
    Patient: "UpdatePatient" = Field(...)
    Visit: "UpdateVisit" = Field(None)


class UpdateEducation(RedoxAbstractModel):

    ActionDateTime: Union[str, None] = Field(None)
    ActionStatus: Union[str, None] = Field(None)
    Assignments: List["UpdateEducationAssignment"] = Field(None)
    CreatedDateTime: Union[str, None] = Field(None)
    InstanceID: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    Subject: "UpdateEducationSubject" = Field(...)


class UpdateEducationAssignment(RedoxAbstractModel):

    ActionDateTime: Union[str, None] = Field(None)
    ActionStatus: Union[str, None] = Field(None)
    Assignees: List["UpdateEducationAssignmentAssignee"] = Field(None)
    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    CreatedDateTime: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    InstanceID: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    Topic: "UpdateEducationAssignmentTopic" = Field(None)


class UpdateEducationAssignmentAssignee(RedoxAbstractModel):

    ContentType: Union[str, None] = Field(None)
    Learner: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    Readiness: Union[str, None] = Field(None)
    Response: Union[str, None] = Field(None)


class UpdateEducationAssignmentTopic(RedoxAbstractModel):

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


class UpdateEducationSubject(RedoxAbstractModel):

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


class UpdateMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["UpdateMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["UpdateMetaLog"] = Field(None)
    Message: "UpdateMetaMessage" = Field(None)
    Source: "UpdateMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "UpdateMetaTransmission" = Field(None)


class UpdateMetaDestination(RedoxAbstractModel):

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


class UpdateMetaLog(RedoxAbstractModel):

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


class UpdateMetaMessage(RedoxAbstractModel):

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


class UpdateMetaSource(RedoxAbstractModel):

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


class UpdateMetaTransmission(RedoxAbstractModel):

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


class UpdatePatient(RedoxAbstractModel):

    Demographics: "UpdatePatientDemographics" = Field(None)
    Identifiers: List["UpdatePatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)


class UpdatePatientDemographics(RedoxAbstractModel):

    Address: "UpdatePatientDemographicsAddress" = 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: "UpdatePatientDemographicsPhoneNumber" = 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 UpdatePatientDemographicsAddress(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 UpdatePatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class UpdatePatientIdentifier(RedoxAbstractModel):

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


class UpdateVisit(RedoxAbstractModel):

    AccountNumber: Union[str, None] = Field(None)
    AttendingProvider: "UpdateVisitAttendingProvider" = Field(None)
    ConsultingProvider: "UpdateVisitConsultingProvider" = Field(None)
    Location: "UpdateVisitLocation" = Field(None)
    PatientClass: Union[str, None] = Field(None)
    ReferringProvider: "UpdateVisitReferringProvider" = Field(None)
    VisitDateTime: Union[str, None] = Field(None)
    VisitNumber: Union[str, None] = Field(None)


class UpdateVisitAttendingProvider(RedoxAbstractModel):

    Address: "UpdateVisitAttendingProviderAddress" = 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: "UpdateVisitAttendingProviderLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "UpdateVisitAttendingProviderPhoneNumber" = Field(None)


class UpdateVisitAttendingProviderAddress(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 UpdateVisitAttendingProviderLocation(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 UpdateVisitAttendingProviderPhoneNumber(RedoxAbstractModel):

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


class UpdateVisitConsultingProvider(RedoxAbstractModel):

    Address: "UpdateVisitConsultingProviderAddress" = 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: "UpdateVisitConsultingProviderLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "UpdateVisitConsultingProviderPhoneNumber" = Field(None)


class UpdateVisitConsultingProviderAddress(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 UpdateVisitConsultingProviderLocation(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 UpdateVisitConsultingProviderPhoneNumber(RedoxAbstractModel):

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


class UpdateVisitLocation(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)


class UpdateVisitReferringProvider(RedoxAbstractModel):

    Address: "UpdateVisitReferringProviderAddress" = 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: "UpdateVisitReferringProviderLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "UpdateVisitReferringProviderPhoneNumber" = Field(None)


class UpdateVisitReferringProviderAddress(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 UpdateVisitReferringProviderLocation(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 UpdateVisitReferringProviderPhoneNumber(RedoxAbstractModel):

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


Update.update_forward_refs()
UpdateEducation.update_forward_refs()
UpdateEducationAssignment.update_forward_refs()
UpdateMeta.update_forward_refs()
UpdatePatient.update_forward_refs()
UpdatePatientDemographics.update_forward_refs()
UpdateVisit.update_forward_refs()
UpdateVisitAttendingProvider.update_forward_refs()
UpdateVisitConsultingProvider.update_forward_refs()
UpdateVisitReferringProvider.update_forward_refs()
