Implement FHIR Measure and MeasureReport resources to compute a quality measure (e.g., proportion of diabetic patients with HbA1c tested) and report results programmatically
Retrieve the canonical Measure resource for the quality measure from a terminology server or define a Measure with scoring=proportion, population criteria references, and improvement notation
POST to /Measure/{id}/\$evaluate-measure with subject=Patient/{id} and period parameters to compute the measure for a single patient
Parse the returned MeasureReport resource: check group[0].population entries for initial-population, denominator, numerator, and exclusion counts
For a population-level report, use subject=Group/{id} to compute across a cohort and parse the aggregated MeasureReport with type=summary
Store or transmit the MeasureReport to a reporting repository using a transaction Bundle
Known gotchas
$evaluate-measure requires the server to have CQL library evaluation capability; most general-purpose FHIR servers do not support this operation — use a dedicated clinical quality engine like the CQF Ruler
The Measure.library reference must point to a Library resource containing the CQL logic; missing or unresolvable Library references cause the operation to fail with an OperationOutcome
Period boundaries are inclusive on both start and end; ensure the period parameter exactly matches the measure specification's reporting period to avoid numerator/denominator count discrepancies
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp