CQL Testing Tool

About the tool

Clinical Quality Language (CQL) is an expressive language for clinical quality measures and clinical decision support. It helps in expressing logic that involves clinical data.

Due to its complexity, testing CQL code becomes a challenge. There can be issues of syntax errors, logic errors, wrong use of clinical terms, etc. To tackle these issues, I built this CQL Testing Tool.

Testing CQL code also involves checking whether the written code produces the desired logic correctly. Since CQL is used for clinical quality measures and clinical decision support, it becomes very important to test it accurately due to the criticality of the healthcare domain.

To use the CQL Testing Tool, you need to provide the CQL code and the mock FHIR resources in the FHIR Shorthand (FSH) language. FSH is used to define the FHIR resource bundle that will be used for testing the CQL code. You can tick the "Expand value sets using VSAC" box to expand the value sets in the CQL code using the Value Set Authority Center (VSAC) service.

Click "Execute CQL" to run the CQL code against the provided FSH instances. The output will be shown in the Results section. You can revise and troubleshoot your code based on the output until the desired logic is successfully achieved and working as expected. Happy coding!


The CQL code to be tested.
When enabled, the value sets in the CQL code will be expanded using the VSAC service.
The FHIR resources (FSH instances) to be used for testing the CQL code.
The id of the patient (subject) to be used for testing the CQL code.
Press Execute CQL to see results.

See also

Edit and evaluate CQL online.
Evaluate FHIR Measure resources online.
FHIR, CQL, clinical quality measures, clinical reasoning
Awesome links, tutorials, and resources on the Clinical Quality Language.
CQL, awesome
Test SMART on FHIR app flows online.
Convert CQL to ELM online.
Query FHIR stores using GraphQL.
Test CDS Hooks online.
Generate snapshots for FHIR StructureDefinitions.
Browse the FHIR resource model.
FHIR, data models
Author and debug FHIR Mapping Language files.
FHIR Mapping Language, FHIR
Query FHIR terminology services online.
FHIR, terminologies
Query FHIR servers using HFQL online.

Made by Anton Vasetenkov.

If you want to say hi, you can reach me on LinkedIn or via email. If you like my work, you can support me by buying me a coffee.