use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdMultiRoundTripTest method testRoundTripQualityMeasureIdWithDenomGreaterThanIpop.
@Test
void testRoundTripQualityMeasureIdWithDenomGreaterThanIpop() {
Converter converter = new Converter(new PathSource(DENOM_GREATER_THAN_IPOP));
List<Detail> details = new ArrayList<>();
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
assertThat(details).hasSize(3);
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(ErrorCode.DENOMINATOR_COUNT_INVALID);
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS68v6PerformanceRateUuid.
@Test
void testMeasureCMS68v6PerformanceRateUuid() {
Converter converter = new Converter(new PathSource(INVALID_PERFORMANCE_UUID_FILE));
List<Detail> details = new ArrayList<>();
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
String measureId = "CMS68v6";
String correctId = MeasureConfigs.getConfigurationMap().get("40280381-52fc-3a32-0153-3d64af97147b").getSubPopulation().get(0).getNumeratorUuid();
LocalizedError error = ErrorCode.QUALITY_MEASURE_ID_INCORRECT_UUID.format(measureId, PerformanceRateProportionMeasureDecoder.PERFORMANCE_RATE_ID, correctId);
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(error);
}
use of gov.cms.qpp.conversion.PathSource in project qpp-conversion-tool by CMSgov.
the class AciMeasurePerformedRoundTripTest method testGarbage.
@Test
void testGarbage() {
Converter converter = new Converter(new PathSource(JUNK_QRDA3_FILE));
JsonWrapper qpp = converter.transform();
List<Map<String, ?>> aciMeasures = JsonHelper.readJsonAtJsonPath(qpp.toString(), "$.measurementSets[?(@.category=='aci')].measurements[?(@.measureId=='TEST_MEASURE_ID')]", List.class);
assertThat(aciMeasures).hasSize(1);
assertThat((aciMeasures.get(0).get("measureId"))).isEqualTo("TEST_MEASURE_ID");
}
Aggregations