Execute ad-hoc CQL against a FHIR server using the $cql operation to test CQL expressions without a full Measure

domain: build.fhir.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. POST /Library/$cql (or the server-specific endpoint such as /cql/evaluate) with a Parameters resource containing a subject parameter (Patient reference) and expression parameters with inline CQL text
  2. Alternatively, POST with a library parameter referencing an existing Library canonical and an expression parameter naming a specific expression to evaluate
  3. Review the returned Parameters resource; each result parameter corresponds to one evaluated expression and contains the result value, type, and any encountered errors
  4. Use $cql iteratively during measure development to validate individual population expressions against specific patients before assembling a full Measure
  5. Confirm the server supports the $cql operation by checking the CapabilityStatement or the cqf-ruler /cql/evaluate endpoint documentation

Known gotchas

Related routes

Execute a FHIR $cql operation against a CQF-ruler server to evaluate a parameterized CQL expression against a specific patient and debug why a patient unexpectedly falls outside a measure population
hl7.org · 6 steps · unrated
Use the FHIR $cql operation on cqf-ruler to evaluate a named CQL expression against a patient and debug measure population logic
github.com · 5 steps · unrated
Author a CQL Library resource with embedded CQL logic and ELM content for use in a FHIR quality measure
cql.hl7.org · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans