I am working on clinical quality measures. I have the CQL code available with me but I do not know how to execute it to generate a measure report. I tried searching and reading documentation but I could not find anything substantial. I was able to translate CQL to ELM but how do I execute it? I did find few FHIR measure bundle and I was wondering is there a way to convert CQL to FHIR measure bundle to generate measure report?
There are several steps which involve tooling and a FHIR server with a CQL engine to invoke $evaluate-measure. I’ll try to explain but others will need to correct me because the tools are evolving.
CQL files are base64 encoded and stuffed into a Library resource. CQL to ELM is translated and the ELM (XML and/or JSON) are base64 encoded and stuffed into the same Library resource with the CQL. A Measure resource is created that references that Library resource. The Measure and Library are posted to a FHIR server; CQF Ruler is one such server based on HAPI. You will need some patient data (aka test cases): Patient resource, and other FHIR resources based on what your measure looks at. Usually one or more Encounter resources.
cqf-tooling/Main.java at master · cqframework/cqf-tooling · GitHub explains some of the tooling; see ecqm-content-qicore-2022/_refresh.bat at master · cqframework/ecqm-content-qicore-2022 · GitHub for example which is a script to call this tooling. Documentation could be better.
Also see GitHub - cqframework/cqf-ccc: Colorectal Cancer Concepts and GitHub - cqframework/content-ig-walkthrough: A walkthrough of building a FHIR content implementation guide and Getting Started · cqframework/CQL-Formatting-and-Usage-Wiki Wiki · GitHub