use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class AggregateCountValidatorTest method testValueAbsenceFailure.
@Test
void testValueAbsenceFailure() {
Node aggregateCountNode = new Node(TemplateId.ACI_AGGREGATE_COUNT);
AggregateCountValidator validator = new AggregateCountValidator();
validator.internalValidateSingleNode(aggregateCountNode);
Set<Detail> errors = validator.getDetails();
assertWithMessage("Should result in a value error").that(errors).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(ErrorCode.AGGREGATE_COUNT_VALUE_NOT_SINGULAR);
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class CheckerTest method testCheckerHasMeasuresShortCut.
@Test
void testCheckerHasMeasuresShortCut() {
Set<Detail> errors = new LinkedHashSet<>();
Detail err = new Detail();
err.setMessage("test");
errors.add(err);
Node root = new Node();
Checker.check(root, errors).hasMeasures(ERROR_MESSAGE, "MeasureId");
assertWithMessage("Checker should return one validation error").that(errors).comparingElementsUsing(DetailsErrorEquals.INSTANCE).containsExactly(new FormattedErrorCode(null, "test"));
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class ClinicalDocumentValidatorTest method testClinicalDocumentPresentEcQM.
@Test
void testClinicalDocumentPresentEcQM() {
Node clinicalDocumentNode = createValidClinicalDocumentNode();
Node ecqmSectionNode = new Node(TemplateId.MEASURE_SECTION_V2, clinicalDocumentNode);
ecqmSectionNode.putValue("category", "eCQM");
clinicalDocumentNode.addChildNode(ecqmSectionNode);
ClinicalDocumentValidator validator = new ClinicalDocumentValidator();
Set<Detail> errors = validator.validateSingleNode(clinicalDocumentNode);
assertWithMessage("no errors should be present").that(errors).isEmpty();
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class ClinicalDocumentValidatorTest method testClinicalDocumentPresentIa.
@Test
void testClinicalDocumentPresentIa() {
Node clinicalDocumentNode = createValidClinicalDocumentNode();
Node iaSectionNode = createIASectionNode(clinicalDocumentNode);
clinicalDocumentNode.addChildNode(iaSectionNode);
ClinicalDocumentValidator validator = new ClinicalDocumentValidator();
Set<Detail> errors = validator.validateSingleNode(clinicalDocumentNode);
assertWithMessage("no errors should be present").that(errors).isEmpty();
}
use of gov.cms.qpp.conversion.model.error.Detail in project qpp-conversion-tool by CMSgov.
the class ClinicalDocumentValidatorTest method testMultipleNonDuplicatedSectionsIsValid.
@Test
void testMultipleNonDuplicatedSectionsIsValid() {
Node clinicalDocumentNode = createValidClinicalDocumentNode();
Node aciSectionNode = createAciSectionNode(clinicalDocumentNode);
Node IASectionNode = createIASectionNode(clinicalDocumentNode);
Node qualityMeasureNode = createQualityMeasureSectionNode(clinicalDocumentNode);
clinicalDocumentNode.addChildNodes(aciSectionNode, IASectionNode, qualityMeasureNode);
ClinicalDocumentValidator validator = new ClinicalDocumentValidator();
Set<Detail> errors = validator.validateSingleNode(clinicalDocumentNode);
assertWithMessage("Should have no validation errors").that(errors).isEmpty();
}
Aggregations