From 3bd00184f7cb6cfba306a62291e36b5133956459 Mon Sep 17 00:00:00 2001 From: Anton Vasetenkov Date: Wed, 10 Jul 2024 15:30:22 +1200 Subject: [PATCH] Add support for .union() FHIRPath method. Enable tests for now(). (#1372) * Enable tests for the now() FHIRPath method. * Handling of the union() FHIRPath method --- .../org/cqframework/cql/cql2elm/SystemMethodResolver.java | 2 ++ .../src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/SystemMethodResolver.java b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/SystemMethodResolver.java index fd5383416..b8a2c31f2 100644 --- a/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/SystemMethodResolver.java +++ b/Src/java/cql-to-elm/src/main/java/org/cqframework/cql/cql2elm/SystemMethodResolver.java @@ -550,6 +550,8 @@ public Expression resolveMethod( } case "truncate": return builder.resolveFunction(null, "Truncate", getParams(target, ctx)); + case "union": + return builder.resolveFunction(null, "Union", getParams(target, ctx)); case "upper": return builder.resolveFunction(null, "Upper", getParams(target, ctx)); case "where": { diff --git a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java index 5afe57d7d..de0b95721 100644 --- a/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java +++ b/Src/java/engine-fhir/src/test/java/org/hl7/fhirpath/CQLOperationsR4Test.java @@ -210,9 +210,6 @@ public static Object[][] dataMethod() { "r4/tests-fhir-r4/testNotEquivalent/testNotEquivalent17", "r4/tests-fhir-r4/testNotEquivalent/testNotEquivalent20", "r4/tests-fhir-r4/testNotEquivalent/testNotEquivalent21", - "r4/tests-fhir-r4/testNow/testNow1", - "r4/tests-fhir-r4/testNow/testNow2", - "r4/tests-fhir-r4/testNow/testNow3", "r4/tests-fhir-r4/testPower/testPower3", "r4/tests-fhir-r4/testPrecedence/testPrecedence3", "r4/tests-fhir-r4/testPrecedence/testPrecedence4", @@ -281,9 +278,6 @@ public static Object[][] dataMethod() { "r4/tests-fhir-r4/testTypes/testStringIntegerLiteralIsNotQuantity", "r4/tests-fhir-r4/testTypes/testStringLiteralToString", "r4/tests-fhir-r4/testTypes/testStringQuantityWeekConvertsToQuantityFalse", - "r4/tests-fhir-r4/testUnion/testUnion4", - "r4/tests-fhir-r4/testUnion/testUnion5", - "r4/tests-fhir-r4/testUnion/testUnion8", "r4/tests-fhir-r4/testVariables/testVariables1", "r4/tests-fhir-r4/testVariables/testVariables2", "r4/tests-fhir-r4/testVariables/testVariables3",