4058: Fix JpaPersistedResourceValidationSupport to search for resources that it currently doesn't handle (#4062)

* Add failing and passing tests with bundle JSONs for each scenario based on pared down versions of the following JSON bundle: https://smilecdr.com/docs/fhir_repository/clinical_quality_language/measure-bundle-example.json.html

* Add experimental code to handle cases of "Library" and "Measure". Add a measure report to measure unit test with new JSON with a MeasureReport to Measure resource (can't make it pass yet).

* Refine case statements for JpaPersistedResourceValidationSupport.  MeasureReport test passes if -ea is omitted from run configuration.

* Add changelog.  Remove TODOs from validator.

* Remove erroneous whitespace chance.

* Ken feedback:  Handle SearchParameters from the default case casting a wider net than just Library and Resource.  Assume all CanonicalType inputs to the switch statement have a URL.

* Get rid of TODO since it's not relevant.

* Disable test with only MeasureReport and Measure.  Fix case issue with filenames that was only discovered by running the github pipeline.

* Add more context to the Disabled text, including a reference to a new issue:  https://github.com/hapifhir/org.hl7.fhir.core/issues/930.

* Add more context to the Disabled text, including a reference to a new issue:  https://github.com/hapifhir/org.hl7.fhir.core/issues/930.
This commit is contained in:
Luke deGruchy 2022-09-26 10:08:04 -04:00 committed by GitHub
parent 389bdce372
commit 3435806df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 833 additions and 1 deletions

View File

@ -0,0 +1,4 @@
type: fix
issue: 3124
jira: SMILE-4345
title: "When enabling validation on a fhir_endpoint module, a bundle with a Measure resource referencing a Library resource or a MeasureReport resource referencing a Measure, validation will fail with an IllegalArgumentException complaining about the Library or Measure resource, respectively. The fix ensures that Library and Measure resources are handled correctly and all of validation can proceed with a report of all success and errors."

View File

@ -282,7 +282,11 @@ public class JpaPersistedResourceValidationSupport implements IValidationSupport
break;
}
default:
throw new IllegalArgumentException(Msg.code(952) + "Can't fetch resource type: " + resourceName);
// N.B.: this code assumes that we are searching by canonical URL and that the CanonicalType in question has a URL
SearchParameterMap params = new SearchParameterMap();
params.setLoadSynchronousUpTo(1);
params.add("url", new UriParam(theUri));
search = myDaoRegistry.getResourceDao(resourceName).search(params);
}
Integer size = search.size();

View File

