Skip to main content

CaseInput

The CaseInput model represents the complete input data structure for a medical case, including patient information, doctor’s case summary, and associated medical documents.

Fields

case_id
string
required
Unique identifier for the medical case
patient_data
PatientData
required
Patient demographic and basic information
doctor_case_summary
string
required
Doctor’s initial case summary and clinical observations
lab_files
List[ProcessedFile]
default:"[]"
List of laboratory test files associated with this case
radiology_files
List[ProcessedFile]
default:"[]"
List of radiology files (images, reports) associated with this case

Example

{
  "case_id": "CASE-2024-001",
  "patient_data": {
    "name": "John Doe",
    "age": 45,
    "gender": "Male"
  },
  "doctor_case_summary": "Patient presents with chest pain and shortness of breath. History of hypertension.",
  "lab_files": [
    {
      "file_id": "LAB-001",
      "file_name": "blood_test_results.pdf",
      "file_type": "application/pdf",
      "file_category": "lab",
      "text_data": "Complete Blood Count: WBC 8.5, RBC 4.8...",
      "ai_summary": "Blood test shows normal CBC values with slightly elevated lipid panel."
    }
  ],
  "radiology_files": [
    {
      "file_id": "RAD-001",
      "file_name": "chest_xray.png",
      "file_type": "image/png",
      "file_category": "radiology",
      "ai_summary": "Chest X-ray shows clear lung fields with no acute findings."
    }
  ]
}

CaseSummary

Comprehensive summary of a medical case generated by AI analysis, combining information from patient data, doctor’s notes, lab results, and radiology findings.

Fields

comprehensive_summary
string
required
Detailed narrative summary of the entire case
key_findings
List[string]
required
List of the most important clinical findings from all sources
patient_context
PatientData
required
Patient demographic information
doctor_notes
string
Doctor’s clinical observations and notes
lab_summary
string
Aggregated summary of all laboratory findings
radiology_summary
string
Aggregated summary of all radiology findings
confidence_score
float
required
AI confidence score for the summary (0.0 to 1.0)

Example

{
  "comprehensive_summary": "45-year-old male presenting with acute chest pain. Clinical examination and diagnostic tests suggest possible cardiac involvement. Lab results show elevated cardiac markers. Chest X-ray unremarkable.",
  "key_findings": [
    "Elevated troponin levels",
    "History of hypertension",
    "Chest pain radiating to left arm",
    "Normal chest X-ray"
  ],
  "patient_context": {
    "name": "John Doe",
    "age": 45,
    "gender": "Male"
  },
  "doctor_notes": "Patient presents with chest pain and shortness of breath. History of hypertension.",
  "lab_summary": "Blood work shows elevated cardiac markers with troponin at 0.5 ng/mL. Lipid panel shows borderline high cholesterol.",
  "radiology_summary": "Chest X-ray demonstrates clear lung fields with normal cardiac silhouette.",
  "confidence_score": 0.92
}

Build docs developers (and LLMs) love