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

    Administrations: List["AdministrationAdministration"] = Field(...)
    Meta: "AdministrationMeta" = Field(...)
    Patient: "AdministrationPatient" = Field(...)
    Visit: "AdministrationVisit" = Field(None)


class AdministrationAdministration(RedoxAbstractModel):

    AdministeringProvider: "AdministrationAdministrationAdministeringProvider" = Field(
        None
    )
    EndDate: Union[str, None] = Field(None)
    Medication: "AdministrationAdministrationMedication" = Field(...)
    OrderedBy: "AdministrationAdministrationOrderedBy" = Field(None)
    StartDate: Union[str, None] = Field(None)
    Status: str = Field(...)
    VerifiedBy: "AdministrationAdministrationVerifiedBy" = Field(None)


class AdministrationAdministrationAdministeringProvider(RedoxAbstractModel):

    Address: "AdministrationAdministrationAdministeringProviderAddress" = 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: "AdministrationAdministrationAdministeringProviderLocation" = Field(None)
    NPI: Union[str, None] = Field(None)
    PhoneNumber: "AdministrationAdministrationAdministeringProviderPhoneNumber" = Field(
        None
    )


class AdministrationAdministrationAdministeringProviderAddress(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 AdministrationAdministrationAdministeringProviderLocation(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 AdministrationAdministrationAdministeringProviderPhoneNumber(RedoxAbstractModel):

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


class AdministrationAdministrationMedication(RedoxAbstractModel):

    Components: List["AdministrationAdministrationMedicationComponent"] = Field(None)
    Dose: "AdministrationAdministrationMedicationDose" = Field(None)
    Indications: List["AdministrationAdministrationMedicationIndication"] = Field(None)
    LotNumber: Union[str, None] = Field(None)
    Order: "AdministrationAdministrationMedicationOrder" = Field(None)
    Product: "AdministrationAdministrationMedicationProduct" = Field(...)
    Rate: "AdministrationAdministrationMedicationRate" = Field(None)
    Route: "AdministrationAdministrationMedicationRoute" = Field(None)


class AdministrationAdministrationMedicationComponent(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Dose: "AdministrationAdministrationMedicationComponentDose" = Field(None)
    Name: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class AdministrationAdministrationMedicationComponentDose(RedoxAbstractModel):

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


class AdministrationAdministrationMedicationDose(RedoxAbstractModel):

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


class AdministrationAdministrationMedicationIndication(RedoxAbstractModel):

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


class AdministrationAdministrationMedicationOrder(RedoxAbstractModel):

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


class AdministrationAdministrationMedicationProduct(RedoxAbstractModel):

    AltCodes: List["AdministrationAdministrationMedicationProductAltCode"] = Field(None)
    Code: str = Field(...)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class AdministrationAdministrationMedicationProductAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class AdministrationAdministrationMedicationRate(RedoxAbstractModel):

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


class AdministrationAdministrationMedicationRoute(RedoxAbstractModel):

    AltCodes: List["AdministrationAdministrationMedicationRouteAltCode"] = Field(None)
    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class AdministrationAdministrationMedicationRouteAltCode(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSystem: Union[str, None] = Field(None)
    CodeSystemName: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)


class AdministrationAdministrationOrderedBy(RedoxAbstractModel):

    Address: "AdministrationAdministrationOrderedByAddress" = 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: "AdministrationAdministrationOrderedByLocation" = Field(None)
    PhoneNumber: "AdministrationAdministrationOrderedByPhoneNumber" = Field(None)


class AdministrationAdministrationOrderedByAddress(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 AdministrationAdministrationOrderedByLocation(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 AdministrationAdministrationOrderedByPhoneNumber(RedoxAbstractModel):

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


class AdministrationAdministrationVerifiedBy(RedoxAbstractModel):

    Address: "AdministrationAdministrationVerifiedByAddress" = 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: "AdministrationAdministrationVerifiedByLocation" = Field(None)
    PhoneNumber: "AdministrationAdministrationVerifiedByPhoneNumber" = Field(None)


class AdministrationAdministrationVerifiedByAddress(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 AdministrationAdministrationVerifiedByLocation(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 AdministrationAdministrationVerifiedByPhoneNumber(RedoxAbstractModel):

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


class AdministrationMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["AdministrationMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["AdministrationMetaLog"] = Field(None)
    Message: "AdministrationMetaMessage" = Field(None)
    Source: "AdministrationMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "AdministrationMetaTransmission" = Field(None)


class AdministrationMetaDestination(RedoxAbstractModel):

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


class AdministrationMetaLog(RedoxAbstractModel):

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


class AdministrationMetaMessage(RedoxAbstractModel):

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


class AdministrationMetaSource(RedoxAbstractModel):

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


class AdministrationMetaTransmission(RedoxAbstractModel):

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


class AdministrationPatient(RedoxAbstractModel):

    Demographics: "AdministrationPatientDemographics" = Field(None)
    Identifiers: List["AdministrationPatientIdentifier"] = Field(...)
    Notes: List[str] = Field(None)


class AdministrationPatientDemographics(RedoxAbstractModel):

    Address: "AdministrationPatientDemographicsAddress" = 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: "AdministrationPatientDemographicsPhoneNumber" = 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 AdministrationPatientDemographicsAddress(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 AdministrationPatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class AdministrationPatientIdentifier(RedoxAbstractModel):

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


class AdministrationVisit(RedoxAbstractModel):

    AccountNumber: Union[str, None] = Field(None)
    AttendingProvider: "AdministrationVisitAttendingProvider" = Field(None)
    Location: "AdministrationVisitLocation" = Field(None)
    PatientClass: Union[str, None] = Field(None)
    ReferringProvider: "AdministrationVisitReferringProvider" = Field(None)
    VisitDateTime: Union[str, None] = Field(None)
    VisitNumber: Union[str, None] = Field(None)


class AdministrationVisitAttendingProvider(RedoxAbstractModel):

    Address: "AdministrationVisitAttendingProviderAddress" = 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: "AdministrationVisitAttendingProviderLocation" = Field(None)
    PhoneNumber: "AdministrationVisitAttendingProviderPhoneNumber" = Field(None)


class AdministrationVisitAttendingProviderAddress(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 AdministrationVisitAttendingProviderLocation(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 AdministrationVisitAttendingProviderPhoneNumber(RedoxAbstractModel):

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


class AdministrationVisitLocation(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 AdministrationVisitReferringProvider(RedoxAbstractModel):

    Address: "AdministrationVisitReferringProviderAddress" = 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: "AdministrationVisitReferringProviderLocation" = Field(None)
    PhoneNumber: "AdministrationVisitReferringProviderPhoneNumber" = Field(None)


class AdministrationVisitReferringProviderAddress(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 AdministrationVisitReferringProviderLocation(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 AdministrationVisitReferringProviderPhoneNumber(RedoxAbstractModel):

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


Administration.update_forward_refs()
AdministrationAdministration.update_forward_refs()
AdministrationAdministrationAdministeringProvider.update_forward_refs()
AdministrationAdministrationMedication.update_forward_refs()
AdministrationAdministrationMedicationComponent.update_forward_refs()
AdministrationAdministrationMedicationProduct.update_forward_refs()
AdministrationAdministrationMedicationRoute.update_forward_refs()
AdministrationAdministrationOrderedBy.update_forward_refs()
AdministrationAdministrationVerifiedBy.update_forward_refs()
AdministrationMeta.update_forward_refs()
AdministrationPatient.update_forward_refs()
AdministrationPatientDemographics.update_forward_refs()
AdministrationVisit.update_forward_refs()
AdministrationVisitAttendingProvider.update_forward_refs()
AdministrationVisitReferringProvider.update_forward_refs()
