This implementation guide contains common FHIR assets for use in US-based CQFramework content IGs, including the USCore-ModelInfo and USCommon libraries.
The continuous integration build of this implementation guide is available here:
http://build.fhir.org/ig/cqframework/cqf-us
Commits to this repository will automatically update the above site.
Adding new content to this IG involves several steps. There is multiple ways for many of the steps, this small guide should highlight one path for adding a new Questionnaire:
input/resources/questionnaire
). An example for the form in #1 can be found at herehttp://hl7.org/fhir/StructureDefinition/cqf-library
to the Questionnaire with the canonical value of the related CQL library as 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 is responsible for determining the content of the initial value for this iteminput/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. sh _refresh.sh
and watch multiple things happening automatically:
input/bundles/questionnaires
, a new folder with the Questionnaire name shows up and is filled with a bundle containing the FHIR Library with the CQL content and the related dependency libraries. $populate
$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. The folder _fsh is not used for IG generation, instead, it is there to store the fsh files that were the basis for manual translation (e.g. by using FSHOnline) into the JSON Questionnaires that should subsequently be automatically populated by CQL initial expressions. For instance, the content of the FSH file "input/_fsh/MBODAQuestionnaire.fsh" is copied to the FSHOnline tool and the resulting JSON File is manually stored into "input/resources/questionnaire/MBODAQuestionnaire.json".
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 within the Questionnaire.json element cql-library extension, a wrong or non-existent library name is defined. define "Practitioner's phone"
will fail and must be renamed to define "Practitioner phone"
.