@ -0,0 +1,182 @@
package ca.uhn.fhir.jpa.dao;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.validation.FhirValidator;
import ca.uhn.fhir.validation.ResultSeverityEnum;
import ca.uhn.fhir.validation.SingleValidationMessage;
import ca.uhn.fhir.validation.ValidationResult;
import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain;
import org.hl7.fhir.common.hapi.validation.validator.FhirInstanceValidator;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.Library;
import org.hl7.fhir.r4.model.Measure;
import org.hl7.fhir.r4.model.StructureDefinition;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.test.util.ReflectionTestUtils;
import java.util.function.Predicate;
import static ca.uhn.fhir.util.ClasspathUtil.loadResource;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public class JpaPersistedResourceValidationSupportFromValidationChainTest {
private static final FhirContext ourCtx = FhirContext.forR4();
private IValidationSupport jpaValidator;
@Mock
private DaoRegistry myDaoRegistry;
@Mock
private IFhirResourceDao<StructureDefinition> fhirResourceDaoStructureDefinition;
@Mock
private IFhirResourceDao<Library> fhirResourceDaoLibrary;
@Mock
private IFhirResourceDao<Measure> fhirResourceDaoMeasure;
@Mock
private IBundleProvider search;
@BeforeEach
public void setUp() {
jpaValidator = new JpaPersistedResourceValidationSupport(ourCtx);
ReflectionTestUtils.setField(jpaValidator, "myDaoRegistry", myDaoRegistry);
}
@Test
public void validation_Jpa_Bundle_MeasureReferencesLibraryAndLibrary() {
when(myDaoRegistry.getResourceDao("StructureDefinition")).thenReturn(fhirResourceDaoStructureDefinition);
when(myDaoRegistry.getResourceDao("Library")).thenReturn(fhirResourceDaoLibrary);
when(fhirResourceDaoStructureDefinition.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
when(fhirResourceDaoLibrary.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
ourCtx.setValidationSupport(getValidationSupportWithJpaPersistedResourceValidationSupport());
final Bundle bundleWithBadLibrary = getBundle("/r4/3124-bundle-measure-and-library-post.json");
final FhirValidator validator = getFhirValidator();
final ValidationResult validationResult = validator.validateWithResult(bundleWithBadLibrary);
assertEquals(10, validationResult.getMessages().stream().filter(errorMessagePredicate()).count());
}
@Test
public void validation_Jpa_Bundle_MeasureOnly() {
when(myDaoRegistry.getResourceDao("StructureDefinition")).thenReturn(fhirResourceDaoStructureDefinition);
when(myDaoRegistry.getResourceDao("Library")).thenReturn(fhirResourceDaoLibrary);
when(fhirResourceDaoStructureDefinition.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
when(fhirResourceDaoLibrary.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
ourCtx.setValidationSupport(getValidationSupportWithJpaPersistedResourceValidationSupport());
final Bundle bundleWithMeasureOnly = getBundle("/r4/3124-bundle-measure-only-post.json");
final FhirValidator validator = getFhirValidator();
final ValidationResult validationResult = validator.validateWithResult(bundleWithMeasureOnly );
assertEquals(8, validationResult.getMessages().stream().filter(errorMessagePredicate()).count());
}
@Test
public void validation_Jpa_Bundle_MeasureOnly_NoLibraryReference() {
when(myDaoRegistry.getResourceDao("StructureDefinition")).thenReturn(fhirResourceDaoStructureDefinition);
when(fhirResourceDaoStructureDefinition.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
ourCtx.setValidationSupport(getValidationSupportWithJpaPersistedResourceValidationSupport());
final Bundle bundleWithMeasureOnlyNoLibraryReference = getBundle("/r4/3124-bundle-measure-only-no-library-reference-post.json");
final FhirValidator validator = getFhirValidator();
final ValidationResult validationResult = validator.validateWithResult(bundleWithMeasureOnlyNoLibraryReference);
assertEquals(7, validationResult.getMessages().stream().filter(errorMessagePredicate()).count());
}
@Test
public void validation_Jpa_Bundle_LibraryOnly() {
when(myDaoRegistry.getResourceDao("StructureDefinition")).thenReturn(fhirResourceDaoStructureDefinition);
when(fhirResourceDaoStructureDefinition.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
ourCtx.setValidationSupport(getValidationSupportWithJpaPersistedResourceValidationSupport());
final Bundle bundleWithLibraryOnly = getBundle("/r4/3124-bundle-library-only-post.json");
final FhirValidator validator = getFhirValidator();
final ValidationResult validationResult = validator.validateWithResult(bundleWithLibraryOnly);
assertEquals(2, validationResult.getMessages().stream().filter(errorMessagePredicate()).count());
}
/*
* This is the failure that occurs with this test:
*
* java.lang.AssertionError: Resource is MeasureReport, expected Bundle or Parameters
*
* at org.hl7.fhir.validation.instance.InstanceValidator.validateContains(InstanceValidator.java:4765)
* at org.hl7.fhir.validation.instance.InstanceValidator.checkChildByDefinition(InstanceValidator.java:5130)
*/
@Test
@Disabled("Note that running this test with the -ea VM options triggers an assertion failure. Please refer to this hapi-fhir issue: https://github.com/hapifhir/org.hl7.fhir.core/issues/930. See comment for details on the Exception.")
public void validation_Jpa_Bundle_MeasureReportToMeasure() {
when(myDaoRegistry.getResourceDao("StructureDefinition")).thenReturn(fhirResourceDaoStructureDefinition);
when(myDaoRegistry.getResourceDao("Library")).thenReturn(fhirResourceDaoLibrary);
when(myDaoRegistry.getResourceDao("Measure")).thenReturn(fhirResourceDaoMeasure);
when(fhirResourceDaoStructureDefinition.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
when(fhirResourceDaoLibrary.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
when(fhirResourceDaoMeasure.search(Mockito.any(SearchParameterMap.class))).thenReturn(search);
ourCtx.setValidationSupport(getValidationSupportWithJpaPersistedResourceValidationSupport());
final Bundle bundleWithMeasureReportToReport = getBundle("/r4/3124-bundle-measure-report-to-measure-post.json");
final FhirValidator validator = getFhirValidator();
final ValidationResult validationResult = validator.validateWithResult(bundleWithMeasureReportToReport);
assertEquals(29, validationResult.getMessages().stream().filter(errorMessagePredicate()).count());
}
@NotNull
private static FhirValidator getFhirValidator() {
FhirValidator validator;
final FhirInstanceValidator instanceValidator = new FhirInstanceValidator(ourCtx);
instanceValidator.setNoTerminologyChecks(true);
validator = ourCtx.newValidator();
validator.registerValidatorModule(instanceValidator);
return validator;
}
@NotNull
private static Bundle getBundle(String jsonFilePath) {
return ourCtx.newJsonParser().parseResource(Bundle.class, loadResource(jsonFilePath));
}
@NotNull
private IValidationSupport getValidationSupportWithJpaPersistedResourceValidationSupport() {
return new ValidationSupportChain(
new DefaultProfileValidationSupport(ourCtx),
jpaValidator
);
}
@NotNull
private static Predicate<SingleValidationMessage> errorMessagePredicate() {
return message -> message.getSeverity() == ResultSeverityEnum.ERROR;
}
}

View File

@ -0,0 +1,44 @@
{
"resourceType": "Bundle",
"id": "EXM104-8.2.000-bundle",
"type": "transaction",
"entry": [ {
"resource": {
"resourceType": "Library",
"id": "library-EXM104-8.2.000",
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference": {
"reference": "#cqf-tooling"
}
} ],
"url": "http://fhir.org/guides/dbcg/connectathon/Library/EXM104",
"version": "8.2.000",
"name": "EXM104",
"status": "active",
"experimental": true,
"type": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/library-type",
"code": "logic-library"
} ]
},
"relatedArtifact": [ {
"type": "depends-on",
"resource": "http://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.1"
}, {
} ],
"parameter": [ {
"name": "Measurement Period",
"use": "in",
"min": 0,
"max": "1",
"type": "Period"
} ]
},
"request": {
"method": "PUT",
"url": "Library/library-EXM104-8.2.000"
}
} ]
}

View File

@ -0,0 +1,169 @@
{
"resourceType": "Bundle",
"id": "EXM104-8.2.000-bundle",
"type": "transaction",
"entry": [ {
"resource": {
"resourceType": "Measure",
"id": "measure-EXM104-8.2.000",
"meta": {
"profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm" ]
},
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
"valueCode": "boolean"
}, {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference": {
"reference": "#cqf-tooling"
}
} ],
"url": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM104",
"identifier": [ {
"use": "official",
"system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms",
"value": "104"
} ],
"version": "8.2.000",
"name": "EXM104",
"title": "Discharged on Antithrombotic Therapy",
"status": "active",
"experimental": true,
"date": "2018-09-17",
"publisher": "The Joint Commission",
"contact": [ {
"telecom": [ {
"system": "url",
"value": "https://www.jointcommission.org/en/"
} ]
} ],
"description": "Ischemic stroke patients prescribed or continuing to take antithrombotic therapy at hospital discharge",
"useContext": [ {
"code": {
"code": "program"
},
"valueCodeableConcept": {
"text": "eligible-provider"
}
} ],
"jurisdiction": [ {
"coding": [ {
"system": "urn:iso:std:iso:3166",
"code": "US"
} ]
} ],
"relatedArtifact": [ {
"type": "citation",
"citation": "Adams HP, del Zoppo G, Alberts MJ, Bhatt DL, Brass L, Furlan A, Grubb RL, Higashida RT, Jauch EC, Kidwell C, Lyden PD, Morgenstern LB, Qureshi AI, Rosenwasser RH, Scott PA, Wijdicks E. Guidelines for the Early Management of Adults with Ischemic Stroke: A Guideline From the American Heart Association/American Stroke Association Stroke Council, Clinical CardiologyCouncil, Cardiovascular Radiology and Intervention Council, and the Atherosclerotic Peripheral Vascular Disease and Quality of Care Outcomes in Research Interdisciplinary Working Groups. Stroke. 2007;38:1655-1711."
}, {
"type": "depends-on",
"resource": "Library/library-FHIRHelpers-4.0.1"
}, {
"type": "depends-on",
"resource": "Library/library-MATGlobalCommonFunctions-5.0.000"
}, {
"type": "depends-on",
"resource": "Library/library-SupplementalDataElements-2.0.0"
}, {
"type": "depends-on",
"resource": "Library/library-TJCOverall-5.0.000"
} ],
"library": [ "Library/library-EXM104-8.2.000" ],
"disclaimer": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.",
"scoring": {
"coding": [ {
"system": "http://hl7.org/fhir/measure-scoring",
"code": "proportion"
} ]
},
"type": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-type",
"code": "process"
} ]
} ],
"rationale": "The effectiveness of antithrombotic agents in reducing stroke.",
"clinicalRecommendationStatement": "Clinical trial results suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist",
"improvementNotation": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
"code": "increase"
} ]
},
"guidance": "The \"Non-elective Inpatient Encounter\" value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the \"Inpatient encounter\" value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.\n\nThe \"Medication, Discharge\" datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.",
"group": [ {
"id": "group-1",
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"criteria": {
"language": "text/cql",
"expression": "Initial Population"
}
} ]
} ],
"supplementalData": [ {
"code": {
"text": "sde-ethnicity"
},
"usage": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-data-usage",
"code": "supplemental-data"
} ]
} ],
"criteria": {
"language": "text/cql",
"expression": "SDE Ethnicity"
}
} ]
},
"request": {
"method": "PUT",
"url": "Measure/measure-EXM104-8.2.000"
}
}, {
"resource": {
"resourceType": "Library",
"id": "library-EXM104-8.2.000",
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference": {
"reference": "#cqf-tooling"
}
} ],
"url": "http://fhir.org/guides/dbcg/connectathon/Library/EXM104",
"version": "8.2.000",
"name": "EXM104",
"status": "active",
"experimental": true,
"type": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/library-type",
"code": "logic-library"
} ]
},
"relatedArtifact": [ {
"type": "depends-on",
"resource": "http://hl7.org/fhir/Library/FHIR-ModelInfo|4.0.1"
}, {
} ],
"parameter": [ {
"name": "Measurement Period",
"use": "in",
"min": 0,
"max": "1",
"type": "Period"
} ]
},
"request": {
"method": "PUT",
"url": "Library/library-EXM104-8.2.000"
}
} ]
}

