21 lines
540 B
Python
21 lines
540 B
Python
from typing import Any, Optional
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class DocumentFinding(BaseModel):
|
|
test: str
|
|
value: str
|
|
unit: Optional[str] = None
|
|
interpretation: Optional[str] = None
|
|
|
|
|
|
class DocumentExtractionResponse(BaseModel):
|
|
success: bool
|
|
session_id: str
|
|
document_type: str
|
|
summary: str
|
|
findings: list[DocumentFinding] = Field(default_factory=list)
|
|
medications_found: list[str] = Field(default_factory=list)
|
|
allergies_found: list[str] = Field(default_factory=list)
|
|
message: str
|