Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Maven Central Build Status docker image project chat

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


Public Sandbox

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:


Open API Docs

Swagger UI


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.

Swagger / Open API

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.

Example Operations

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.



Git Submodules

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

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 and download the latest (version 11 or higher) JDK for your platform, and install it.

Apache Maven

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.

Getting Help

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

Related Projects

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.

CQL Evaluator - Provides the CQL execution environment 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.


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

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.