NOTICE: The maintainers of the cqf-ruler (Alphora) and Smile Digital Health have merged! All the functionality in the cqf-ruler is in the process of being migrated upstream to the hapi-fhir-jpaserver-starter project
The cqf-ruler is based on the HAPI FHIR JPA Server Starter and adds a set of plugins that provide an implementation of FHIR's Clinical Reasoning Module, serve as a knowledge artifact repository, and a cds-hooks compatible clinical decision support service. The cqf-ruler provides an extensibility API to allow adding custom FHIR operations without the need to fork or clone the entire project.
See the wiki for more information
The public sandbox is not persistent, has no authentication, and is regularly reset. Do not store any sensitive data, PHI, or anything you need to be persistent on the sandbox:
The easiest way to get started with the cqf-ruler is to pull and run the docker image.
For avoiding to run docker container by default root user permission, the container from this image will run with a user named cqfruler
docker pull alphora/cqf-ruler
docker run -p 8080:8080 alphora/cqf-ruler
This will make the cqf-ruler available on http://localhost:8080
Other options for deployment are listed on the wiki for more documentation.
The cqf-ruler provides the HAPI FHIR Tester UI which allows FHIR Resource CRUD at the server base url. That's http://localhost:8080 if you're running with the Docker command above.
The cqf-ruler provides Swagger UI for the REST API and test interface at http://localhost:8080/fhir/swagger-ui/.
Similarly, Open API docs are available at http://localhost:8080/fhir/api-docs.
The wiki provides walkthroughs of several of the features of the cqf-ruler such as Quality Measure Processing.
In general, you need to load the cqf-ruler with FHIR Resources prior to using it. One way to do this is to start a cqf-ruler server and use the FHIR REST API to load resources. See Resource Loading on the wiki for a description of how to do that.
This project includes the hapi-fhir-jpaserver-starter
project as a submodule and includes the compiled classes as a jar called cqf-ruler-external
. Be sure to use the following command when cloning this repository to ensure the submodules are initialized correctly:
git clone --recurse-submodules https://github.com/DBCG/cqf-ruler.git
or if you've already checked out the repo, use
git submodule update --init --recursive
to clean up any unneeded or unused files, use:
git clean -fdx
Go to http://www.oracle.com/technetwork/java/javase/downloads/ and download the latest (version 11 or higher) JDK for your platform, and install it.
This project uses the Maven wrapper to ensure the correct version of Maven is available on your machine. Use ./mvnw
to invoke it.
./mvnw package
To run the cqf-ruler directory from this project use:
java -jar server/target/cqf-ruler-server-*.war
See Contributing on the wiki for more information about developing and contributing to the cqf-ruler project.
The cqf-ruler offers a basic plugin framework to allow the addition of custom FHIR operations. See Plugins on the wiki for more information.
A complete example of a dynamically loaded plugin is available in the example directory.
See Architecture on the wiki.
Additional documentation is on the wiki.
Bugs and feature requests can be filed with Github Issues.
The implementers are active on the official FHIR Zulip chat for CQL.
Inquires for commercial support can be directed to info@alphora.com.
HAPI FHIR - Provides the FHIR API and server upon which the cqf-ruler is built.
Clinical Quality Language - Tooling in support of the CQL specification, including the CQL verifier/translator used in this project.
CQF Clinical Reasoning - Provides the CQL and Clinical Reasoning support used by the cqf-ruler.
CQF Tooling - Provides several operations that the cqf-ruler exposes are services, such as $refresh-generated content.
CQL Support for VS Code - CQL IDE plugin with syntax highlighting, linting, and local CQL evaluation.
Several operations that once were built and exposed in the cqf-ruler have since migrated upstream into Clinical-Reasoning and exposed in versions of Hapi-Fhir & Hapi-Fhir-JpaServer-Starter.
This table maintains a current view of what operations have migrated out of this project and which are remaining.
- Migrated = source code in Clinical-Reasoning
- To Do = source code in Cqf-Ruler
Plugin | ResourceType | Operation | Status |
---|---|---|---|
CR | Measure | $evaluate-measure | migrated |
CR | Measure | $submit-data | migrated |
CR | Measure | $care-gaps | migrated |
CR | Measure | $data-requirements | migrated |
CR | Measure | $collect-data | migrated |
CR | PlanDefinition | $apply | migrated |
CR | PlanDefinition | $package | migrated |
CR | ActivityDefinition | $apply | migrated |
CPG | N/A | $cql | migrated |
CPG | Library | $evaluate | migrated |
SDC | Questionnaire | $package | migrated |
SDC | Questionnaire | $populate | migrated |
SDC | QuestionnaireResponse | $extract | migrated |
SDC | Observation | $transform | dropped1 |
RA | Measure | $davinci-ra.evaluate-measure | dropped2 |
Case-Reporting | MeasureReport | $extract-line-list-data | To do |
Case-Reporting | N/A | $process-message-bundle | To do |
ERSD | N/A | $ersd-v2-to-v1-transform | To do |
cds-hooks | N/A | discovery and service | In progress |
1 This was a provisional operation in the SDC Ig that has been removed
2 The RA IG has evolved significantly and this operation needs to be reimplemented.
Copyright 2019+ Dynamic Content Group, LLC (dba Alphora)
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
http://www.apache.org/licenses/LICENSE-2.0
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.