Distopia22's picture
Fix: Remove Field import from response_models.py
9855392
from pydantic import BaseModel
from typing import List
class ICDCode(BaseModel):
code: str
description: str
explanation: str
class CPTCode(BaseModel):
code: str
description: str
explanation: str
class CodingResponse(BaseModel):
icd_codes: List[ICDCode]
cpt_codes: List[CPTCode]
overall_summary: str
class Config:
json_schema_extra = {
"example": {
"icd_codes": [
{
"code": "J20.9",
"description": "Acute bronchitis, unspecified",
"explanation": "Patient presents with acute bronchitis as documented in provider notes"
}
],
"cpt_codes": [
{
"code": "99213",
"description": "Office visit, established patient",
"explanation": "Comprehensive examination performed as documented"
}
],
"overall_summary": "Patient encounter for acute bronchitis with examination and treatment"
}
}
class FileUploadResponse(BaseModel):
success: bool
filename: str
extracted_text_length: int
pii_removed: bool
pii_count: int
icd_codes: List[ICDCode]
cpt_codes: List[CPTCode]
overall_summary: str