use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class CpcPlusAcceptanceTest method testCpcPlusFileFailures.
@ParameterizedTest
@MethodSource("failureData")
void testCpcPlusFileFailures(Path entry) {
String fileName = entry.getFileName().toString();
assertWithMessage("No associated entry in fixture.json for the file %s", fileName).that(fixtureValues).containsKey(fileName);
Converter converter = new Converter(new PathSource(entry));
TransformException expected = Assertions.assertThrows(TransformException.class, converter::transform);
// runnning conversions on individual files
List<Detail> details = expected.getDetails().getErrors().get(0).getDetails();
verifyOutcome(fileName, details);
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdMultiRoundTripTest method testRoundTripForQualityMeasureIdWithNoDenomMeasureType.
@Test
void testRoundTripForQualityMeasureIdWithNoDenomMeasureType() {
LocalizedError error = ErrorCode.POPULATION_CRITERIA_COUNT_INCORRECT.format("CMS52v5", 3, SubPopulationLabel.DENOM.name(), 2);
String path = "/ClinicalDocument/component/structuredBody/component/section/entry/organizer/" + "component[5]/observation/value/@code";
List<Detail> details = executeScenario(path, true);
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(error);
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS52v5InsensitiveMeasureDataUuid.
@Test
void testMeasureCMS52v5InsensitiveMeasureDataUuid() {
Converter converter = new Converter(new PathSource(INSENSITIVE_TEXT_FILE));
List<Detail> details = new ArrayList<>();
LocalizedError error = ErrorCode.QUALITY_MEASURE_ID_INCORRECT_UUID.format("CMS52v5", "DENOM", "04BF53CE-6993-4EA2-BFE5-66E36172B388");
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).doesNotContain(error);
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS160v5PerformanceRateUuid.
@Test
void testMeasureCMS160v5PerformanceRateUuid() {
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());
}
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).contains(ErrorCode.QUALITY_MEASURE_ID_MISSING_SINGLE_PERFORMANCE_RATE);
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testMeasureCMS52v5WithInsensitiveTextUuid.
@Test
void testMeasureCMS52v5WithInsensitiveTextUuid() {
Converter converter = new Converter(new PathSource(INSENSITIVE_TEXT_FILE));
List<Detail> details = new ArrayList<>();
try {
converter.transform();
} catch (TransformException exception) {
AllErrors errors = exception.getDetails();
details.addAll(errors.getErrors().get(0).getDetails());
}
assertThat(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).doesNotContain(ErrorCode.MEASURE_GUID_MISSING);
}
Aggregations