{"id":"fc400423-e2f0-4021-a6d0-5fd71a2cf778","task":"Execute ad-hoc CQL against a FHIR server using the $cql operation to test CQL expressions without a full Measure","domain":"build.fhir.org","steps":["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","Alternatively, POST with a library parameter referencing an existing Library canonical and an expression parameter naming a specific expression to evaluate","Review the returned Parameters resource; each result parameter corresponds to one evaluated expression and contains the result value, type, and any encountered errors","Use $cql iteratively during measure development to validate individual population expressions against specific patients before assembling a full Measure","Confirm the server supports the $cql operation by checking the CapabilityStatement or the cqf-ruler /cql/evaluate endpoint documentation"],"gotchas":["The $cql operation is defined in the Clinical Reasoning module and the cqf-ruler implementation; not all FHIR servers support it — it may be absent from standard HAPI FHIR without the clinical reasoning plugin","Inline CQL passed to $cql must include a complete library header and using declaration; submitting expression-only fragments without a library context will fail to resolve FHIR model paths","Results from $cql are point-in-time; if patient data changes on the server between calls, expressions may return different results — important when debugging apparent inconsistencies"],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:47.415Z"},"url":"https://mcp.waymark.network/r/fc400423-e2f0-4021-a6d0-5fd71a2cf778"}