Conversion tool for QPP, particularly focused on QRDA3 -> QPP, built by Flexion.
Switch branches/tags
Clone or download
Latest commit de2616e Sep 18, 2018
Failed to load latest commit information.
.circleci Finish support for integration profile Jul 2, 2018
.github Add Clyde to CODEOWNER file Jul 18, 2018
commandline Fix tests Aug 21, 2018
commons Merge branch 'develop' into story-867 Sep 18, 2018
converter Merge branch 'develop' into story-867 Sep 18, 2018
frontend Update the release for all POMs and the frontend json file Jul 9, 2018
generate Update the release for all POMs and the frontend json file Jul 9, 2018
qpp-data-restoration Update the release for all POMs and the frontend json file Jul 9, 2018
qrda-files QPPCT-405: remove extraneous dir Oct 18, 2017
rest-api Use correct naming conventions for entityId and practiceId Sep 17, 2018
sample-files QPPCT-629: find node generation priority Jan 26, 2018
test-commons Merge branch 'develop' of Jul 18, 2018
tools Fix versions Apr 4, 2018
.env QPPCT-656: allow system property override of default CPC email address Feb 8, 2018
.gitattributes Update .gitattributes Apr 10, 2018
.gitignore Remove benchmark from .gitignore May 16, 2018
.python-version add python version file (#215) Jul 31, 2017 QPPCT-668: remove localstack Feb 15, 2018
Dockerfile Main Dockerfile ignores code coverage tests Sep 27, 2017
DockerfileTest Refactor dos2unix run Mar 28, 2018 Merge branch 'develop' into story-867 Sep 18, 2018
LICENSE Creating a license file May 22, 2017
Procfile QPPCT-183: Run docker in the foreground Jul 24, 2017 Change all error messages and public documentation to use PI(Promotin… Aug 7, 2018
checkstyle.xml Checkstyle fixes in converter/main Feb 5, 2018
convert.bat Fix convert.bat always rebuilding jars Aug 30, 2017 Update helper script to check commandline.jar Sep 25, 2017
docker-compose.test.yaml QPPCT-352 : Add new test docker compose file, dockerfile and test script Sep 22, 2017
docker-compose.yaml Add always restart Oct 2, 2017
pom.xml Revert mockito upgrade Jul 26, 2018 QPPCT-642: Set the Sonar Java source to 8 Mar 2, 2018 QPPCT-199, begin changes for sonarcloud Oct 19, 2017



Installation Instructions

Prerequisite Software

Before you can use the qpp-conversion-tool application, you must install and configure the following products on your machine:

  • Git and/or the GitHub application.

    GitHub's Guide to Installing Git is a good source of information.

  • Java Runtime (version >= 1.8).

    It is important that you have the right version of java on your path.

    # When you run 'java -version', you should get 1.8.XXXXX. For example:
    java -version
    java version "1.8.0_144"

    Sometimes the Java Runtime installer doesn't update your path. So you must do it manually. Alternatively, download and install the Java Development Kit (version >= 1.8). The JDK is better at updating your path.

  • Maven (version >= 3.3).

    Maven is used to build the application, manage dependencies, and run tests. After you unzip the Maven archive, you need to add the bin directory to your path, as described the Maven installation instructions.

    # When you run 'mvn -v', you should get 3.3.X. For example:
    mvn -v
    Apache Maven 3.3.9
  • Docker.

    Docker is not required but is an alternative to the above requirements if all you need is to run the converter.

Getting the Converter

Use the GitHub application or the command line to clone this repository.

# Clone the GitHub repository.
git clone

# Go to the qpp-conversion-tool directory.
cd ./qpp-conversion-tool

Running the Converter

ReST API via Docker

The Conversion Tool can be executed through a ReST API. Using the ReST API has the added benefit of having the QPP validated if you so choose. For the examples below, make sure you're in the qpp-conversion-tool directory.

Starting the API Endpoint

# Build the Docker image and run the container using docker-compose.
docker-compose -f ./docker-compose.test.yaml up

Invoking the Endpoint

curl -X POST \
  http://localhost:3000 \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F file=@./qrda-files/valid-QRDA-III-latest.xml

The response body will either be the QPP JSON on success or error JSON on an error. The HTTP Status will be 201 Created on success or 422 Unprocessable entity on an error.

Submission Validation

While the converter will validate the format of the QRDA-III file and some basic semantics, deeper semantic checks are only available if you enable the public submission validation API. If any errors are found by the public submission validation API, error JSON will be returned from the ReST API like normal.

To enable the public submission validation API, modify the .env file with VALIDATION_URL= and then restart the ReST API endpoint.

Ensure the environment variable CPC_END_DATE is set to a valid date, in the format YYYY-MM-DD, or a validation error may be thrown.

Command Line

For the examples below, make sure you're in the qpp-conversion-tool directory.

Note: If you are using Windows, replace ./ in the examples below with convert.bat.

Convert a File

# Try the convert script. If the JAR isn't built yet, the script will build it for you first.
./ ./qrda-files/valid-QRDA-III-latest.xml

If a QRDA-III XML file is successfully converted, a QPP JSON file is created in the current working directory. The file name will have the same name as the input file but with the extension .qpp.json. For example, valid-QRDA-III-latest.qpp.json.

When an invalid file is provided to the converter, an error JSON file is created in the current working directory. The file name will be the same as the input file but with the extension .err.json. For example, not-a-QRDA-III-file.err.json. This error file contains descriptions and XPaths that help in identifying the errors in the provided input file.

View all commands with

Sample files

Sample QRDA-III files that cover all of the eCQM, PI, and IA measures as well as other scenarios can be found in the sample-files folder.

Want to Contribute?

Want to file a bug or contribute some code? Read up on our guidelines for contributing and developer instructions.

Public Domain

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

See the formal LICENSE file.