Observation Statistics
fhir_statsCompute count, min, max, and mean from numeric FHIR Observation values. Filter by LOINC code and patient for targeted clinical analysis.
Instructions
Compute statistics (count, min, max, mean) over numeric Observation values. Standard FHIR $stats (since R4). Only supports valueQuantity. Filter by patient and/or code.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fhir_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | LOINC code to filter Observations (e.g., '2339-0' for Glucose) | |
| patient | No | Patient reference filter (e.g., 'Patient/pt-1') |