Skip to content

Capt-Mac/fhir-patient-generator

 
 

Repository files navigation

FHIR Patient Generator

A tool for generating eCQM-specific patient data using Synthea™

Table of Contents

Prerequisites

Developer Quickstart

NOTE: This tool is only compatible with fhir-bundle-calculator version 4.0.0 or higher:

npm install -g fhir-bundle-calculator
calculate-bundles --version
# should ouput 4.x.x

Installation

git clone https://github.com/projecttacoma/fhir-patient-generator
cd fhir-patient-generator

Usage

As a CI tool in the connectathon repository

make MEAUSRE_DIR/path/to/measure/dir CI_TOOL=true

Running Standalone

make MEASURE_DIR=/path/to/measure/dir CALC_TYPE=<fqm|http> PATIENT_COUNT=10

MEASURE_DIR is the relative path to the directory in fhir-patient-generator for the desired measure. Currently supported measures:

  • EXM_104
  • EXM_105
  • EXM_124
  • EXM_125
  • EXM_130

CALC_TYPE tells fhir-bundle-calculator which engine to use for measure calculation. The default is fqm-execution, which is also what will be used if CALC_TYPE=fqm is specified. To use cqf-ruler instead, specify CALC_TYPE=http after the make command.

PATIENT_COUNT specifies the number of (live) Synthea patients to generate for each measure. Actual patient counts will vary because Synthea doesn't count dead patients during generation.

Examples

# Generate R4 patient data for EXM130
make MEASURE_DIR=EXM_130

Generation and Calculation

The Makefile in fhir-patient-generator consolidates the following dependencies and links them together to eventually output patient data along with calculation statistics.

  • Abacus Synthea Fork: Used for generating measure-specific patient data
  • cqf-ruler: Used for running calculation and getting MeasureReport resources
  • Connectathon repository: Used for loading cqf-ruler with needed ValueSet, Library, and Measure resources
  • fhir-bundle-calculator: Command line utility for requesting and interpreting calculation results
  • fqm-execution: Command line utility/Typescript library for calculating FHIR-based eCQMs against FHIR-based patients

The following diagram depicts the operations that each utility is responsible for and the order in which they are executed:

Sequence Diagram

Existing Patient Data

We have published patient data for all supported measures in both R4 and STU3, which can be found in the <measure-directory>/patients-r4 and <measure-directory>/patients-stu3 for all supported measures.

Pre-loading a Docker Image

fhir-patient-generator also supports loading and tagging a Docker image with patient data for a specific measure, not including ValueSets. This image will be published to the Tacoma Docker organization

make MEASURE_DIR=/path/to/measure/dir VERSION=x.y.z preload

This command will tag and push tacoma/cqf-ruler-preloaded:x.y.z to Dockerhub.

Examples

# Publish preloaded image with EXM130 R4 data under tag 1.0.0
make MEASURE_DIR=EXM_130 VERSION=1.0.0 preload

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 86.2%
  • Shell 13.8%