case-summary
Prepare a complete case summary for $ARGUMENTS
Use your fhir-basics skill to query the FHIR endpoints. Use your clinical-knowledge skill to flag abnormal values and identify relevant clinical context.
Steps
-
Find the patient -- Query
GET /Patient?name={name}&_count=5orGET /Patient?_count=1for "first patient". Extractid, full name, birthDate, gender. -
Get active conditions -- Query
GET /Condition?patient={id}&clinical-status=active. Extract each condition's display name, SNOMED/ICD code, onset date, and verification status. Also query for resolved conditions and list them separately (they provide clinical history context). -
Get recent labs -- Query
GET /Observation?patient={id}&category=laboratory&_sort=-date&_count=50. "Recent" means the most recent value for each distinct LOINC code within the past 12 months. For each lab, report: name, value, unit, date, and whether it's normal/abnormal per the clinical-knowledge skill. If the Observation includes areferenceRange, use that for flagging. -
Get recent vitals -- Query
GET /Observation?patient={id}&category=vital-signs&_sort=-date&_count=20. For blood pressure, handle the component Observation format (LOINC 85354-9 panel with systolic/diastolic incomponent[]). Report the most recent BP, heart rate, BMI, temperature. -
Get current medications -- Query
GET /MedicationRequest?patient={id}&status=active. For each medication, report: drug name, dosage text, and drug class (per clinical-knowledge skill). Organize by drug class when possible. -
Get recent encounters (optional but adds context) -- Query
GET /Encounter?patient={id}&_sort=-date&_count=5. Report type, date, and reason if available. This shows how recently the patient was seen.