Adds syntax highlighting, semantic (error) highlighting, and local execution to CQL files in Atom, a free and open source editor.
The cql-language package has been published to the Atom package repository, so installation is simple:
After you've installed the cql-language package, open any .cql file in Atom. As long as the file has the .cql extension, syntax and error highlighting will be automatically applied.
To execute CQL right-click in the CQL Editor Windows and select
CQL -> Execute or press
The translation and execution capabilities in the plugin expect CQL files to be in the following directories, by convention:
input/cqlinput/testsinput/tests/<cql-library-name>input/tests/<cql-library-name>/<patient-id>input/tests/<cql-library-name>/<patient-id>/<resource-type-name>/<resource files> // flexible structureinput/vocabulary/codesysteminput/vocabulary/valueset
Within the tests folder, there is a folder for each CQL library, by name (note that the name of the file must match the name of the library in order for the evaluator to properly execute the CQL). Note also that the evaluator is a separate subsystem from the translator, so it will read whatever is current of off disk, so be sure to save before executing.
Within the library folder, there is a folder for each "test case", in the form of a Patient (the execution only supports patient context execution at this point). The folder must have the same id as the patient (that's how the evaluator knows what the patient id is).
Within each test case folder are the resources for that specific test case. The resource files can be provided either directly in this folder, or they can be organized into folders by resource type name. Whether they are in the test folder or in subfolders, resources can be provided as bundles (included nested bundles), or as separate files, and in either XML or JSON format. If a Patient is provided, the id element of the Patient resource must match the name of the test case folder.
The Clinical Quality Language (CQL) is a domain specific language for expressing electronic clinical quality measures (eCQM) and clinical decision support rules (CDS) in an author-friendly computable format. Find out more about CQL:
npm install -g yarn
yarn installin the root directory to install dependencies
apm linkto create a symbolic link from the git directories to the working directory
Copyright 2014 - 2015 The MITRE Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.