use of gov.cms.qpp.conversion.encode.JsonWrapper in project qpp-conversion-tool by CMSgov.
the class PathCorrelatorTest method unacknowledgedEncodedLabel.
@Test
void unacknowledgedEncodedLabel() {
Map<String, String> map = new HashMap<>();
map.put("meep", "meep");
map.put("encodeLabel", "mawp");
JsonWrapper wrapper = new JsonWrapper();
wrapper.putObject("metadata_holder", Lists.newArrayList(map));
assertThat(PathCorrelator.prepPath("$.mawp", wrapper)).isEmpty();
}
use of gov.cms.qpp.conversion.encode.JsonWrapper in project qpp-conversion-tool by CMSgov.
the class ReportingParametersActRoundTripTest method setUp.
@BeforeAll
public static void setUp() {
Converter converter = new Converter(new PathSource(VALID_QRDA_III));
JsonWrapper qpp = converter.transform();
json = qpp.toString();
}
use of gov.cms.qpp.conversion.encode.JsonWrapper in project qpp-conversion-tool by CMSgov.
the class IaSectionRoundTripTest method testIaSectionConvertsIaMeasureId.
@Test
void testIaSectionConvertsIaMeasureId() {
Converter converter = new Converter(new PathSource(file));
JsonWrapper qpp = converter.transform();
String iaMeasureId = JsonHelper.readJsonAtJsonPath(qpp.toString(), "$.measurementSets[2].measurements[0].measureId", String.class);
assertWithMessage("Must contain measure id").that(iaMeasureId).isEqualTo("IA_EPA_3");
}
use of gov.cms.qpp.conversion.encode.JsonWrapper in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdMultiRoundTripTest method testRoundTripForQualityMeasureId.
@Test
void testRoundTripForQualityMeasureId() {
Converter converter = new Converter(new PathSource(JUNK_QRDA3_FILE));
JsonWrapper qpp = converter.transform();
String json = qpp.toString();
List<Map<String, ?>> qualityMeasures = JsonHelper.readJsonAtJsonPath(json, "$.measurementSets[?(@.category=='quality')].measurements[*]", List.class);
List<Map<String, Integer>> subPopulation = JsonHelper.readJsonAtJsonPath(json, "$.measurementSets[?(@.category=='quality')].measurements[?(@.measureId=='160')].value.strata[*]", List.class);
String message = "The measureId in the quality measure should still populate given the junk stuff in the measure.";
assertWithMessage(message).that(qualityMeasures.get(0).get("measureId")).isEqualTo("160");
assertFirstSubPopulation(subPopulation);
assertSecondSubPopulation(subPopulation);
assertThirdSubPopulation(subPopulation);
}
use of gov.cms.qpp.conversion.encode.JsonWrapper in project qpp-conversion-tool by CMSgov.
the class QualityMeasureIdRoundTripTest method testRoundTripForQualityMeasureId.
@Test
void testRoundTripForQualityMeasureId() {
Converter converter = new Converter(new PathSource(JUNK_QRDA3_FILE));
JsonWrapper qpp = converter.transform();
List<Map<String, ?>> qualityMeasures = JsonHelper.readJsonAtJsonPath(qpp.toString(), "$.measurementSets[?(@.category=='quality')].measurements[*]", List.class);
assertThat(qualityMeasures).hasSize(1);
assertWithMessage("The measureId in the quality measure should still populate given the junk stuff in the measure.").that(qualityMeasures.get(0).get("measureId")).isEqualTo("236");
}
Aggregations