diff --git a/src/main/java/gov/cms/madie/madiefhirservice/services/TestCaseBundleService.java b/src/main/java/gov/cms/madie/madiefhirservice/services/TestCaseBundleService.java index c9099132..5a0a77d6 100644 --- a/src/main/java/gov/cms/madie/madiefhirservice/services/TestCaseBundleService.java +++ b/src/main/java/gov/cms/madie/madiefhirservice/services/TestCaseBundleService.java @@ -27,6 +27,8 @@ import java.util.zip.ZipOutputStream; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; + +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.hl7.fhir.r4.model.*; import org.springframework.stereotype.Service; @@ -204,7 +206,7 @@ private List buildMeasureReportGroupC * @return an equivalent integer */ private int getExpectedValue(Object expectedValue) { - if (expectedValue == null) { + if (expectedValue == null || StringUtils.isBlank(expectedValue.toString())) { return 0; } else if (expectedValue instanceof Boolean) { return (Boolean) expectedValue ? 1 : 0; diff --git a/src/test/resources/measures/SimpleFhirMeasureLib/madie_measure.json b/src/test/resources/measures/SimpleFhirMeasureLib/madie_measure.json index 585c0b90..5e29ab33 100644 --- a/src/test/resources/measures/SimpleFhirMeasureLib/madie_measure.json +++ b/src/test/resources/measures/SimpleFhirMeasureLib/madie_measure.json @@ -36,18 +36,18 @@ "populationValues":[ { "name":"initialPopulation", - "expected":false, - "actual":false + "expected":null, + "actual":null }, { "name":"initialPopulation", - "expected":false, - "actual":false + "expected":" ", + "actual":null }, { "name":"denominator", - "expected":true, - "actual":false + "expected":0, + "actual":0 }, { "name":"denominatorExclusion",