Skip to content

Conformance & correctness

Mercury is validated against the HL7 CQL 1.5.2 specification test suite and benchmarked side-by-side against the reference engine to check output parity.

Language-area fixtures28
Cases passing / executed1,783 / 1,783
Pass rate100%

The suite documents 1,795 cases across 28 fixtures. Mercury executes and passes 1,783; the remaining cases require pre-compiled ELM input and are skipped.

Run the language tests and inspect the summary:

Terminal window
mercury lang-tests --dir cql-tests/tests/cql

This writes a cql-xml-summary.json you can review case by case.

The suite spans the CQL language by area — interval and temporal operators, comparison and logical operators, list/set operators, arithmetic, type conversion, string operators, aggregates, queries, and more. The largest fixtures are the interval and date/time areas.

Beyond the language suite, Mercury is checked against golden fixtures and compared to the reference engine (CQF Ruler) for the same libraries and patients, so you can confirm it returns the same population results before switching. See Running the containers for the side-by-side stack.