Ali2206 commited on
Commit
5cb3ecd
·
verified ·
1 Parent(s): 81b8420

Update models/entities.py

Browse files
Files changed (1) hide show
  1. models/entities.py +31 -0
models/entities.py CHANGED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel, Field
2
+ from typing import Optional, Dict
3
+
4
+ class Note(BaseModel):
5
+ date: str = Field(..., example="2023-01-01T12:00:00Z")
6
+ type: str = Field(..., example="Progress Note")
7
+ text: str = Field(..., example="Patient reported improvement in symptoms")
8
+ author: Optional[str] = Field(None, example="Dr. Smith")
9
+
10
+ class Condition(BaseModel):
11
+ id: str = Field(..., example="cond123")
12
+ code: str = Field(..., example="Hypertension")
13
+ status: str = Field(..., example="Active")
14
+ onset_date: str = Field(..., example="2020-05-15")
15
+ recorded_date: Optional[str] = Field(None, example="2020-05-16")
16
+ verification_status: Optional[str] = Field(None, example="Confirmed")
17
+
18
+ class Medication(BaseModel):
19
+ id: str = Field(..., example="med123")
20
+ name: str = Field(..., example="Lisinopril 10mg")
21
+ status: str = Field(..., example="Active")
22
+ prescribed_date: str = Field(..., example="2021-02-10")
23
+ requester: Optional[str] = Field(None, example="Dr. Smith")
24
+ dosage: Optional[str] = Field(None, example="10mg daily")
25
+
26
+ class Encounter(BaseModel):
27
+ id: str = Field(..., example="enc123")
28
+ type: str = Field(..., example="Outpatient Visit")
29
+ status: str = Field(..., example="Finished")
30
+ period: Dict = Field(..., example={"start": "2023-01-01T10:00:00Z"})
31
+ service_provider: Optional[str] = Field(None, example="City Hospital")