Skip to content

Commit

Permalink
Initial commit of content in preparation for the 2023 AU measures
Browse files Browse the repository at this point in the history
  • Loading branch information
brynrhodes committed Apr 4, 2023
0 parents commit e36d667
Show file tree
Hide file tree
Showing 1,478 changed files with 834,564 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/java-8/.devcontainer/base.Dockerfile

FROM mcr.microsoft.com/vscode/devcontainers/java:0-8

# [Option] Install Maven
ARG INSTALL_MAVEN="false"
ARG MAVEN_VERSION=""
# [Option] Install Gradle
ARG INSTALL_GRADLE="false"
ARG GRADLE_VERSION=""
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
&& if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="lts/*"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

RUN apt-get update && apt-get -y install python3 python3-pip gosu openssl wget graphviz
RUN pip3 install --upgrade requests zulip

ENV PATH="/usr/local/rvm/bin:/usr/local/rvm/rubies/ruby-2.5.1/bin:${PATH}"
RUN gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
curl -L get.rvm.io | bash -s stable && \
rvm install 2.5.1 && \
gem install jekyll jekyll-asciidoc

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/java-8
{
"name": "Java 8",
"build": {
"dockerfile": "Dockerfile",
"args": {
"INSTALL_MAVEN": "false",
"INSTALL_GRADLE": "false",
"NODE_VERSION": "12"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"java.home": "/docker-java-home",
"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
"java.configuration.runtimes": [{
"default": true,
"name": "JavaSE-1.8",
"path": "/usr/local/sdkman/candidates/java/current"
}]
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"cqframework.cql",
"ritwickdey.liveserver"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [ 3000 ],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
input-cache/
output/
temp/
template/
/bundles/measure/BreastCancerScreeningFHIR/BreastCancerScreeningFHIR-files
/bundles/measure/CLONE124/CLONE124-files
/bundles/measure/CMS104/CMS104-files
/bundles/measure/CMS111/CMS111-files
/bundles/measure/CervicalCancerScreeningFHIR/CervicalCancerScreeningFHIR-files
/bundles/measure/ChlamydiaScreeningforWomenFHIR/ChlamydiaScreeningforWomenFHIR-files
/bundles/measure/ColorectalCancerScreeningsFHIR/ColorectalCancerScreeningsFHIR-files
/bundles/measure/ControllingHighBloodPressureFHIR/ControllingHighBloodPressureFHIR-files
/bundles/measure/DiabetesHemoglobinA1cHbA1cPoorControl9FHIR/DiabetesHemoglobinA1cHbA1cPoorControl9FHIR-files
/bundles/measure/DischargedonAntithromboticTherapyFHIR/DischargedonAntithromboticTherapyFHIR-files
/bundles/measure/EXM111/EXM111-files
/bundles/measure/EXM124/EXM124-files
/bundles/measure/FHIR CCDE - Lookback/FHIR CCDE - Lookback-files
/bundles/measure/FHIR347/FHIR347-files
/bundles/measure/HybridHWRFHIR/HybridHWRFHIR-files
/bundles/measure/PrimaryCariesPreventionasOfferedbyPCPsincludingDentistsFHIR/PrimaryCariesPreventionasOfferedbyPCPsincludingDentistsFHIR-files
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
}
61 changes: 61 additions & 0 deletions QICoreUpdateProcess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# QICore Update Process

This document describes the process of updating a pure FHIR-based measure to a QICore-based measure

## Extract MAT Bundle

Place the MAT export in the bundles\mat directory and extract the contents into a sub-folder. For example:

```
bundles\mat\CMS143FHIR-v0-0-003-FHIR-4-0-1\CMS143FHIR-v0-0-003-FHIR-4-0-1.json
```

Use the CQFTooling ExtractMatBundle operation to extract the contents of the bundle:

```
java -jar input-cache\tooling-1.4.1-SNAPSHOT-jar-with-dependencies.jar -ExtractMatBundle bundles\mat\CMS143FHIR-v0-0-003-FHIR-4-0-1\CMS143FHIR-v0-0-003-FHIR-4-0-1.json
```

## Revert FHIR-based Library Changes

Revert the changes to the following CQL libraries, because they are the FHIR-based versions and we do not want those, there are QICore versions already in the repository:

1. FHIRHelpers
2. QICoreCommon

## Copy Primary Measure Library

Copy the primary measure library and rename it using the QICore4 postfix:

```
input\cql\POAGOpticNerveEvaluationQICore4.cql
```

## Update Primary Measure Library

1. Open the QICore named file
2. Update the postfix on the library name from FHIR to QICore4
3. Update the using statement to `using QICore version '4.1.1'`
3. Update the version of the FHIRHelpers reference to 4.0.013 (the current version for QICore support in this repository)
4. Change the SupplementalDataElementsFHIR4 reference to SupplementalDataElementsQICore4
5. Change the MATGlobalCommonFunctionsFHIR4 reference to MATGlobalCommonFunctionsQICore4
6. Remove the reference to FHIRCommon
7. Update references to MATGlobalCommonFunctionsFHIR4 functions that were moved to QICoreCommon:
1. Normalize Interval -> ToInterval
1. Abatement Period -> ToAbatementInterval
1. Prevalence Period -> ToPrevalenceInterval
1. Has Start -> HasStart
1. Has End -> HasEnd
1. Latest -> Latest
1. Earliest -> Earliest
1. Interval To Day Numbers -> Interval To Day Numbers
1. Days in Period -> Days in Period
8. Update references to QICore profiles (https://hl7.org/fhir/us/qicore/profiles.html)
1. Note that when the intent is looking for negation, use the negation profile: https://hl7.org/fhir/us/qicore/#negation-rationale
1. Note that for QICore profiles, the profiles will enforce any "fixed" constraints, so you don't need to check those values (for example status = 'not-done' in a negation profile isn't necessary because the profile enforces that specifically)
9. Update references to extensions that are using the extension functions to the element names (the "slice name" of the extension element defined in the profile)





109 changes: 109 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# ecqm-content-qicore-2023
eCQM Measure Content (Using QICore 4.1.1, based on FHIR R4 v4.0.1)

These draft FHIR-based measures and shared libraries are translated from the QDM-based versions of eCQMs to be published in May 2023 for the 2024 reporting year, and have specific versions, especially for the shared libraries, appropriate to the content for that publication update.

Commits to this repository will automatically trigger a build of the continuous integration build, available here:

https://build.fhir.org/ig/cqframework/ecqm-content-qicore-2023

## Authoring

To author content in this implementation guide, you can use either the Atom CQL Plugin, or the VS Code CQL Plugin. Both plugins will enable you to author, validate, and execute FHIR-based eCQM content.

NOTE: The Atom Editor is being sunsetted, as such we recommend use of the VS Code Plugin
For instructions on setting up your environment to use the Atom CQL Plugin, see the [Atom CQL Support Readme](https://github.com/cqframework/atom_cql_support/blob/master/README.md).

For instructions on setting up your environment to use the VS Code Plugin, see the [VS Code CQL Support Readme](https://github.com/cqframework/vscode-cql/blob/master/README.md)

## Content Index

The following table provides an index to the currently available library content in this implementation guide:

### Shared Libraries

|Library|Version|Status|Development Status|
|----|----|----|----|
|[AdultOutpatientEncountersQICore4](input/cql/AdultOutpatientEncountersQICore4.cql)|2.0.000|Active|TODO|
|[AdvancedIllnessandFrailtyExclusionQiCore4](input/cql/AdvancedIllnessandFrailtyExclusionQICore4.cql)|5.0.000|Active|TODO|
|[CumulativeMedicationDurationQICore4](input/cql/CumulativeMedicationDurationQICore4.cql)|2.0.000|Active|Converted|
|[FHIRCommon](input/cql/FHIRCommon.cql)|4.0.012|Active|Converted|
|[FHIRHelpers](input/cql/FHIRHelpers.cql)|4.0.012|Active|Converted|
|[HospiceQICore4](input/cql/HospiceQICore4.cql)|2.0.000|Active|TODO|
|[MATGlobalCommonFunctionsQICore4](input/cql/MATGlobalCommonFunctionsQICore4.cql)|7.0.000|Active|Converted|
|[SupplementalDataElementsQICore4](input/cql/SupplementalDataElementsQICore4.cql)|3.0.000|Active|Converted|

### Measure Libraries

// TODO: Update these with content from the 2023 AU publication packages

|Library|Version|Status|Development Status|
|----|----|----|----|
|[EXM124v7QICore4](input/cql/EXM124v7QICore4.cql)|7.0.000|Draft|TODO|
|[EXM165v8QICore4](input/cql/EXM165v8QICore4.cql)|8.5.000|Draft|TODO|

## Repository Structure

It is setup like any HL7 FHIR IG project but also includes the CQL files and test data which means the file structure will be as follows:

```
|-- _genonce.bat
|-- _genonce.sh
|-- _refresh.bat
|-- _refresh.sh
|-- _updatePublisher.bat
|-- _updatePublisher.sh
|-- _updateCQFTooling.bat
|-- _updateCQFTooling.sh
|-- ig.ini
|-- bundles
|-- MAT
|--EXM124bundle files
|-- measure
|--EXM124
|-- input
|-- ecqm-content-qicore-2020.xml
|-- cql
|-- EXM124.cql
|-- pagecontent
|-- resources
|-- library
|-- EXM124.json
|-- measure
|-- EXM124.json
|-- tests
|-- measure
|-- EXM124
|-- denom-EXM124
|-- ...
|-- vocabulary
|-- valueset
```

## Extracting MAT Packages

The CQF Tooling provides support for extracting a MAT exported package into the
directories of this repository so that the measure is included in the published
implementation guide. To do this, place the MAT export files (unzipped) in a
directory in the `bundles\mat` directory, and then run the following tooling
command:

```
[tooling-jar] -ExtractMatBundle bundles\mat\[bundle-directory]\[bundle-file]
```

For example:

```
input-cache\tooling-1.3.1-SNAPSHOT-jar-with-dependencies.jar -ExtractMATBundle bundles\mat\CLONE124_v6_03-Artifacts\measure-json-bundle.json
```

## Refresh IG Processing

The CQF Tooling provides "refresh" tooling that performs the following functions:

* Translates and validates all CQL source files
* Packages CQL and ELM content in the corresponding FHIR resources
* Refreshes generated content for each knowledge artifact (Library, Measure, PlanDefinition, ActivityDefinition) including parameters, dependencies, and effective data requirements

Then run the `_refresh` command to refresh the implementation guide content with the new content, and then run `_genonce` to run the publication tooling on the implementation guide (the same process that the continuous integration build uses to publish the implementation guide when commits are made to this repository).
18 changes: 18 additions & 0 deletions _extractMATBundle.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@ECHO OFF
SET tooling_jar=tooling-1.4.1-SNAPSHOT-jar-with-dependencies.jar
SET input_cache_path=%~dp0input-cache
SET mat_bundle=bundles\mat\NMyCMS1028\NMyCMS1028.json

SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

IF EXIST "%input_cache_path%\%tooling_jar%" (
ECHO running: JAVA -jar "%input_cache_path%\%tooling_jar%" -ExtractMatBundle %mat_bundle%
JAVA -jar "%input_cache_path%\%tooling_jar%" -ExtractMatBundle %mat_bundle%
) ELSE If exist "..\%tooling_jar%" (
ECHO running: JAVA -jar "..\%tooling_jar%" -ExtractMatBundle %mat_bundle%
JAVA -jar "..\%tooling_jar%" -ExtractMatBundle %mat_bundle%
) ELSE (
ECHO Tooling JAR NOT FOUND in input-cache or parent folder. Please run _updateCQFTooling. Aborting...
)

PAUSE
22 changes: 22 additions & 0 deletions _extractMATBundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
#DO NOT EDIT WITH WINDOWS
tooling_jar=tooling-1.3.1-SNAPSHOT-jar-with-dependencies.jar
input_cache_path=./input-cache
mat_bundle=/Users/mholck/Development/ecqm-content-r4/bundles/mat/EXM506_v6_02_Artifacts/measure-json-bundle.json

set -e

tooling=$input_cache_path/$tooling_jar
if test -f "$tooling"; then
echo Extracting bundle $mat_bundle
java -jar $tooling -ExtractMatBundle $mat_bundle

else
tooling=../$tooling_jar
echo $tooling
if test -f "$tooling"; then
java -jar $tooling -ExtractMatBundle $mat_bundle
else
echo cqf Tooling jar NOT FOUND in input-cache or parent folder. Please run _updateCQFTooling. Aborting...
fi
fi
2 changes: 2 additions & 0 deletions _gencontinuous.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
CALL ./_genonce.bat -watch
2 changes: 2 additions & 0 deletions _gencontinuous.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
./_genonce.sh -watch
27 changes: 27 additions & 0 deletions _genonce.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@ECHO OFF
SET publisher_jar=publisher.jar
SET input_cache_path=%CD%\input-cache

ECHO Checking internet connection...
PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
ECHO We're offline...
SET txoption=-tx n/a
GOTO igpublish

:isonline
ECHO We're online
SET txoption=

:igpublish

SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

IF EXIST "%input_cache_path%\%publisher_jar%" (
JAVA -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% %*
) ELSE If exist "..\%publisher_jar%" (
JAVA -jar "..\%publisher_jar%" -ig . %txoption% %*
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

PAUSE
30 changes: 30 additions & 0 deletions _genonce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
publisher_jar=publisher.jar
input_cache_path=./input-cache/
echo Checking internet connection...
curl -sSf tx.fhir.org > /dev/null

if [ $? -eq 0 ]; then
echo "Online"
txoption=""
else
echo "Offline"
txoption="-tx n/a"
fi

echo "$txoption"

export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8"

publisher=$input_cache_path/$publisher_jar
if test -f "$publisher"; then
java -jar $publisher -ig . $txoption $*

else
publisher=../$publisher_jar
if test -f "$publisher"; then
java -jar $publisher -ig . $txoption $*
else
echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
fi
fi
Loading

0 comments on commit e36d667

Please sign in to comment.