| | from pydantic import BaseModel, Field |
| |
|
| | class ProviderNotesRequest(BaseModel): |
| | provider_notes: str = Field( |
| | ..., |
| | min_length=10, |
| | description="Clinical provider notes for analysis", |
| | examples=["Patient presents with acute bronchitis. Cough for 5 days..."] |
| | ) |
| | |
| | class Config: |
| | json_schema_extra = { |
| | "example": { |
| | "provider_notes": "Patient presents with acute bronchitis. Cough for 5 days, productive with yellow sputum. Lung exam reveals diffuse wheezing. Prescribed azithromycin 500mg." |
| | } |
| | } |
| |
|
| | class ProviderNote(BaseModel): |
| | note: str |
| |
|
| | class CodingResponse(BaseModel): |
| | cpt_codes: list |
| | cpt_explanation: str |
| | icd_codes: list |
| | icd_explanation: str |
| |
|
| |
|
| | |
| | class FileUploadResponse(BaseModel): |
| | """Response model for file upload endpoint""" |
| | success: bool = Field(description="Whether file processing was successful") |
| | filename: str = Field(description="Name of uploaded file") |
| | extracted_text_length: int = Field(description="Length of extracted text") |
| | cpt_codes: list = Field(description="List of CPT codes") |
| | cpt_explanation: str = Field(description="Explanation of CPT codes") |
| | icd_codes: list = Field(description="List of ICD codes") |
| | icd_explanation: str = Field(description="Explanation of ICD codes") |
| | |
| | class Config: |
| | json_schema_extra = { |
| | "example": { |
| | "success": True, |
| | "filename": "provider_notes.txt", |
| | "extracted_text_length": 450, |
| | "cpt_codes": ["99213", "93000"], |
| | "cpt_explanation": "Office visit and EKG", |
| | "icd_codes": ["I20.0", "R07.9"], |
| | "icd_explanation": "Unstable angina and chest pain" |
| | } |
| | } |