This directory includes example CQL files that showcase specific types of eCQM logic. The measure bundles are auto-generated using the ecqm-bundler CLI.
Targets for bundling existing CQL files exist in the Makefile.
The Makefile also includes a target for starting up an instance of cql-translation-service, which is required for ecqm-bundler to translate CQL.
package.json has a script for building all of the measures within the test/integration directory:
npm run build:test-dataBy default, the only bundles that will be built are ones whose CQL files contain local changes (this is detected with a git status command). To bypass this and force rebuild all bundles including ones whose underlying CQL is not modified:
FORCE=true npm run build:test-dataIndividual measure bundles can be built with the Makefile in the test/integration directory. This requires ecqm-bundler to be installed globally:
npm install -g ecqm-bundlerTo build a specific measure, use the make target corresponding to that measure's directory. For example:
make .start-translator # only necessary if one is not already running
make proportion-boolean # builds only the measure bundle for the logic in the proportion-boolean/ directorySee the document on naming conventions agreed upon for the integration tests for more context on directory and file names.
To get started creating a new measure bundle, first create the directory structure and the content of the actual CQL:
.
├── Makefile
├── README.md
└── [scoring-code]-[population-basis]
└── cql
└──[scoring-code]-[population-basis].cql
Next, add a target to the Makefile with the necessary ecqm-bundler command to generate the measure bundle. See the ecqm-bundler documentation for more information.
# ...
[scoring-code]-[population-basis]:
ecqm-bundler -c $dir/cql/[scoring-code]-[population-basis].cql [... other options ...]
# ...The new test case can now be generated using either the npm script or the make target approaches defined above.