Clinical Decision Support for Chronic Pain Management and Shared Decision-Making IG
0.1.0 - CI Build

Clinical Decision Support for Chronic Pain Management and Shared Decision-Making IG - Local Development build (v0.1.0). See the Directory of published versions

Logic

Introduction

This page provides a summary of the logic used by the CDS For Chronic Pain Management Pain Manager application, and details how the cql is processed and prepared for inclusion and usage in the applications.

PainManagerAll.cql

PainManagerAll.cql is the main CQL logic in the Pain Manager application. PainManagerAll uses the other cql files to gather and process the necessary information to enable Pain Manager to display results for the patient including answers to MyPAIN questions.

Translating CQL to ELM for use in Pain Manager

Pain Manager uses ELM files to process the resources retrieved from the FHIR server. The ELM files that do this already exist in the Pain Manager repository, but changes may be made, and the ELM files regenerated. To prepare the CQL files for use in Pain Manager requires translating them into ELM. This is done using the clinical_quality_language cql-to-elm translator. Download and set up the translator by following the instructions in the repository. Once the clinical_quality_language has been set up it can be utilized by calling the translator as follows:

cd /mnt/d/Projects/clinical_quality_language/Src/java
./cql-to-elm/build/install/cql-to-elm/bin/cql-to-elm --input /mnt/d/Projects/pain/src/cql/r4/PainManagerAll.cql -f JSON

This puts the ELM results (PainManagerAll.json) to the same directory as the cql file. If a different location for the output is desired, just use the output option.

--output /mnt/d/file/location

There are other options available that can be discovered by reading the OVERVIEW.MD file.