From 53cfe0f16820d6aabeb593923dde9fe00d40c248 Mon Sep 17 00:00:00 2001 From: LaurenD Date: Fri, 6 Dec 2024 13:29:20 -0500 Subject: [PATCH 1/2] Updates for validation --- synthea/qpp_qicore.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/synthea/qpp_qicore.yaml b/synthea/qpp_qicore.yaml index 0c6e9e4..b930c88 100644 --- a/synthea/qpp_qicore.yaml +++ b/synthea/qpp_qicore.yaml @@ -1,5 +1,5 @@ --- -name: QI Core - 130 minimal and QPP +name: QI Core - QPP applicability: true customValueSets: @@ -119,7 +119,7 @@ actions: profiles: - http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-devicerequest fields: - - location: DeviceRequest.code.reference + - location: DeviceRequest.codeReference.reference value: $findRef([Device]) - location: DeviceRequest.authoredOn value: $getField([Device.manufactureDate]) # manufacture time is set 3 weeks before device model's start, so this is close enough @@ -127,6 +127,8 @@ actions: value: completed - location: DeviceRequest.intent value: order + - location: DeviceRequest.subject.reference + value: $findRef([Patient]) # Creating one AdverseEvent per patient - resourceType: AdverseEvent based_on: @@ -136,6 +138,10 @@ actions: fields: - location: AdverseEvent.event.coding value: $randomCode([http://hl7.org/fhir/ValueSet/adverse-event-type]) # may change in future to use a smaller subset of the ValueSet + - location: AdverseEvent.subject.reference + value: $findRef([Patient]) + - location: AdverseEvent.actuality + value: $randomCode([http://hl7.org/fhir/ValueSet/adverse-event-actuality,code]) # Creating one Communication per patient - resourceType: Communication based_on: @@ -177,3 +183,6 @@ actions: value: $randomCode([http://hl7.org/fhir/ValueSet/task-code]) # randomize based on values available - location: Task.executionPeriod value: $getField([Procedure.performed]) + - location: Task.intent + value: $randomCode([http://hl7.org/fhir/ValueSet/task-intent,code]) + From 52c586be3eadafc7b9ea0488cd4ee060004d0f51 Mon Sep 17 00:00:00 2001 From: LaurenD Date: Fri, 13 Dec 2024 16:11:31 -0500 Subject: [PATCH 2/2] Update synthea README to describe validation & testing against measures --- synthea/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/synthea/README.md b/synthea/README.md index 896f8de..9b18f98 100644 --- a/synthea/README.md +++ b/synthea/README.md @@ -9,6 +9,21 @@ The [Synthea](https://github.com/synthetichealth/synthea) project can be used to - You may also use the flexporter standalone to map an existing exported file: `./run_flexporter -fm {mapping file location} -s {source fhir file}`. - See the [flexporter documentation](https://github.com/synthetichealth/synthea/wiki/Flexporter) for additional information on the flexporter, mapping file, and limitations. +## Validation and Testing +1. Set up updated Synthea functionality +- Functionality from https://github.com/synthetichealth/synthea/pull/1527 is required to run the flexporter, and functionality from https://github.com/synthetichealth/synthea/pull/1540 is required for more diversity in calculations while testing. If not merged, recommend pulling one PR and cherry picking the other. +- On your local instance of synthea: in src/main/resources/synthea.properties, uncomment line 301 in order to use the terminology server, and set `exporter.fhir.us_core_version = 3.1.1`. +- Run synthea with the flexporter to generate patient files. Use -p to specify the number of patients, i.e. `./run_synthea -fm ../../bulk-export-server/synthea/qpp_qicore.yaml -p 10` + +2. Use HAPI FHIR validator to validate the patients. +- Use https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/releases/latest/download/validator_cli.jar +- Run with the following options `java -jar validator_cli.jar synthea/output/fhir/ -version 4.0.1 -html-output validation.html -ig http://hl7.org/fhir/us/qicore/ImplementationGuide/hl7.fhir.us.qicore%7C4.1.1 -extension any -display-issues-are-warnings -sct us -clear-tx-cache` +- Most issues are solved by these settings, but some remaining issues that don’t effect calculation may include: "Unknown code 'X9999-"* from the loinc code set + +3. Use fqm-execution (or testify) to calculate output patients against measures +- Example run: `run cli -- reports -m CMS130-bundle.json --patients-directory ../synthea/output/fhir/ --trust-meta-profile true -o -s 2024-01-01 -e 2024-12-31 --report-type summary` +- This will give a summary of how many patients fall into each population. For CMS130, there is the expectation of some level of diversity in which populations synthea patients fall into. Other measures may have less diversity in calculated populations until we do further investigation into aligning synthea codes with measure codes. + ## Building the Mapping File Quality Measurement calculation requires data conformant with qicore, an expansive IG, which would require expansive effort to fully map. As such, we can piecemeal address the IG requirements by supporting requirements for individual measures. The recommended process for creating a mapping that addresses a set of measures is: