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

    BillingProvider: "SubmissionBillingProvider" = Field(None)
    Claims: List["SubmissionClaim"] = Field(None)
    Meta: "SubmissionMeta" = Field(...)
    Patient: "SubmissionPatient" = Field(None)
    Subscriber: "SubmissionSubscriber" = Field(None)
    Transaction: "SubmissionTransaction" = Field(None)


class SubmissionBillingProvider(RedoxAbstractModel):

    Address: "SubmissionBillingProviderAddress" = Field(None)
    EmailAddress: Union[str, None] = 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)
    MiddleName: Union[str, None] = Field(None)
    OrganizationName: Union[str, None] = Field(None)
    PhoneNumber: "SubmissionBillingProviderPhoneNumber" = Field(None)
    Specialty: "SubmissionBillingProviderSpecialty" = Field(None)
    TIN: Union[str, None] = Field(None)


class SubmissionBillingProviderAddress(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 SubmissionBillingProviderPhoneNumber(RedoxAbstractModel):

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


class SubmissionBillingProviderSpecialty(RedoxAbstractModel):

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


class SubmissionClaim(RedoxAbstractModel):

    AdditionalDates: List["SubmissionClaimAdditionalDate"] = Field(None)
    CopayAmount: Union[str, None] = Field(None)
    Diagnoses: List["SubmissionClaimDiagnosis"] = Field(None)
    DiagnosisRelatedGroup: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IsProviderSignatureOnFile: Union[bool, None] = Field(None)
    IsReleaseOfInformationOnFile: Union[bool, None] = Field(None)
    Lines: List["SubmissionClaimLine"] = Field(None)
    Procedures: List["SubmissionClaimProcedure"] = Field(None)
    Providers: List["SubmissionClaimProvider"] = Field(None)
    ReferenceNumbers: List["SubmissionClaimReferenceNumber"] = Field(None)
    TotalAmount: Union[str, None] = Field(None)
    Type: Union[str, None] = Field(None)
    Visit: "SubmissionClaimVisit" = Field(None)


class SubmissionClaimAdditionalDate(RedoxAbstractModel):

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


class SubmissionClaimDiagnosis(RedoxAbstractModel):

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


class SubmissionClaimLine(RedoxAbstractModel):

    Amount: Union[str, None] = Field(None)
    Diagnoses: List["SubmissionClaimLineDiagnosis"] = Field(None)
    ID: Union[str, None] = Field(None)
    IsEmergency: Union[bool, None] = Field(None)
    Notes: Union[str, None] = Field(None)
    Procedure: "SubmissionClaimLineProcedure" = Field(None)
    RevenueCode: Union[str, None] = Field(None)
    ServiceDateTime: Union[str, None] = Field(None)
    ServiceEndDateTime: Union[str, None] = Field(None)
    UnitCount: Union[str, None] = Field(None)
    Units: Union[str, None] = Field(None)


class SubmissionClaimLineDiagnosis(RedoxAbstractModel):

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


class SubmissionClaimLineProcedure(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSet: Union[str, None] = Field(None)
    Modifiers: List[str] = Field(None)
    Name: Union[str, None] = Field(None)


class SubmissionClaimProcedure(RedoxAbstractModel):

    Code: Union[str, None] = Field(None)
    CodeSet: Union[str, None] = Field(None)
    Modifiers: List[str] = Field(None)
    Name: Union[str, None] = Field(None)


class SubmissionClaimProvider(RedoxAbstractModel):

    FirstName: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    Role: Union[str, None] = Field(None)
    Specialty: "SubmissionClaimProviderSpecialty" = Field(None)


class SubmissionClaimProviderSpecialty(RedoxAbstractModel):

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


class SubmissionClaimReferenceNumber(RedoxAbstractModel):

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


class SubmissionClaimVisit(RedoxAbstractModel):

    DateTime: Union[str, None] = Field(None)
    DischargeDateTime: Union[str, None] = Field(None)
    Location: "SubmissionClaimVisitLocation" = Field(None)
    PreviousLocation: "SubmissionClaimVisitPreviousLocation" = Field(None)
    Type: Union[str, None] = Field(None)
    VisitNumber: Union[str, None] = Field(None)


class SubmissionClaimVisitLocation(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 SubmissionClaimVisitPreviousLocation(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 SubmissionMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["SubmissionMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["SubmissionMetaLog"] = Field(None)
    Message: "SubmissionMetaMessage" = Field(None)
    Source: "SubmissionMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "SubmissionMetaTransmission" = Field(None)


class SubmissionMetaDestination(RedoxAbstractModel):

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


class SubmissionMetaLog(RedoxAbstractModel):

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


class SubmissionMetaMessage(RedoxAbstractModel):

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


class SubmissionMetaSource(RedoxAbstractModel):

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


class SubmissionMetaTransmission(RedoxAbstractModel):

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


class SubmissionPatient(RedoxAbstractModel):

    Demographics: "SubmissionPatientDemographics" = Field(None)
    Identifiers: List["SubmissionPatientIdentifier"] = Field(None)
    IsPregnant: Union[str, None] = Field(None)
    Notes: List[str] = Field(None)
    Weight: Union[str, None] = Field(None)


class SubmissionPatientDemographics(RedoxAbstractModel):

    Address: "SubmissionPatientDemographicsAddress" = 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: "SubmissionPatientDemographicsPhoneNumber" = 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 SubmissionPatientDemographicsAddress(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 SubmissionPatientDemographicsPhoneNumber(RedoxAbstractModel):

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


class SubmissionPatientIdentifier(RedoxAbstractModel):

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


class SubmissionSubscriber(RedoxAbstractModel):

    Address: "SubmissionSubscriberAddress" = Field(None)
    DOB: Union[str, None] = Field(None)
    FirstName: Union[str, None] = Field(None)
    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Insurance: "SubmissionSubscriberInsurance" = Field(None)
    LastName: Union[str, None] = Field(None)
    MiddleName: Union[str, None] = Field(None)
    OrganizationName: Union[str, None] = Field(None)
    RelationToPatient: Union[str, None] = Field(None)
    ResponsibilityLevel: Union[str, None] = Field(None)
    Sex: Union[str, None] = Field(None)


class SubmissionSubscriberAddress(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 SubmissionSubscriberInsurance(RedoxAbstractModel):

    AgreementType: Union[str, None] = Field(None)
    Company: "SubmissionSubscriberInsuranceCompany" = 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)
    MemberNumber: Union[str, None] = Field(None)
    Plan: "SubmissionSubscriberInsurancePlan" = Field(None)
    PolicyNumber: Union[str, None] = Field(None)
    Priority: Union[str, None] = Field(None)


class SubmissionSubscriberInsuranceCompany(RedoxAbstractModel):

    Address: "SubmissionSubscriberInsuranceCompanyAddress" = 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 SubmissionSubscriberInsuranceCompanyAddress(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 SubmissionSubscriberInsurancePlan(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 SubmissionTransaction(RedoxAbstractModel):

    ID: Union[str, None] = Field(None)
    IDType: Union[str, None] = Field(None)
    Receiver: "SubmissionTransactionReceiver" = Field(None)
    Submitter: "SubmissionTransactionSubmitter" = Field(None)
    Type: Union[str, None] = Field(None)


class SubmissionTransactionReceiver(RedoxAbstractModel):

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


class SubmissionTransactionSubmitter(RedoxAbstractModel):

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


class SubmissionTransactionSubmitterPhoneNumber(RedoxAbstractModel):

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


Submission.update_forward_refs()
SubmissionBillingProvider.update_forward_refs()
SubmissionClaim.update_forward_refs()
SubmissionClaimLine.update_forward_refs()
SubmissionClaimProvider.update_forward_refs()
SubmissionClaimVisit.update_forward_refs()
SubmissionMeta.update_forward_refs()
SubmissionPatient.update_forward_refs()
SubmissionPatientDemographics.update_forward_refs()
SubmissionSubscriber.update_forward_refs()
SubmissionSubscriberInsurance.update_forward_refs()
SubmissionSubscriberInsuranceCompany.update_forward_refs()
SubmissionTransaction.update_forward_refs()
SubmissionTransactionSubmitter.update_forward_refs()
