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

    Authorization: "AuthReviewAuthorization" = Field(None)
    Meta: "AuthReviewMeta" = Field(...)
    Patient: "AuthReviewPatient" = Field(...)
    Referral: "AuthReviewReferral" = Field(None)


class AuthReviewAuthorization(RedoxAbstractModel):

    AdditionalDates: List["AuthReviewAuthorizationAdditionalDate"] = Field(None)
    AdmissionSource: Union[str, None] = Field(None)
    AdmissionType: Union[str, None] = Field(None)
    AlternateID: Union[str, None] = Field(None)
    Category: Union[str, None] = Field(None)
    CertificationCode: Union[str, None] = Field(None)
    Diagnoses: List["AuthReviewAuthorizationDiagnosis"] = Field(None)
    EventDate: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    Providers: List["AuthReviewAuthorizationProvider"] = Field(None)
    Quantity: "AuthReviewAuthorizationQuantity" = Field(None)
    RelatedCause: Union[str, None] = Field(None)
    Request: "AuthReviewAuthorizationRequest" = Field(None)
    ServiceLevel: Union[str, None] = Field(None)
    ServiceLocation: Union[str, None] = Field(None)
    Services: List["AuthReviewAuthorizationService"] = Field(None)
    ServiceType: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class AuthReviewAuthorizationAdditionalDate(RedoxAbstractModel):

    DateTime: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)


class AuthReviewAuthorizationDiagnosis(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 AuthReviewAuthorizationProvider(RedoxAbstractModel):

    Address: "AuthReviewAuthorizationProviderAddress" = Field(None)
    ContactInfo: Union[str, None] = 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: "AuthReviewAuthorizationProviderLocation" = Field(None)
    PhoneNumber: "AuthReviewAuthorizationProviderPhoneNumber" = Field(None)
    Type: Union[str, None] = Field(None)


class AuthReviewAuthorizationProviderAddress(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 AuthReviewAuthorizationProviderLocation(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 AuthReviewAuthorizationProviderPhoneNumber(RedoxAbstractModel):

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


class AuthReviewAuthorizationQuantity(RedoxAbstractModel):

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


class AuthReviewAuthorizationRequest(RedoxAbstractModel):

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


class AuthReviewAuthorizationService(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    Modifiers: List[str] = Field(None)
    Notes: List[str] = Field(None)
    Quantity: "AuthReviewAuthorizationServiceQuantity" = Field(None)
    RevenueCode: Union[str, None] = Field(None)
    ServiceDate: Union[str, None] = Field(None)


class AuthReviewAuthorizationServiceQuantity(RedoxAbstractModel):

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


class AuthReviewMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["AuthReviewMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["AuthReviewMetaLog"] = Field(None)
    Message: "AuthReviewMetaMessage" = Field(None)
    Source: "AuthReviewMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "AuthReviewMetaTransmission" = Field(None)


class AuthReviewMetaDestination(RedoxAbstractModel):

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


class AuthReviewMetaLog(RedoxAbstractModel):

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


class AuthReviewMetaMessage(RedoxAbstractModel):

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


class AuthReviewMetaSource(RedoxAbstractModel):

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


class AuthReviewMetaTransmission(RedoxAbstractModel):

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


class AuthReviewPatient(RedoxAbstractModel):

    Demographics: "AuthReviewPatientDemographics" = Field(None)
    Identifiers: List["AuthReviewPatientIdentifier"] = Field(...)
    Insurances: List["AuthReviewPatientInsurance"] = Field(None)
    Notes: List[str] = Field(None)


class AuthReviewPatientDemographics(RedoxAbstractModel):

    Address: "AuthReviewPatientDemographicsAddress" = 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: "AuthReviewPatientDemographicsPhoneNumber" = 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 AuthReviewPatientDemographicsAddress(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 AuthReviewPatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class AuthReviewPatientIdentifier(RedoxAbstractModel):

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


class AuthReviewPatientInsurance(RedoxAbstractModel):

    AgreementType: Union[str, None] = Field(None)
    Company: "AuthReviewPatientInsuranceCompany" = Field(None)
    CoverageType: Union[str, None] = Field(None)
    EffectiveDate: Union[str, None] = Field(None)
    ExpirationDate: Union[str, None] = Field(None)
    GroupName: Union[str, None] = Field(None)
    GroupNumber: Union[str, None] = Field(None)
    Insured: "AuthReviewPatientInsuranceInsured" = Field(None)
    MemberNumber: Union[str, None] = Field(None)
    Plan: "AuthReviewPatientInsurancePlan" = Field(None)
    PolicyNumber: Union[str, None] = Field(None)
    Priority: Union[str, None] = Field(None)


class AuthReviewPatientInsuranceCompany(RedoxAbstractModel):

    Address: "AuthReviewPatientInsuranceCompanyAddress" = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Name: Union[str, None] = Field(None)
    PhoneNumber: Union[str, None] = Field(None)


class AuthReviewPatientInsuranceCompanyAddress(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 AuthReviewPatientInsuranceInsured(RedoxAbstractModel):

    Address: "AuthReviewPatientInsuranceInsuredAddress" = Field(None)
    DOB: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    Identifiers: List["AuthReviewPatientInsuranceInsuredIdentifier"] = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    Relationship: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)
    SSN: Union[str, None] = Field(None)


class AuthReviewPatientInsuranceInsuredAddress(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 AuthReviewPatientInsuranceInsuredIdentifier(RedoxAbstractModel):

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


class AuthReviewPatientInsurancePlan(RedoxAbstractModel):

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


class AuthReviewReferral(RedoxAbstractModel):

    AlternateID: Union[str, None] = Field(None)
    Authorization: "AuthReviewReferralAuthorization" = Field(None)
    Category: Union[str, None] = Field(None)
    DateTime: Union[str, None] = Field(None)
    DepartmentSpecialty: Union[str, None] = Field(None)
    Diagnoses: List["AuthReviewReferralDiagnosis"] = Field(None)
    ExpirationDateTime: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    Priority: Union[str, None] = Field(None)
    Procedures: List["AuthReviewReferralProcedure"] = Field(None)
    ProcessDateTime: Union[str, None] = Field(None)
    Providers: List["AuthReviewReferralProvider"] = Field(None)
    ProviderSpecialty: Union[str, None] = Field(None)
    Reason: Union[str, None] = Field(None)
    RelatedCause: Union[str, None] = Field(None)
    RequestType: Union[str, None] = Field(None)
    ServiceLocation: Union[str, None] = Field(None)
    Status: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)
    Visit: "AuthReviewReferralVisit" = Field(None)


class AuthReviewReferralAuthorization(RedoxAbstractModel):

    AuthorizedTreatmentCount: Union[str, None] = Field(None)
    Company: "AuthReviewReferralAuthorizationCompany" = Field(None)
    DateTime: Union[str, None] = Field(None)
    ExpirationDateTime: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    Number: Union[str, None] = Field(None)
    Plan: "AuthReviewReferralAuthorizationPlan" = Field(None)
    ReimbursementLimit: Union[str, None] = Field(None)
    RequestedTreatmentCount: Union[str, None] = Field(None)
    RequestedTreatmentUnits: Union[str, None] = Field(None)


class AuthReviewReferralAuthorizationCompany(RedoxAbstractModel):

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


class AuthReviewReferralAuthorizationPlan(RedoxAbstractModel):

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


class AuthReviewReferralDiagnosis(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)
    Notes: List[str] = Field(None)
    Type: Union[str, None] = Field(None)


class AuthReviewReferralProcedure(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    Codeset: Union[str, None] = Field(None)
    Description: Union[str, None] = Field(None)
    Modifiers: List[str] = Field(None)
    Notes: List[str] = Field(None)
    Quantity: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class AuthReviewReferralProvider(RedoxAbstractModel):

    Address: "AuthReviewReferralProviderAddress" = Field(None)
    ContactInfo: Union[str, None] = 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: "AuthReviewReferralProviderLocation" = Field(None)
    PhoneNumber: "AuthReviewReferralProviderPhoneNumber" = Field(None)
    Type: Union[str, None] = Field(None)


class AuthReviewReferralProviderAddress(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 AuthReviewReferralProviderLocation(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 AuthReviewReferralProviderPhoneNumber(RedoxAbstractModel):

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


class AuthReviewReferralVisit(RedoxAbstractModel):

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


AuthReview.update_forward_refs()
AuthReviewAuthorization.update_forward_refs()
AuthReviewAuthorizationProvider.update_forward_refs()
AuthReviewAuthorizationService.update_forward_refs()
AuthReviewMeta.update_forward_refs()
AuthReviewPatient.update_forward_refs()
AuthReviewPatientDemographics.update_forward_refs()
AuthReviewPatientInsurance.update_forward_refs()
AuthReviewPatientInsuranceCompany.update_forward_refs()
AuthReviewPatientInsuranceInsured.update_forward_refs()
AuthReviewReferral.update_forward_refs()
AuthReviewReferralAuthorization.update_forward_refs()
AuthReviewReferralProvider.update_forward_refs()