View File

@ -0,0 +1,130 @@
{
"resourceType": "Bundle",
"id": "EXM104-8.2.000-bundle",
"type": "transaction",
"entry": [ {
"resource": {
"resourceType": "Measure",
"id": "measure-EXM104-8.2.000",
"meta": {
"profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm" ]
},
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
"valueCode": "boolean"
}, {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference": {
"reference": "#cqf-tooling"
}
} ],
"url": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM104",
"identifier": [ {
"use": "official",
"system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms",
"value": "104"
} ],
"version": "8.2.000",
"name": "EXM104",
"title": "Discharged on Antithrombotic Therapy",
"status": "active",
"experimental": true,
"date": "2018-09-17",
"publisher": "The Joint Commission",
"contact": [ {
"telecom": [ {
"system": "url",
"value": "https://www.jointcommission.org/en/"
} ]
} ],
"description": "Ischemic stroke patients prescribed or continuing to take antithrombotic therapy at hospital discharge",
"useContext": [ {
"code": {
"code": "program"
},
"valueCodeableConcept": {
"text": "eligible-provider"
}
} ],
"jurisdiction": [ {
"coding": [ {
"system": "urn:iso:std:iso:3166",
"code": "US"
} ]
} ],
"relatedArtifact": [ {
"type": "citation",
"citation": "Adams HP, del Zoppo G, Alberts MJ, Bhatt DL, Brass L, Furlan A, Grubb RL, Higashida RT, Jauch EC, Kidwell C, Lyden PD, Morgenstern LB, Qureshi AI, Rosenwasser RH, Scott PA, Wijdicks E. Guidelines for the Early Management of Adults with Ischemic Stroke: A Guideline From the American Heart Association/American Stroke Association Stroke Council, Clinical CardiologyCouncil, Cardiovascular Radiology and Intervention Council, and the Atherosclerotic Peripheral Vascular Disease and Quality of Care Outcomes in Research Interdisciplinary Working Groups. Stroke. 2007;38:1655-1711."
}, {
"type": "depends-on",
"resource": "Library/library-FHIRHelpers-4.0.1"
}, {
"type": "depends-on",
"resource": "Library/library-MATGlobalCommonFunctions-5.0.000"
}, {
"type": "depends-on",
"resource": "Library/library-SupplementalDataElements-2.0.0"
}, {
"type": "depends-on",
"resource": "Library/library-TJCOverall-5.0.000"
} ],
"disclaimer": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.",
"scoring": {
"coding": [ {
"system": "http://hl7.org/fhir/measure-scoring",
"code": "proportion"
} ]
},
"type": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-type",
"code": "process"
} ]
} ],
"rationale": "The effectiveness of antithrombotic agents in reducing stroke.",
"clinicalRecommendationStatement": "Clinical trial results suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist",
"improvementNotation": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
"code": "increase"
} ]
},
"guidance": "The \"Non-elective Inpatient Encounter\" value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the \"Inpatient encounter\" value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.\n\nThe \"Medication, Discharge\" datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.",
"group": [ {
"id": "group-1",
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"criteria": {
"language": "text/cql",
"expression": "Initial Population"
}
} ]
} ],
"supplementalData": [ {
"code": {
"text": "sde-ethnicity"
},
"usage": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-data-usage",
"code": "supplemental-data"
} ]
} ],
"criteria": {
"language": "text/cql",
"expression": "SDE Ethnicity"
}
} ]
},
"request": {
"method": "PUT",
"url": "Measure/measure-EXM104-8.2.000"
}
} ]
}

