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

    Departments: List[str] = Field(None)
    Facilities: List[str] = Field(None)
    Meta: "VisitQueryMeta" = Field(...)
    PatientClasses: List[str] = Field(None)
    Patients: List["VisitQueryPatient"] = Field(None)
    VisitNumbers: List[str] = Field(None)
    VisitStartDateTime: Union[str, None] = Field(None)
    VisitStatuses: List[str] = Field(None)


class VisitQueryMeta(RedoxAbstractModel):

    DataModel: str = Field(...)
    Destinations: List["VisitQueryMetaDestination"] = Field(None)
    EventDateTime: Union[str, None] = Field(None)
    EventType: str = Field(...)
    FacilityCode: Union[str, None] = Field(None)
    Logs: List["VisitQueryMetaLog"] = Field(None)
    Message: "VisitQueryMetaMessage" = Field(None)
    Source: "VisitQueryMetaSource" = Field(None)
    Test: Union[bool, None] = Field(None)
    Transmission: "VisitQueryMetaTransmission" = Field(None)


class VisitQueryMetaDestination(RedoxAbstractModel):

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


class VisitQueryMetaLog(RedoxAbstractModel):

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


class VisitQueryMetaMessage(RedoxAbstractModel):

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


class VisitQueryMetaSource(RedoxAbstractModel):

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


class VisitQueryMetaTransmission(RedoxAbstractModel):

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


class VisitQueryPatient(RedoxAbstractModel):

    Identifiers: List["VisitQueryPatientIdentifier"] = Field(None)


class VisitQueryPatientIdentifier(RedoxAbstractModel):

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


VisitQuery.update_forward_refs()
VisitQueryMeta.update_forward_refs()
VisitQueryPatient.update_forward_refs()
