From 81b82959bb2b4fb1f4837d2d4ca82b5988bdccbf Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 15 Mar 2024 15:12:16 -0400 Subject: [PATCH] Update HapiFhirEngineImplementation.java Fix boolean casting --- .../external/hapi/HapiFhirEngineImplementation.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiFhirEngineImplementation.java b/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiFhirEngineImplementation.java index 736736e83..0a03fc2e4 100644 --- a/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiFhirEngineImplementation.java +++ b/shared/src/main/java/gov/hhs/cdc/trustedintermediary/external/hapi/HapiFhirEngineImplementation.java @@ -44,10 +44,7 @@ public Boolean evaluateCondition(IBaseResource root, String expression) throws E boolean retVal; if (value.size() == 1 && value.get(0).isBooleanPrimitive()) { - retVal = - value.get(0) - .castToBoolean(base) - .booleanValue(); // not sure if resource is the right param here... + retVal = base.castToBoolean(value.get(0)).booleanValue(); } else if (value.isEmpty()) { // The FHIR utilities that test for booleans only return one if the resource exists // if the resource does not exist, they return []