View File

@ -0,0 +1,131 @@
{
"resourceType": "Bundle",
"id": "EXM104-8.2.000-bundle",
"type": "transaction",
"entry": [ {
"resource": {
"resourceType": "Measure",
"id": "measure-EXM104-8.2.000",
"meta": {
"profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm" ]
},
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
"valueCode": "boolean"
}, {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference": {
"reference": "#cqf-tooling"
}
} ],
"url": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM104",
"identifier": [ {
"use": "official",
"system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms",
"value": "104"
} ],
"version": "8.2.000",
"name": "EXM104",
"title": "Discharged on Antithrombotic Therapy",
"status": "active",
"experimental": true,
"date": "2018-09-17",
"publisher": "The Joint Commission",
"contact": [ {
"telecom": [ {
"system": "url",
"value": "https://www.jointcommission.org/en/"
} ]
} ],
"description": "Ischemic stroke patients prescribed or continuing to take antithrombotic therapy at hospital discharge",
"useContext": [ {
"code": {
"code": "program"
},
"valueCodeableConcept": {
"text": "eligible-provider"
}
} ],
"jurisdiction": [ {
"coding": [ {
"system": "urn:iso:std:iso:3166",
"code": "US"
} ]
} ],
"relatedArtifact": [ {
"type": "citation",
"citation": "Adams HP, del Zoppo G, Alberts MJ, Bhatt DL, Brass L, Furlan A, Grubb RL, Higashida RT, Jauch EC, Kidwell C, Lyden PD, Morgenstern LB, Qureshi AI, Rosenwasser RH, Scott PA, Wijdicks E. Guidelines for the Early Management of Adults with Ischemic Stroke: A Guideline From the American Heart Association/American Stroke Association Stroke Council, Clinical CardiologyCouncil, Cardiovascular Radiology and Intervention Council, and the Atherosclerotic Peripheral Vascular Disease and Quality of Care Outcomes in Research Interdisciplinary Working Groups. Stroke. 2007;38:1655-1711."
}, {
"type": "depends-on",
"resource": "Library/library-FHIRHelpers-4.0.1"
}, {
"type": "depends-on",
"resource": "Library/library-MATGlobalCommonFunctions-5.0.000"
}, {
"type": "depends-on",
"resource": "Library/library-SupplementalDataElements-2.0.0"
}, {
"type": "depends-on",
"resource": "Library/library-TJCOverall-5.0.000"
} ],
"library": [ "Library/library-EXM104-8.2.000" ],
"disclaimer": "These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.",
"scoring": {
"coding": [ {
"system": "http://hl7.org/fhir/measure-scoring",
"code": "proportion"
} ]
},
"type": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-type",
"code": "process"
} ]
} ],
"rationale": "The effectiveness of antithrombotic agents in reducing stroke.",
"clinicalRecommendationStatement": "Clinical trial results suggest that antithrombotic therapy should be prescribed at discharge following acute ischemic stroke to reduce stroke mortality and morbidity as long as no contraindications exist",
"improvementNotation": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
"code": "increase"
} ]
},
"guidance": "The \"Non-elective Inpatient Encounter\" value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the \"Inpatient encounter\" value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective admissions include emergency, urgent and unplanned admissions.\n\nThe \"Medication, Discharge\" datatype refers to the discharge medication list and is intended to express medications ordered for post-discharge use.",
"group": [ {
"id": "group-1",
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"criteria": {
"language": "text/cql",
"expression": "Initial Population"
}
} ]
} ],
"supplementalData": [ {
"code": {
"text": "sde-ethnicity"
},
"usage": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-data-usage",
"code": "supplemental-data"
} ]
} ],
"criteria": {
"language": "text/cql",
"expression": "SDE Ethnicity"
}
} ]
},
"request": {
"method": "PUT",
"url": "Measure/measure-EXM104-8.2.000"
}
} ]
}

