-
Notifications
You must be signed in to change notification settings - Fork 0
/
patient_encounter.py
50 lines (40 loc) · 1.18 KB
/
patient_encounter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from datetime import datetime
from uuid import UUID
from typing import Optional
from pydantic import BaseModel
class BasePatientEncounterSchema(BaseModel):
"""
A base schema for patient encounters, excluding patient RFID.
"""
age: Optional[int]
arrival_method: str
arrival_date: datetime
arrival_time: datetime
chief_complaints: str
comment: str
departure_time: Optional[datetime]
departure_date: Optional[datetime]
departure_dest: Optional[str]
document_num: str
gender: Optional[str]
handover_from: Optional[str]
handover_too: str
location: str
on_shift: bool
qr_code: Optional[str]
triage_acuity: str
class Config:
orm_mode = True
class PatientEncounterSchema(BasePatientEncounterSchema):
"""
An encounter with a given patient, including patient RFID.
"""
patient_rfid: Optional[str]
class PatientEncounterResponseSchema(BasePatientEncounterSchema):
"""
The patient encounter response schema, without patient RFID.
"""
# document uuid is created server-side when a document is created
patient_encounter_uuid: Optional[UUID]
class Config:
orm_mode = True