File size: 1,399 Bytes
5cb3ecd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from pydantic import BaseModel, Field
from typing import Optional, Dict

class Note(BaseModel):
    date: str = Field(..., example="2023-01-01T12:00:00Z")
    type: str = Field(..., example="Progress Note")
    text: str = Field(..., example="Patient reported improvement in symptoms")
    author: Optional[str] = Field(None, example="Dr. Smith")

class Condition(BaseModel):
    id: str = Field(..., example="cond123")
    code: str = Field(..., example="Hypertension")
    status: str = Field(..., example="Active")
    onset_date: str = Field(..., example="2020-05-15")
    recorded_date: Optional[str] = Field(None, example="2020-05-16")
    verification_status: Optional[str] = Field(None, example="Confirmed")

class Medication(BaseModel):
    id: str = Field(..., example="med123")
    name: str = Field(..., example="Lisinopril 10mg")
    status: str = Field(..., example="Active")
    prescribed_date: str = Field(..., example="2021-02-10")
    requester: Optional[str] = Field(None, example="Dr. Smith")
    dosage: Optional[str] = Field(None, example="10mg daily")

class Encounter(BaseModel):
    id: str = Field(..., example="enc123")
    type: str = Field(..., example="Outpatient Visit")
    status: str = Field(..., example="Finished")
    period: Dict = Field(..., example={"start": "2023-01-01T10:00:00Z"})
    service_provider: Optional[str] = Field(None, example="City Hospital")