Common CQL Assets for FHIR (US-Based)
1.0.0-ballot - STU 1 Ballot
This page is part of the Common CQL Assets for FHIR (US-Based) (v1.0.0-ballot: Informative 1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions
| Page standards status: Informative |
Adding new content to this IG involves several steps. There are multiple ways to complete many of these steps, and this guide highlights one path for adding a new Questionnaire:
input/resources/questionnaire). An example for the form in #1 can be found here.http://hl7.org/fhir/StructureDefinition/cqf-library to the Questionnaire with the canonical value of the related CQL library.sdc-questionnaire-launchContext for the Patient and any parameters the CQL Library has.http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression with an expression title that will later be used as a link to the related CQL definitions that are responsible for determining the content of the initial value for this item.
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemPopulationContext can be used in combination with the initial expression extension. Details on how to use this expression can be found in the SDC IG.input/cql and remember to name it the same as the end of the canonical URL defined in step #3. An example for the MNAC form can be found here.Execute CQL. To successfully investigate if a certain definition results in the desired output, some test resources need to be provided and located in a folder at the following path: input/tests/library/YOUR-CQL-LIBRARY-NAME. Sub-folders can define multiple patients filled with multiple resource files. The MNAC test folder with resources of a Patient called example can be found here._refresh script (.sh or .bat as appropriate), and watch multiple things happening automatically:
bundles/questionnaires, a new folder with the Questionnaire name is create, which includes a bundle containing the FHIR Library with the CQL content and the related dependency libraries.$populate operation.$populate for your questionnaire results in the expected initial values for each item. A complete sample Postman collection for a different Questionnaire can be found here. This collection also contains automated tests to highlight what to look for.sh _refresh.sh), sometimes errors in the Questionnaire or CQL cause the new content to be ignored and no output bundle being created. A frequent error is that a wrong or non-existent library name is defined within the Questionnaire.json element cql-library extension.define "Practitioner's phone" will fail and must be renamed to define "Practitioner phone".