use of gov.cms.qpp.conversion.model.error.LocalizedError 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.LocalizedError 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.LocalizedError in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdValidator method addMeasureConfigurationValidationMessage.
/**
* Adds a validation error message for a specified measure configuration
*
* @param check Current SubPopulation to be validated
* @param keys Identifiers for the current measures child
* @param node Contains the current child nodes
*/
protected void addMeasureConfigurationValidationMessage(Supplier<String> check, String[] keys, Node node) {
LocalizedError error = ErrorCode.QUALITY_MEASURE_ID_INCORRECT_UUID.format(MeasureConfigHelper.getMeasureConfig(node).getElectronicMeasureId(), String.join(",", keys), check.get());
addValidationError(Detail.forErrorAndNode(error, node));
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcQualityMeasureScopedValidatonTest method validateCms137V5FailMissingMeasure.
@Test
void validateCms137V5FailMissingMeasure() {
Node result = scopedConversion(QrdaScope.MEASURE_REFERENCE_RESULTS_CMS_V2, "cms137v5_MissingMeasure.xml");
Set<Detail> details = validateNode(result);
LocalizedError message = ErrorCode.QUALITY_MEASURE_ID_INCORRECT_UUID.format("CMS137v5", "IPP,IPOP", "EC2C5F63-AF76-4D3C-85F0-5423F8C28541");
assertWithMessage("Missing CMS137v5 IPOP strata should result in errors").that(details).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(message);
}
use of gov.cms.qpp.conversion.model.error.LocalizedError in project qpp-conversion-tool by CMSgov.
the class CpcQualityMeasureSectionValidatorTest method missingGroupAmeasures.
@Test
void missingGroupAmeasures() {
Node node = new Node();
LocalizedError message = CpcGroupMinimum.A.makeError(groupAmeasures);
validator.internalValidateSingleNode(node);
assertThat(validator.getDetails()).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(message);
}
Aggregations