diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 56c29916832..165f3ad2cb4 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 962b254c510..f3c0451bd19 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index e397504fa5f..ae31a0f0e7a 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-batch/pom.xml b/hapi-fhir-batch/pom.xml
index 2f7613507f7..b6d6ca7ea5b 100644
--- a/hapi-fhir-batch/pom.xml
+++ b/hapi-fhir-batch/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 7612b50dd92..97fc4afc797 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -3,14 +3,14 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
pom
HAPI FHIR BOM
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index e2fc61c6a74..93ac8c4b67c 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index 377e76bb82b..b1314a6d714 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 80a8623c754..4b0d178014f 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
index edf0a4c487c..71dfda59bb5 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../hapi-deployable-pom
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index 0a50d8418fd..d48bf4c2f71 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index 0913ec48d46..3368eb83dbf 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 9a7bff2bd9f..9cd87a92b79 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index 5ea5ea60a36..70d67ac04c8 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index e3cc058b1e7..52d81b2e8dd 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index b14d5b941e8..722c2745aab 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 9848f8b423b..d8d62a0d093 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index d0655b92005..1d3373fafda 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index 716bb16c9ee..52618c2d1e3 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 105b6a88e9a..1f4a44168a3 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml
index 0fb78e70d78..3ecc15ec0a9 100644
--- a/hapi-fhir-jpaserver-cql/pom.xml
+++ b/hapi-fhir-jpaserver-cql/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
index 21f0ff0df6b..7803fe4fe97 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE16-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index 786ba587653..c3d77aa23f1 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 2f4ac0e1b1e..60ff0c88022 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index 05898f90c80..6f6a96180b9 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index 9dd4bc11e0f..1a6e248b85e 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriber.java
index 0abccb0ecb9..f7816559690 100644
--- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriber.java
+++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriber.java
@@ -20,7 +20,6 @@ package ca.uhn.fhir.jpa.subscription.match.deliver;
* #L%
*/
-import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.interceptor.api.HookParams;
@@ -29,7 +28,6 @@ import ca.uhn.fhir.interceptor.api.Pointcut;
import ca.uhn.fhir.jpa.subscription.match.registry.ActiveSubscription;
import ca.uhn.fhir.jpa.subscription.match.registry.SubscriptionRegistry;
import ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription;
-import ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryJsonMessage;
import ca.uhn.fhir.jpa.subscription.model.ResourceDeliveryMessage;
import com.google.common.annotations.VisibleForTesting;
import org.slf4j.Logger;
diff --git a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/matcher/subscriber/SubscriptionRegisteringSubscriber.java b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/matcher/subscriber/SubscriptionRegisteringSubscriber.java
index d8244075116..f8137716762 100644
--- a/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/matcher/subscriber/SubscriptionRegisteringSubscriber.java
+++ b/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/match/matcher/subscriber/SubscriptionRegisteringSubscriber.java
@@ -21,7 +21,6 @@ package ca.uhn.fhir.jpa.subscription.match.matcher.subscriber;
*/
import ca.uhn.fhir.context.FhirContext;
-import ca.uhn.fhir.context.support.IValidationSupport;
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
diff --git a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriberTest.java b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriberTest.java
index 41e756de99c..dc1a6774088 100644
--- a/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriberTest.java
+++ b/hapi-fhir-jpaserver-subscription/src/test/java/ca/uhn/fhir/jpa/subscription/match/deliver/BaseSubscriptionDeliverySubscriberTest.java
@@ -46,9 +46,7 @@ import java.util.List;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
-import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
-import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index 783d5e97a54..bbc5ff3a063 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java
index d85578d1fe0..62b8b311b5e 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/subscription/resthook/RestHookTestDstu3Test.java
@@ -6,9 +6,9 @@ import ca.uhn.fhir.interceptor.api.IInterceptorService;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.provider.dstu3.BaseResourceProviderDstu3Test;
import ca.uhn.fhir.jpa.subscription.NotificationServlet;
-import ca.uhn.fhir.jpa.test.util.SubscriptionTestUtil;
import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionMatchingStrategy;
import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor;
+import ca.uhn.fhir.jpa.test.util.SubscriptionTestUtil;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.annotation.Create;
import ca.uhn.fhir.rest.annotation.Delete;
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 4f01037a2af..9b4cb0b1461 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index f5d9cb2ab63..2692a2ba73d 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index d0fc002e0b2..864b3bb8bad 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index c983c7d5813..84946b8fded 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index 4cf883aa43e..8aa16fcf173 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index 31c19fb061a..a6bd34edd6c 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index 0748abcbc74..652b9255022 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
hapi-fhir-spring-boot-sample-client-okhttp
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index 654b6ac0f02..8859ebe2909 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
hapi-fhir-spring-boot-sample-server-jersey
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 24e1738fe71..11da35a3735 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
hapi-fhir-spring-boot-samples
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index 1a6d417b5bb..8e4c1d8c819 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 7be0a0b99f5..e6d060bd746 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index 29b88ce0d03..afd6baadcd6 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml
index 1ee55399db1..c2e0482f4ff 100644
--- a/hapi-fhir-storage-batch2-jobs/pom.xml
+++ b/hapi-fhir-storage-batch2-jobs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index 8d5ffde4ab0..9e528bbf778 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index 492e919b388..c9e17d645d4 100644
--- a/hapi-fhir-storage-mdm/pom.xml
+++ b/hapi-fhir-storage-mdm/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 582f16ad980..6c8fc6dd596 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index ce7d7525be2..21d0265eda5 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionCanonicalizer.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionCanonicalizer.java
index 52366e056d1..174dedc067f 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionCanonicalizer.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/subscription/match/registry/SubscriptionCanonicalizer.java
@@ -53,7 +53,6 @@ import javax.annotation.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.stream.Collectors;
import static ca.uhn.fhir.util.HapiExtensions.EX_SEND_DELETE_MESSAGES;
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 39434923979..83ed9783011 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 0d12faef615..5feacdafc81 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index f48e9b2a3c9..395aa5bdecf 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index 02d7fa4029a..805c04529f3 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 43c2ac137d9..9327dc089f6 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index a30f616d83c..ffce623bfdb 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index df3bf8b2a87..579dbf15d9a 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index 1ba53458237..9031a6f0db7 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index c795b71511c..f130c3c1ba8 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index f6a3125923e..7c8b6c5f9f7 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index ef26557e022..9a421f7eac8 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index cfc8989ecba..d51400513d5 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index cc5f88fb33e..68517b0cb0f 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 738eb8fce25..e2336efefcf 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java
index 914651ad3d6..f8395ef3a3a 100644
--- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java
+++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyServiceValidationSupport.java
@@ -1,15 +1,10 @@
package org.hl7.fhir.common.hapi.validation.support;
-import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
-import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
-import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.FhirVersionEnum;
-import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.DefaultProfileValidationSupport;
import ca.uhn.fhir.context.support.IValidationSupport;
-import ca.uhn.fhir.context.support.TranslateConceptResult;
import ca.uhn.fhir.context.support.TranslateConceptResults;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import ca.uhn.fhir.i18n.Msg;
@@ -18,12 +13,9 @@ import ca.uhn.fhir.util.BundleUtil;
import ca.uhn.fhir.util.ParametersUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
-import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.instance.model.api.IBaseBundle;
-import org.hl7.fhir.instance.model.api.IBaseCoding;
import org.hl7.fhir.instance.model.api.IBaseParameters;
import org.hl7.fhir.instance.model.api.IBaseResource;
-import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.r4.model.CodeSystem;
import org.hl7.fhir.r4.model.ValueSet;
import org.slf4j.Logger;
@@ -32,8 +24,6 @@ import org.slf4j.LoggerFactory;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@@ -345,7 +335,7 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
IGenericClient client = provideClient();
FhirContext fhirContext = client.getFhirContext();
- IBaseParameters params = buildTranslateInputParameters(fhirContext, theRequest);
+ IBaseParameters params = RemoteTerminologyUtil.buildTranslateInputParameters(fhirContext, theRequest);
IBaseParameters outcome = client
.operation()
@@ -354,7 +344,7 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
.withParameters(params)
.execute();
- return translateOutcomeToResults(fhirContext, outcome);
+ return RemoteTerminologyUtil.translateOutcomeToResults(fhirContext, outcome);
}
private IGenericClient provideClient() {
@@ -443,7 +433,6 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
return params;
}
-
/**
* Sets the FHIR Terminology Server base URL
*
@@ -467,104 +456,4 @@ public class RemoteTerminologyServiceValidationSupport extends BaseValidationSup
Validate.notNull(theClientInterceptor, "theClientInterceptor must not be null");
myClientInterceptors.add(theClientInterceptor);
}
-
- private IBaseParameters buildTranslateInputParameters(FhirContext fhirContext, TranslateCodeRequest theRequest) {
- IBaseParameters params = ParametersUtil.newInstance(fhirContext);
- if (!StringUtils.isEmpty(theRequest.getConceptMapUrl())) {
- ParametersUtil.addParameterToParametersUri(fhirContext, params, "url", theRequest.getConceptMapUrl());
- }
- if (!StringUtils.isEmpty(theRequest.getConceptMapVersion())) {
- ParametersUtil.addParameterToParametersString(fhirContext, params, "conceptMapVersion", theRequest.getConceptMapVersion());
- }
- if (theRequest.getCodings() != null) {
- addCodingsToTranslateParameters(fhirContext, theRequest.getCodings(), params);
- }
- if (!StringUtils.isEmpty(theRequest.getSourceValueSetUrl())) {
- ParametersUtil.addParameterToParametersUri(fhirContext, params, "source", theRequest.getSourceValueSetUrl());
- }
- if (!StringUtils.isEmpty(theRequest.getTargetValueSetUrl())) {
- ParametersUtil.addParameterToParametersUri(fhirContext, params, "target", theRequest.getTargetValueSetUrl());
- }
- if (!StringUtils.isEmpty(theRequest.getTargetSystemUrl())) {
- ParametersUtil.addParameterToParametersUri(fhirContext, params, "targetsystem", theRequest.getTargetSystemUrl());
- }
- if (theRequest.isReverse()) {
- ParametersUtil.addParameterToParametersBoolean(fhirContext, params, "reverse", theRequest.isReverse());
- }
-
- return params;
- }
-
- private void addCodingsToTranslateParameters(FhirContext fhirContext, List theCodings, IBaseParameters theParams) {
- BaseRuntimeElementCompositeDefinition> codeableConceptDef = (BaseRuntimeElementCompositeDefinition>) Objects.requireNonNull(fhirContext.getElementDefinition("CodeableConcept"));
- BaseRuntimeChildDefinition codings = codeableConceptDef.getChildByName("coding");
- BaseRuntimeElementCompositeDefinition> codingDef = (BaseRuntimeElementCompositeDefinition>) Objects.requireNonNull(fhirContext.getElementDefinition("Coding"));
- BaseRuntimeChildDefinition codingSystemChild = codingDef.getChildByName("system");
- BaseRuntimeChildDefinition codingCodeChild = codingDef.getChildByName("code");
- BaseRuntimeElementDefinition> systemDef = (RuntimePrimitiveDatatypeDefinition) fhirContext.getElementDefinition("uri");
- BaseRuntimeElementDefinition> codeDef = (RuntimePrimitiveDatatypeDefinition) fhirContext.getElementDefinition("code");
-
- IBase codeableConcept = codeableConceptDef.newInstance();
-
- for (IBaseCoding aCoding : theCodings) {
- IBaseCoding newCoding = (IBaseCoding) codingDef.newInstance();
-
- IPrimitiveType> newSystem = systemDef.newInstance(aCoding.getSystem());
- codingSystemChild.getMutator().addValue(newCoding, newSystem);
- IPrimitiveType> newCode = codeDef.newInstance(aCoding.getCode());
- codingCodeChild.getMutator().addValue(newCoding, newCode);
-
- codings.getMutator().addValue(codeableConcept, newCoding);
- }
-
- ParametersUtil.addParameterToParameters(fhirContext, theParams, "codeableConcept", codeableConcept);
- }
-
- public TranslateConceptResults translateOutcomeToResults(FhirContext fhirContext, IBaseParameters outcome) {
- Optional result = ParametersUtil.getNamedParameterValueAsString(fhirContext, outcome, "result");
- Optional message = ParametersUtil.getNamedParameterValueAsString(fhirContext, outcome, "message");
- List matches = ParametersUtil.getNamedParameters(fhirContext, outcome, "match");
-
- TranslateConceptResults retVal = new TranslateConceptResults();
- if (result.isPresent()) {
- retVal.setResult(Boolean.parseBoolean(result.get()));
- }
- if (message.isPresent()) {
- retVal.setMessage(message.get());
- }
- if (!matches.isEmpty()) {
- retVal.setResults(matchesToTranslateConceptResults(fhirContext, matches));
- }
-
- return retVal;
- }
-
- private List matchesToTranslateConceptResults(FhirContext fhirContext, List theMatches) {
- List resultList = new ArrayList();
- for (IBase m : theMatches) {
- TranslateConceptResult match = new TranslateConceptResult();
- String equivalence = ParametersUtil.getParameterPartValueAsString(fhirContext, m, "equivalence");
- Optional concept = ParametersUtil.getParameterPartValue(fhirContext, m, "concept");
- String source = ParametersUtil.getParameterPartValueAsString(fhirContext, m, "source");
-
- if (StringUtils.isNotBlank(equivalence)) {
- match.setEquivalence(equivalence);
- }
-
- if (concept.isPresent()) {
- IBaseCoding matchedCoding = (IBaseCoding) concept.get();
- match.setSystem(matchedCoding.getSystem());
- match.setCode(matchedCoding.getCode());
- match.setDisplay(matchedCoding.getDisplay());
-
- if (StringUtils.isNotBlank(source)) {
- match.setConceptMapUrl(source);
- }
-
- resultList.add(match);
- }
- }
- return resultList;
- }
-
}
diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyUtil.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyUtil.java
new file mode 100644
index 00000000000..9010deb2c37
--- /dev/null
+++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/RemoteTerminologyUtil.java
@@ -0,0 +1,124 @@
+package org.hl7.fhir.common.hapi.validation.support;
+
+import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
+import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
+import ca.uhn.fhir.context.BaseRuntimeElementDefinition;
+import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.context.RuntimePrimitiveDatatypeDefinition;
+import ca.uhn.fhir.context.support.IValidationSupport;
+import ca.uhn.fhir.context.support.TranslateConceptResult;
+import ca.uhn.fhir.context.support.TranslateConceptResults;
+import ca.uhn.fhir.util.ParametersUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.hl7.fhir.instance.model.api.IBase;
+import org.hl7.fhir.instance.model.api.IBaseCoding;
+import org.hl7.fhir.instance.model.api.IBaseParameters;
+import org.hl7.fhir.instance.model.api.IPrimitiveType;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+
+public final class RemoteTerminologyUtil {
+ private RemoteTerminologyUtil() {}
+
+ public static IBaseParameters buildTranslateInputParameters(FhirContext fhirContext, IValidationSupport.TranslateCodeRequest theRequest) {
+ IBaseParameters params = ParametersUtil.newInstance(fhirContext);
+ if (!StringUtils.isEmpty(theRequest.getConceptMapUrl())) {
+ ParametersUtil.addParameterToParametersUri(fhirContext, params, "url", theRequest.getConceptMapUrl());
+ }
+ if (!StringUtils.isEmpty(theRequest.getConceptMapVersion())) {
+ ParametersUtil.addParameterToParametersString(fhirContext, params, "conceptMapVersion", theRequest.getConceptMapVersion());
+ }
+ if (theRequest.getCodings() != null) {
+ addCodingsToTranslateParameters(fhirContext, theRequest.getCodings(), params);
+ }
+ if (!StringUtils.isEmpty(theRequest.getSourceValueSetUrl())) {
+ ParametersUtil.addParameterToParametersUri(fhirContext, params, "source", theRequest.getSourceValueSetUrl());
+ }
+ if (!StringUtils.isEmpty(theRequest.getTargetValueSetUrl())) {
+ ParametersUtil.addParameterToParametersUri(fhirContext, params, "target", theRequest.getTargetValueSetUrl());
+ }
+ if (!StringUtils.isEmpty(theRequest.getTargetSystemUrl())) {
+ ParametersUtil.addParameterToParametersUri(fhirContext, params, "targetsystem", theRequest.getTargetSystemUrl());
+ }
+ if (theRequest.isReverse()) {
+ ParametersUtil.addParameterToParametersBoolean(fhirContext, params, "reverse", theRequest.isReverse());
+ }
+
+ return params;
+ }
+
+ public static void addCodingsToTranslateParameters(FhirContext fhirContext, List theCodings, IBaseParameters theParams) {
+ BaseRuntimeElementCompositeDefinition> codeableConceptDef = (BaseRuntimeElementCompositeDefinition>) Objects.requireNonNull(fhirContext.getElementDefinition("CodeableConcept"));
+ BaseRuntimeChildDefinition codings = codeableConceptDef.getChildByName("coding");
+ BaseRuntimeElementCompositeDefinition> codingDef = (BaseRuntimeElementCompositeDefinition>) Objects.requireNonNull(fhirContext.getElementDefinition("Coding"));
+ BaseRuntimeChildDefinition codingSystemChild = codingDef.getChildByName("system");
+ BaseRuntimeChildDefinition codingCodeChild = codingDef.getChildByName("code");
+ BaseRuntimeElementDefinition> systemDef = (RuntimePrimitiveDatatypeDefinition) fhirContext.getElementDefinition("uri");
+ BaseRuntimeElementDefinition> codeDef = (RuntimePrimitiveDatatypeDefinition) fhirContext.getElementDefinition("code");
+
+ IBase codeableConcept = codeableConceptDef.newInstance();
+
+ for (IBaseCoding aCoding : theCodings) {
+ IBaseCoding newCoding = (IBaseCoding) codingDef.newInstance();
+
+ IPrimitiveType> newSystem = systemDef.newInstance(aCoding.getSystem());
+ codingSystemChild.getMutator().addValue(newCoding, newSystem);
+ IPrimitiveType> newCode = codeDef.newInstance(aCoding.getCode());
+ codingCodeChild.getMutator().addValue(newCoding, newCode);
+
+ codings.getMutator().addValue(codeableConcept, newCoding);
+ }
+
+ ParametersUtil.addParameterToParameters(fhirContext, theParams, "codeableConcept", codeableConcept);
+ }
+
+ public static TranslateConceptResults translateOutcomeToResults(FhirContext fhirContext, IBaseParameters outcome) {
+ Optional result = ParametersUtil.getNamedParameterValueAsString(fhirContext, outcome, "result");
+ Optional message = ParametersUtil.getNamedParameterValueAsString(fhirContext, outcome, "message");
+ List matches = ParametersUtil.getNamedParameters(fhirContext, outcome, "match");
+
+ TranslateConceptResults retVal = new TranslateConceptResults();
+ if (result.isPresent()) {
+ retVal.setResult(Boolean.parseBoolean(result.get()));
+ }
+ if (message.isPresent()) {
+ retVal.setMessage(message.get());
+ }
+ if (!matches.isEmpty()) {
+ retVal.setResults(matchesToTranslateConceptResults(fhirContext, matches));
+ }
+
+ return retVal;
+ }
+
+ private static List matchesToTranslateConceptResults(FhirContext fhirContext, List theMatches) {
+ List resultList = new ArrayList();
+ for (IBase m : theMatches) {
+ TranslateConceptResult match = new TranslateConceptResult();
+ String equivalence = ParametersUtil.getParameterPartValueAsString(fhirContext, m, "equivalence");
+ Optional concept = ParametersUtil.getParameterPartValue(fhirContext, m, "concept");
+ String source = ParametersUtil.getParameterPartValueAsString(fhirContext, m, "source");
+
+ if (StringUtils.isNotBlank(equivalence)) {
+ match.setEquivalence(equivalence);
+ }
+
+ if (concept.isPresent()) {
+ IBaseCoding matchedCoding = (IBaseCoding) concept.get();
+ match.setSystem(matchedCoding.getSystem());
+ match.setCode(matchedCoding.getCode());
+ match.setDisplay(matchedCoding.getDisplay());
+
+ if (StringUtils.isNotBlank(source)) {
+ match.setConceptMapUrl(source);
+ }
+
+ resultList.add(match);
+ }
+ }
+ return resultList;
+ }
+}
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 146ffc81ed9..c25e77e3101 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
@@ -58,37 +58,37 @@
ca.uhn.hapi.fhir
hapi-fhir-structures-dstu3
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-hl7org-dstu2
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r4
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r5
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu2
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu3
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-r4
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
org.apache.velocity
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index 58ce1a6629d..2ae4ace429e 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index bc3fd3fda37..93250b35023 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
https://hapifhir.io
@@ -2015,7 +2015,7 @@
ca.uhn.hapi.fhir
hapi-fhir-checkstyle
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index 16968aab76b..fe875b5453e 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index 34f857d84c5..3af058e2fa5 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 316018d9a6e..2d5211b797a 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.1.0-PRE20-SNAPSHOT
+ 6.1.0-PRE21-SNAPSHOT
../../pom.xml