View File

@ -0,0 +1,168 @@
{
"resourceType": "Bundle",
"id": "EXM104-8.2.000-bundle",
"type": "transaction",
"entry": [ {
"resource": {
"resourceType": "Measure",
"id": "measure-EXM104-8.2.000",
"meta": {
"profile": [ "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm" ]
},
"extension": [ {
"url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
"valueCode": "boolean"
} ],
"url": "http://hl7.org/fhir/us/cqfmeasures/Measure/EXM104",
"identifier": [ {
"use": "official",
"system": "http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/cms",
"value": "104"
} ],
"version": "8.2.000",
"name": "EXM104",
"title": "Discharged on Antithrombotic Therapy",
"status": "active",
"experimental": true,
"date": "2018-09-17",
"publisher": "The Joint Commission",
"approvalDate": "2016-01-01",
"lastReviewDate": "2019-08-19",
"effectivePeriod": {
"start": "2019-01-01",
"end": "2019-12-31"
},
"topic": [ {
"coding": [ {
"system": "http://loinc.org",
"code": "57024-2",
"display": "Health Quality Measure Document"
} ]
} ],
"library": [ "Library/library-EXM104-8.2.000" ],
"scoring": {
"coding": [ {
"system": "http://hl7.org/fhir/measure-scoring",
"code": "proportion"
} ]
},
"type": [ {
"coding": [ {
"system": "http://hl7.org/fhir/measure-type",
"code": "process"
} ]
} ],
"group": [ {
"id": "group-1",
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"criteria": {
"language": "text/cql",
"expression": "Initial Population"
}
} ]
} ]
},
"request": {
"method": "PUT",
"url": "Measure/measure-EXM104-8.2.000"
}
}, {
"resource": {
"resourceType": "MeasureReport",
"id": "measurereport-denom-EXM104",
"contained": [ {
"resourceType": "Bundle",
"id": "4e9ea2cf-bdfc-460f-b7a0-49f70201e177",
"type": "collection",
"entry": [ {
"fullUrl": "1a19a371-91b8-4a1d-9bb0-e8a997baa655",
"resource": {
"resourceType": "List",
"id": "1a19a371-91b8-4a1d-9bb0-e8a997baa655",
"title": "denominator",
"entry": [ {
"item": {
"reference": "denom-EXM104"
}
} ]
}
}, {
"fullUrl": "Patient/denom-EXM104",
"resource": {
"resourceType": "Patient",
"id": "denom-EXM104",
"meta": {
"profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ]
},
"extension": [ {
"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
"extension": [ {
"url": "ombCategory",
"valueCoding": {
"system": "urn:oid:2.16.840.1.113883.6.238",
"code": "2054-5",
"display": "Black or African American"
}
} ]
} ],
"identifier": [ {
"use": "usual",
"type": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR",
"display": "Medical Record Number"
} ]
},
"system": "http://hospital.smarthealthit.org",
"value": "9999999910"
} ],
"name": [ {
"family": "Jones",
"given": [ "Rick" ]
} ],
"gender": "male",
"birthDate": "1955-11-05"
}
} ]
} ],
"status": "complete",
"type": "individual",
"measure": "Measure/measure-EXM104-8.2.000",
"subject": {
"reference": "Patient/denom-EXM104"
},
"period": {
"start": "2018-12-31T17:00:00-07:00",
"end": "2019-12-30T17:00:00-07:00"
},
"group": [ {
"id": "group-1",
"population": [ {
"code": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/measure-population",
"code": "initial-population",
"display": "Initial Population"
} ]
},
"count": 1
} ],
"measureScore": {
"value": 0.0
}
} ]
},
"request": {
"method": "PUT",
"url": "MeasureReport/measurereport-denom-EXM104"
}
} ]
}