From 7a9514b94a5f7af73830e19fc429af9e7aac0b3a Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Mon, 29 Mar 2021 20:43:43 -0400 Subject: [PATCH 1/7] Initial fix --- .../fhir/jpa/mdm/svc/MdmEidUpdateService.java | 7 ++++++- .../uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java | 20 ++++++++++--------- .../mdm/rules/matcher/ExtensionMatcher.java | 20 +++++++++++++++++++ 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java index c4977891444..94db6849073 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmEidUpdateService.java @@ -134,6 +134,11 @@ public class MdmEidUpdateService { ourLog.debug(theMessage); } + public void applySurvivorshipRulesAndSaveGoldenResource(IAnyResource theTargetResource, IAnyResource theGoldenResource, MdmTransactionContext theMdmTransactionContext) { + myMdmSurvivorshipService.applySurvivorshipRulesToGoldenResource(theTargetResource, theGoldenResource, theMdmTransactionContext); + myMdmResourceDaoSvc.upsertGoldenResource(theGoldenResource, theMdmTransactionContext.getResourceType()); + } + /** * Data class to hold context surrounding an update operation for an MDM target. */ @@ -162,7 +167,7 @@ public class MdmEidUpdateService { if (theExistingMatchLink.isPresent()) { MdmLink mdmLink = theExistingMatchLink.get(); Long existingGoldenResourcePid = mdmLink.getGoldenResourcePid(); - myExistingGoldenResource = myMdmResourceDaoSvc.readGoldenResourceByPid(new ResourcePersistentId(existingGoldenResourcePid), resourceType); + myExistingGoldenResource = myMdmResourceDaoSvc.readGoldenResourceByPid(new ResourcePersistentId(existingGoldenResourcePid), resourceType); myRemainsMatchedToSameGoldenResource = candidateIsSameAsMdmLinkGoldenResource(mdmLink, theMatchedGoldenResourceCandidate); } else { myRemainsMatchedToSameGoldenResource = false; diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java index 5cac2826956..fdd04914646 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvc.java @@ -46,6 +46,7 @@ import java.util.List; */ @Service public class MdmMatchLinkSvc { + private static final Logger ourLog = Logs.getMdmTroubleshootingLog(); @Autowired @@ -62,7 +63,7 @@ public class MdmMatchLinkSvc { * or create one if one does not exist. Performs matching based on rules defined in mdm-rules.json. * Does nothing if resource is determined to be not managed by MDM. * - * @param theResource the incoming MDM source, which can be any supported MDM type. + * @param theResource the incoming MDM source, which can be any supported MDM type. * @param theMdmTransactionContext * @return an {@link TransactionLogMessages} which contains all informational messages related to MDM processing of this resource. */ @@ -130,20 +131,21 @@ public class MdmMatchLinkSvc { myMdmLinkSvc.updateLink(newGoldenResource, theResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); } - private void handleMdmCreate(IAnyResource theSourceResource, MatchedGoldenResourceCandidate theGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) { + private void handleMdmCreate(IAnyResource theTargetResource, MatchedGoldenResourceCandidate theGoldenResourceCandidate, MdmTransactionContext theMdmTransactionContext) { log(theMdmTransactionContext, "MDM has narrowed down to one candidate for matching."); - IAnyResource golenResource = myMdmGoldenResourceFindingSvc.getGoldenResourceFromMatchedGoldenResourceCandidate(theGoldenResourceCandidate, theMdmTransactionContext.getResourceType()); + IAnyResource goldenResource = myMdmGoldenResourceFindingSvc.getGoldenResourceFromMatchedGoldenResourceCandidate(theGoldenResourceCandidate, theMdmTransactionContext.getResourceType()); - if (myGoldenResourceHelper.isPotentialDuplicate(golenResource, theSourceResource)) { + if (myGoldenResourceHelper.isPotentialDuplicate(goldenResource, theTargetResource)) { log(theMdmTransactionContext, "Duplicate detected based on the fact that both resources have different external EIDs."); - IAnyResource newGoldenResource = myGoldenResourceHelper.createGoldenResourceFromMdmSourceResource(theSourceResource, theMdmTransactionContext); - myMdmLinkSvc.updateLink(newGoldenResource, theSourceResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); - myMdmLinkSvc.updateLink(newGoldenResource, golenResource, MdmMatchOutcome.POSSIBLE_DUPLICATE, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); + IAnyResource newGoldenResource = myGoldenResourceHelper.createGoldenResourceFromMdmSourceResource(theTargetResource, theMdmTransactionContext); + myMdmLinkSvc.updateLink(newGoldenResource, theTargetResource, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); + myMdmLinkSvc.updateLink(newGoldenResource, goldenResource, MdmMatchOutcome.POSSIBLE_DUPLICATE, MdmLinkSourceEnum.AUTO, theMdmTransactionContext); } else { if (theGoldenResourceCandidate.isMatch()) { - myGoldenResourceHelper.handleExternalEidAddition(golenResource, theSourceResource, theMdmTransactionContext); + myGoldenResourceHelper.handleExternalEidAddition(goldenResource, theTargetResource, theMdmTransactionContext); + myEidUpdateService.applySurvivorshipRulesAndSaveGoldenResource(theTargetResource, goldenResource, theMdmTransactionContext); } - myMdmLinkSvc.updateLink(golenResource, theSourceResource, theGoldenResourceCandidate.getMatchResult(), MdmLinkSourceEnum.AUTO, theMdmTransactionContext); + myMdmLinkSvc.updateLink(goldenResource, theTargetResource, theGoldenResourceCandidate.getMatchResult(), MdmLinkSourceEnum.AUTO, theMdmTransactionContext); } } diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcher.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcher.java index c71493ca12b..b8faa9763d9 100644 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcher.java +++ b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcher.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.mdm.rules.matcher; +/*- + * #%L + * HAPI FHIR - Master Data Management + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.util.ExtensionUtil; import org.hl7.fhir.instance.model.api.IBase; From ab8505dfc4a60e027104162e9eb51c5ec9b5e974 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Wed, 31 Mar 2021 16:07:21 -0400 Subject: [PATCH 2/7] Removed deprecated TerserUtil --- .../jpa/dao/mdm/MdmExpansionCacheSvc.java | 20 ++ .../mdm/svc/GoldenResourceMergerSvcImpl.java | 1 - .../jpa/mdm/svc/MdmSurvivorshipSvcImpl.java | 2 +- ...MdmProviderMergeGoldenResourcesR4Test.java | 2 +- .../java/ca/uhn/fhir/mdm/util/TerserUtil.java | 147 ------------- .../ca/uhn/fhir/mdm/util/TerserUtilTest.java | 197 ------------------ 6 files changed, 22 insertions(+), 347 deletions(-) delete mode 100644 hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/util/TerserUtil.java delete mode 100644 hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/util/TerserUtilTest.java diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmExpansionCacheSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmExpansionCacheSvc.java index b4315677fec..67d1e528338 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmExpansionCacheSvc.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/mdm/MdmExpansionCacheSvc.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.jpa.dao.mdm; +/*- + * #%L + * HAPI FHIR JPA Server + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/GoldenResourceMergerSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/GoldenResourceMergerSvcImpl.java index fae7c2da3d1..c24d28289d9 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/GoldenResourceMergerSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/GoldenResourceMergerSvcImpl.java @@ -31,7 +31,6 @@ import ca.uhn.fhir.mdm.log.Logs; import ca.uhn.fhir.mdm.model.MdmTransactionContext; import ca.uhn.fhir.mdm.util.GoldenResourceHelper; import ca.uhn.fhir.mdm.util.MdmResourceUtil; -import ca.uhn.fhir.mdm.util.TerserUtil; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import org.hl7.fhir.instance.model.api.IAnyResource; import org.slf4j.Logger; diff --git a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSurvivorshipSvcImpl.java b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSurvivorshipSvcImpl.java index f61fb4bccb0..1dac6473a13 100644 --- a/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSurvivorshipSvcImpl.java +++ b/hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/svc/MdmSurvivorshipSvcImpl.java @@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.mdm.svc; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.mdm.api.IMdmSurvivorshipService; import ca.uhn.fhir.mdm.model.MdmTransactionContext; -import ca.uhn.fhir.mdm.util.TerserUtil; +import ca.uhn.fhir.util.TerserUtil; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; import org.springframework.beans.factory.annotation.Autowired; diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderMergeGoldenResourcesR4Test.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderMergeGoldenResourcesR4Test.java index 0bd144b0568..39b5101c93e 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderMergeGoldenResourcesR4Test.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/provider/MdmProviderMergeGoldenResourcesR4Test.java @@ -4,9 +4,9 @@ import ca.uhn.fhir.jpa.entity.MdmLink; import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; import ca.uhn.fhir.mdm.api.MdmMatchResultEnum; import ca.uhn.fhir.mdm.util.MdmResourceUtil; -import ca.uhn.fhir.mdm.util.TerserUtil; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import ca.uhn.fhir.util.TerserUtil; import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.StringType; import org.junit.jupiter.api.BeforeEach; diff --git a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/util/TerserUtil.java b/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/util/TerserUtil.java deleted file mode 100644 index d64a55396ea..00000000000 --- a/hapi-fhir-server-mdm/src/main/java/ca/uhn/fhir/mdm/util/TerserUtil.java +++ /dev/null @@ -1,147 +0,0 @@ -package ca.uhn.fhir.mdm.util; - -/*- - * #%L - * HAPI FHIR - Master Data Management - * %% - * Copyright (C) 2014 - 2021 Smile CDR, Inc. - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * #L% - */ - -import ca.uhn.fhir.context.BaseRuntimeChildDefinition; -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.mdm.model.CanonicalEID; -import ca.uhn.fhir.util.FhirTerser; -import org.hl7.fhir.instance.model.api.IBase; -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.slf4j.Logger; - -import java.util.Collection; -import java.util.List; -import java.util.function.Predicate; - -import static org.slf4j.LoggerFactory.getLogger; - -@Deprecated -public final class TerserUtil { - private static final Logger ourLog = getLogger(TerserUtil.class); - - public static final Collection IDS_AND_META_EXCLUDES = ca.uhn.fhir.util.TerserUtil.IDS_AND_META_EXCLUDES; - - public static final Predicate EXCLUDE_IDS_AND_META = ca.uhn.fhir.util.TerserUtil.EXCLUDE_IDS_AND_META; - - private TerserUtil() { - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void cloneEidIntoResource(FhirContext theFhirContext, BaseRuntimeChildDefinition theIdentifierDefinition, IBase theEid, IBase theResourceToCloneEidInto) { - ca.uhn.fhir.util.TerserUtil.cloneEidIntoResource(theFhirContext, theIdentifierDefinition, theEid, theResourceToCloneEidInto); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static boolean hasValues(FhirContext theFhirContext, IBaseResource theResource, String theFieldName) { - return ca.uhn.fhir.util.TerserUtil.hasValues(theFhirContext, theResource, theFieldName); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static List getValues(FhirContext theFhirContext, IBaseResource theResource, String theFieldName) { - return ca.uhn.fhir.util.TerserUtil.getValues(theFhirContext, theResource, theFieldName); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void cloneCompositeField(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, String field) { - ca.uhn.fhir.util.TerserUtil.cloneCompositeField(theFhirContext, theFrom, theTo, field); - - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void mergeAllFields(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.mergeAllFields(theFhirContext, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void replaceFields(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate inclusionStrategy) { - ca.uhn.fhir.util.TerserUtil.replaceFields(theFhirContext, theFrom, theTo, inclusionStrategy); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static boolean fieldExists(FhirContext theFhirContext, String theFieldName, IBaseResource theInstance) { - return ca.uhn.fhir.util.TerserUtil.fieldExists(theFhirContext, theFieldName, theInstance); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void replaceField(FhirContext theFhirContext, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.replaceField(theFhirContext, theFieldName, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void replaceField(FhirContext theFhirContext, FhirTerser theTerser, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.replaceField(theFhirContext, theTerser, theFieldName, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void mergeFieldsExceptIdAndMeta(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.mergeFieldsExceptIdAndMeta(theFhirContext, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void mergeFields(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate inclusionStrategy) { - ca.uhn.fhir.util.TerserUtil.mergeFields(theFhirContext, theFrom, theTo, inclusionStrategy); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void mergeField(FhirContext theFhirContext, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.mergeField(theFhirContext, theFieldName, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static void mergeField(FhirContext theFhirContext, FhirTerser theTerser, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - ca.uhn.fhir.util.TerserUtil.mergeField(theFhirContext, theTerser, theFieldName, theFrom, theTo); - } - - /** - * @deprecated Use {@link ca.uhn.fhir.util.TerserUtil} instead - */ - public static T clone(FhirContext theFhirContext, T theInstance) { - return ca.uhn.fhir.util.TerserUtil.clone(theFhirContext, theInstance); - } - -} diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/util/TerserUtilTest.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/util/TerserUtilTest.java deleted file mode 100644 index a94891fbdd2..00000000000 --- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/util/TerserUtilTest.java +++ /dev/null @@ -1,197 +0,0 @@ -package ca.uhn.fhir.mdm.util; - -import ca.uhn.fhir.context.RuntimeResourceDefinition; -import ca.uhn.fhir.mdm.BaseR4Test; -import org.hl7.fhir.r4.model.DateTimeType; -import org.hl7.fhir.r4.model.Extension; -import org.hl7.fhir.r4.model.Identifier; -import org.hl7.fhir.r4.model.Patient; -import org.junit.jupiter.api.Test; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.hasSize; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -class TerserUtilTest extends BaseR4Test { - - @Test - void testCloneEidIntoResource() { - Identifier identifier = new Identifier().setSystem("http://org.com/sys").setValue("123"); - - Patient p1 = new Patient(); - p1.addIdentifier(identifier); - - Patient p2 = new Patient(); - RuntimeResourceDefinition definition = ourFhirContext.getResourceDefinition(p1); - TerserUtil.cloneEidIntoResource(ourFhirContext, definition.getChildByName("identifier"), identifier, p2); - - assertEquals(1, p2.getIdentifier().size()); - assertEquals(p1.getIdentifier().get(0).getSystem(), p2.getIdentifier().get(0).getSystem()); - assertEquals(p1.getIdentifier().get(0).getValue(), p2.getIdentifier().get(0).getValue()); - } - - @Test - void testFieldExists() { - assertTrue(TerserUtil.fieldExists(ourFhirContext, "identifier", new Patient())); - assertFalse(TerserUtil.fieldExists(ourFhirContext, "randomFieldName", new Patient())); - } - - @Test - void testCloneFields() { - Patient p1 = buildJohny(); - p1.addName().addGiven("Sigizmund"); - p1.setId("Patient/22"); - - Patient p2 = new Patient(); - - TerserUtil.mergeFieldsExceptIdAndMeta(ourFhirContext, p1, p2); - - assertTrue(p2.getIdentifier().isEmpty()); - - assertNull(p2.getId()); - assertEquals(1, p2.getName().size()); - assertEquals(p1.getName().get(0).getNameAsSingleString(), p2.getName().get(0).getNameAsSingleString()); - } - - @Test - void testCloneWithNonPrimitives() { - Patient p1 = new Patient(); - Patient p2 = new Patient(); - - p1.addName().addGiven("Joe"); - p1.getNameFirstRep().addGiven("George"); - assertThat(p1.getName(), hasSize(1)); - assertThat(p1.getName().get(0).getGiven(), hasSize(2)); - - p2.addName().addGiven("Jeff"); - p2.getNameFirstRep().addGiven("George"); - assertThat(p2.getName(), hasSize(1)); - assertThat(p2.getName().get(0).getGiven(), hasSize(2)); - - TerserUtil.mergeAllFields(ourFhirContext, p1, p2); - assertThat(p2.getName(), hasSize(2)); - assertThat(p2.getName().get(0).getGiven(), hasSize(2)); - assertThat(p2.getName().get(1).getGiven(), hasSize(2)); - } - - @Test - void testMergeForAddressWithExtensions() { - Extension ext = new Extension(); - ext.setUrl("http://hapifhir.io/extensions/address#create-timestamp"); - ext.setValue(new DateTimeType("2021-01-02T11:13:15")); - - Patient p1 = new Patient(); - p1.addAddress() - .addLine("10 Main Street") - .setCity("Hamilton") - .setState("ON") - .setPostalCode("Z0Z0Z0") - .setCountry("Canada") - .addExtension(ext); - - Patient p2 = new Patient(); - p2.addAddress().addLine("10 Lenin Street").setCity("Severodvinsk").setCountry("Russia"); - - TerserUtil.mergeField(ourFhirContext,"address", p1, p2); - - assertEquals(2, p2.getAddress().size()); - assertEquals("[10 Lenin Street]", p2.getAddress().get(0).getLine().toString()); - assertEquals("[10 Main Street]", p2.getAddress().get(1).getLine().toString()); - assertTrue(p2.getAddress().get(1).hasExtension()); - - p1 = new Patient(); - p1.addAddress().addLine("10 Main Street").addExtension(ext); - p2 = new Patient(); - p2.addAddress().addLine("10 Main Street").addExtension(new Extension("demo", new DateTimeType("2021-01-02"))); - - TerserUtil.mergeField(ourFhirContext,"address", p1, p2); - assertEquals(2, p2.getAddress().size()); - assertTrue(p2.getAddress().get(0).hasExtension()); - assertTrue(p2.getAddress().get(1).hasExtension()); - - } - - @Test - void testReplaceForAddressWithExtensions() { - Extension ext = new Extension(); - ext.setUrl("http://hapifhir.io/extensions/address#create-timestamp"); - ext.setValue(new DateTimeType("2021-01-02T11:13:15")); - - Patient p1 = new Patient(); - p1.addAddress() - .addLine("10 Main Street") - .setCity("Hamilton") - .setState("ON") - .setPostalCode("Z0Z0Z0") - .setCountry("Canada") - .addExtension(ext); - - Patient p2 = new Patient(); - p2.addAddress().addLine("10 Lenin Street").setCity("Severodvinsk").setCountry("Russia"); - - TerserUtil.replaceField(ourFhirContext,"address", p1, p2); - - assertEquals(1, p2.getAddress().size()); - assertEquals("[10 Main Street]", p2.getAddress().get(0).getLine().toString()); - assertTrue(p2.getAddress().get(0).hasExtension()); - } - - @Test - void testMergeForSimilarAddresses() { - Extension ext = new Extension(); - ext.setUrl("http://hapifhir.io/extensions/address#create-timestamp"); - ext.setValue(new DateTimeType("2021-01-02T11:13:15")); - - Patient p1 = new Patient(); - p1.addAddress() - .addLine("10 Main Street") - .setCity("Hamilton") - .setState("ON") - .setPostalCode("Z0Z0Z0") - .setCountry("Canada") - .addExtension(ext); - - Patient p2 = new Patient(); - p2.addAddress() - .addLine("10 Main Street") - .setCity("Hamilton") - .setState("ON") - .setPostalCode("Z0Z0Z1") - .setCountry("Canada") - .addExtension(ext); - - TerserUtil.mergeField(ourFhirContext,"address", p1, p2); - - assertEquals(2, p2.getAddress().size()); - assertEquals("[10 Main Street]", p2.getAddress().get(0).getLine().toString()); - assertEquals("[10 Main Street]", p2.getAddress().get(1).getLine().toString()); - assertTrue(p2.getAddress().get(1).hasExtension()); - } - - - @Test - void testCloneWithDuplicateNonPrimitives() { - Patient p1 = new Patient(); - Patient p2 = new Patient(); - - p1.addName().addGiven("Jim"); - p1.getNameFirstRep().addGiven("George"); - - assertThat(p1.getName(), hasSize(1)); - assertThat(p1.getName().get(0).getGiven(), hasSize(2)); - - p2.addName().addGiven("Jim"); - p2.getNameFirstRep().addGiven("George"); - - assertThat(p2.getName(), hasSize(1)); - assertThat(p2.getName().get(0).getGiven(), hasSize(2)); - - TerserUtil.mergeAllFields(ourFhirContext, p1, p2); - - assertThat(p2.getName(), hasSize(1)); - assertThat(p2.getName().get(0).getGiven(), hasSize(2)); - } -} From 0cd14b971ac94185ddf31e407ca9d085f1506e27 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 1 Apr 2021 10:59:50 -0400 Subject: [PATCH 3/7] Added changelog --- .../5_4_0/2515-mdm-survivorship-rules-application.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml new file mode 100644 index 00000000000..aa93351b4b4 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 2515 +title: "Addresses MDM survivorship rules application on matching a single resource" From 9629aceff06ddea00bb1d5f25063b6176f60481b Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 1 Apr 2021 15:52:52 -0400 Subject: [PATCH 4/7] Removed obsolete test and added more control to replace fields in TU --- .../java/ca/uhn/fhir/util/TerserUtil.java | 41 +++++++++++++++---- .../fhir/jpa/mdm/svc/MdmMatchLinkSvcTest.java | 22 ---------- .../java/ca/uhn/fhir/util/TerserUtilTest.java | 17 ++++++++ 3 files changed, 51 insertions(+), 29 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java index fc7e8fd0ced..126b2dfca3b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java @@ -25,6 +25,7 @@ import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition; import ca.uhn.fhir.context.BaseRuntimeElementDefinition; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.RuntimeResourceDefinition; +import org.apache.commons.lang3.tuple.Triple; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; import org.slf4j.Logger; @@ -58,6 +59,17 @@ public final class TerserUtil { } }; + public static final Predicate> EXCLUDE_IDS_META_AND_EMPTY = new Predicate>() { + @Override + public boolean test(Triple theTriple) { + if (!EXCLUDE_IDS_AND_META.test(theTriple.getLeft().getElementName())) { + return false; + } + + return theTriple.getLeft().getAccessor().getValues(theTriple.getRight()).isEmpty(); + } + }; + public static final Predicate INCLUDE_ALL = new Predicate() { @Override public boolean test(String s) { @@ -235,20 +247,35 @@ public final class TerserUtil { } /** - * Replaces all fields that test positive by the given inclusion strategy. theTo will contain a copy of the + * Replaces all fields that have matching field names by the given inclusion strategy. theTo will contain a copy of the * values from theFrom instance. * - * @param theFhirContext Context holding resource definition - * @param theFrom The resource to merge the fields from - * @param theTo The resource to merge the fields into - * @param inclusionStrategy Inclusion strategy that checks if a given field should be replaced by checking {@link Predicate#test(Object)} + * @param theFhirContext Context holding resource definition + * @param theFrom The resource to merge the fields from + * @param theTo The resource to merge the fields into + * @param theFieldNameInclusion Inclusion strategy that checks if a given field should be replaced */ - public static void replaceFields(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate inclusionStrategy) { + public static void replaceFields(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate theFieldNameInclusion) { + Predicate> predicate + = (t) -> theFieldNameInclusion.test(t.getLeft().getElementName()); + replaceFieldsByPredicate(theFhirContext, theFrom, theTo, predicate); + } + + /** + * Replaces empty fields on theTo resource that test positive by the given predicate. theTo will contain a copy of the + * values from theFrom for which predicate tests positive. + * + * @param theFhirContext Context holding resource definition + * @param theFrom The resource to merge the fields from + * @param theTo The resource to merge the fields into + * @param thePredicate Predicate that checks if a given field should be replaced + */ + public static void replaceFieldsByPredicate(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate> thePredicate) { FhirTerser terser = theFhirContext.newTerser(); RuntimeResourceDefinition definition = theFhirContext.getResourceDefinition(theFrom); for (BaseRuntimeChildDefinition childDefinition : definition.getChildrenAndExtension()) { - if (!inclusionStrategy.test(childDefinition.getElementName())) { + if (!thePredicate.test(Triple.of(childDefinition, theFrom, theTo))) { continue; } diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcTest.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcTest.java index 06eb9ebe9d4..b3236ccaa39 100644 --- a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcTest.java +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcTest.java @@ -476,28 +476,6 @@ public class MdmMatchLinkSvcTest extends BaseMdmR4Test { assertThat(nameFirstRep.getGivenAsSingleString(), is(equalToIgnoringCase("paul"))); } - @Test - public void testPatientCreateDoesNotOverwriteGoldenResourceAttributesThatAreInvolvedInLinking() { - Patient paul = buildPaulPatient(); - paul.setGender(Enumerations.AdministrativeGender.MALE); - paul = createPatientAndUpdateLinks(paul); - - Patient sourcePatientFromTarget = (Patient) getGoldenResourceFromTargetResource(paul); - - assertThat(sourcePatientFromTarget.getGender(), is(equalTo(Enumerations.AdministrativeGender.MALE))); - - Patient paul2 = buildPaulPatient(); - paul2.setGender(Enumerations.AdministrativeGender.FEMALE); - paul2 = createPatientAndUpdateLinks(paul2); - - assertThat(paul2, is(sameGoldenResourceAs(paul))); - - //Newly matched patients aren't allowed to overwrite GoldenResource Attributes unless they are empty, - // so gender should still be set to male. - Patient paul2GoldenResource = (Patient) getGoldenResourceFromTargetResource(paul2); - assertThat(paul2GoldenResource.getGender(), is(equalTo(Enumerations.AdministrativeGender.MALE))); - } - @Test //Test Case #1 public void testPatientUpdatesOverwriteGoldenResourceData() { diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java index d4af78f0162..a94efbfb845 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java @@ -77,6 +77,7 @@ class TerserUtilTest { assertEquals(check.getValue(), p.getBirthDate()); } + @Test void testFieldExists() { assertTrue(TerserUtil.fieldExists(ourFhirContext, "identifier", TerserUtil.newResource(ourFhirContext, "Patient"))); @@ -294,6 +295,22 @@ class TerserUtilTest { assertEquals("Doe", p2.getName().get(0).getFamily()); } + @Test + public void testReplaceFieldsByPredicate() { + Patient p1 = new Patient(); + p1.addName().setFamily("Doe"); + p1.setGender(Enumerations.AdministrativeGender.MALE); + + Patient p2 = new Patient(); + p2.addName().setFamily("Smith"); + + TerserUtil.replaceFieldsByPredicate(ourFhirContext, p1, p2, TerserUtil.EXCLUDE_IDS_META_AND_EMPTY); + + assertEquals(1, p2.getName().size()); + assertEquals("Smith", p2.getName().get(0).getFamily()); + assertEquals(Enumerations.AdministrativeGender.MALE, p2.getGender()); + } + @Test public void testClearFields() { Patient p1 = new Patient(); From d05b585426a57ecbc23b8936e3d0871af5003462 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Thu, 1 Apr 2021 19:38:53 -0400 Subject: [PATCH 5/7] Added a test for survivorship svc invocation --- .../svc/MdmMatchLinkSvcSurvivorshipTest.java | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcSurvivorshipTest.java diff --git a/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcSurvivorshipTest.java b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcSurvivorshipTest.java new file mode 100644 index 00000000000..2a1d563d085 --- /dev/null +++ b/hapi-fhir-jpaserver-mdm/src/test/java/ca/uhn/fhir/jpa/mdm/svc/MdmMatchLinkSvcSurvivorshipTest.java @@ -0,0 +1,70 @@ +package ca.uhn.fhir.jpa.mdm.svc; + +import ca.uhn.fhir.jpa.entity.MdmLink; +import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test; +import ca.uhn.fhir.jpa.searchparam.SearchParameterMap; +import ca.uhn.fhir.mdm.api.IMdmLinkSvc; +import ca.uhn.fhir.mdm.api.IMdmSurvivorshipService; +import ca.uhn.fhir.mdm.api.MdmConstants; +import ca.uhn.fhir.mdm.api.MdmLinkSourceEnum; +import ca.uhn.fhir.mdm.api.MdmMatchOutcome; +import ca.uhn.fhir.mdm.model.MdmTransactionContext; +import ca.uhn.fhir.mdm.util.GoldenResourceHelper; +import ca.uhn.fhir.rest.api.server.IBundleProvider; +import ca.uhn.fhir.rest.param.TokenParam; +import org.hl7.fhir.instance.model.api.IAnyResource; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.Patient; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mockito; +import org.slf4j.Logger; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.mock.mockito.SpyBean; + +import javax.annotation.Nullable; + +import static ca.uhn.fhir.mdm.api.MdmMatchResultEnum.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.*; +import static org.mockito.Mockito.times; +import static org.slf4j.LoggerFactory.getLogger; + +public class MdmMatchLinkSvcSurvivorshipTest extends BaseMdmR4Test { + + private static final Logger ourLog = getLogger(MdmMatchLinkSvcSurvivorshipTest.class); + + @Autowired + IMdmLinkSvc myMdmLinkSvc; + + @SpyBean + IMdmSurvivorshipService myMdmSurvivorshipService; + + @Autowired + private GoldenResourceHelper myGoldenResourceHelper; + + @Captor + ArgumentCaptor myPatientCaptor; + @Captor + ArgumentCaptor myContext; + + @Test + public void testSurvivorshipIsCalledOnMatchingToTheSameGoldenResource() { + // no candidates + createPatientAndUpdateLinks(buildJanePatient()); + verifySurvivorshipCalled(1); + + // single candidate + createPatientAndUpdateLinks(buildJanePatient()); + verifySurvivorshipCalled(2); + + // multiple candidates matching to the same golden record + createPatientAndUpdateLinks(buildJanePatient()); + verifySurvivorshipCalled(3); + } + + private void verifySurvivorshipCalled(int theNumberOfTimes) { + Mockito.verify(myMdmSurvivorshipService, times(theNumberOfTimes)).applySurvivorshipRulesToGoldenResource(myPatientCaptor.capture(), myPatientCaptor.capture(), myContext.capture()); + } +} From 536ca0e73dac76a9d0cee397ee1d0f70d539df3e Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Mon, 19 Apr 2021 16:24:52 -0400 Subject: [PATCH 6/7] Code review updates --- .../java/ca/uhn/fhir/util/TerserUtil.java | 63 +++++++++++++------ ...15-mdm-survivorship-rules-application.yaml | 2 +- .../java/ca/uhn/fhir/util/TerserUtilTest.java | 8 ++- 3 files changed, 51 insertions(+), 22 deletions(-) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java index 126b2dfca3b..e6de9a87c0d 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/TerserUtil.java @@ -49,9 +49,15 @@ public final class TerserUtil { private static final String EQUALS_DEEP = "equalsDeep"; + /** + * Exclude for id, identifier and meta fields of a resource. + */ public static final Collection IDS_AND_META_EXCLUDES = Collections.unmodifiableSet(Stream.of("id", "identifier", "meta").collect(Collectors.toSet())); + /** + * Exclusion predicate for id, identifier, meta fields. + */ public static final Predicate EXCLUDE_IDS_AND_META = new Predicate() { @Override public boolean test(String s) { @@ -59,17 +65,25 @@ public final class TerserUtil { } }; + /** + * Exclusion predicate for id/identifier, meta and fields with empty values. This ensures that source / target resources, + * empty source fields will not results in erasure of target fields. + */ public static final Predicate> EXCLUDE_IDS_META_AND_EMPTY = new Predicate>() { @Override public boolean test(Triple theTriple) { if (!EXCLUDE_IDS_AND_META.test(theTriple.getLeft().getElementName())) { return false; } - - return theTriple.getLeft().getAccessor().getValues(theTriple.getRight()).isEmpty(); + BaseRuntimeChildDefinition childDefinition = theTriple.getLeft(); + boolean isSourceFieldEmpty = childDefinition.getAccessor().getValues(theTriple.getMiddle()).isEmpty(); + return !isSourceFieldEmpty; } }; + /** + * Exclusion predicate for keeping all fields. + */ public static final Predicate INCLUDE_ALL = new Predicate() { @Override public boolean test(String s) { @@ -262,8 +276,8 @@ public final class TerserUtil { } /** - * Replaces empty fields on theTo resource that test positive by the given predicate. theTo will contain a copy of the - * values from theFrom for which predicate tests positive. + * Replaces fields on theTo resource that test positive by the given predicate. theTo will contain a copy of the + * values from theFrom for which predicate tests positive. Please note that composite fields will be replaced fully. * * @param theFhirContext Context holding resource definition * @param theFrom The resource to merge the fields from @@ -271,15 +285,11 @@ public final class TerserUtil { * @param thePredicate Predicate that checks if a given field should be replaced */ public static void replaceFieldsByPredicate(FhirContext theFhirContext, IBaseResource theFrom, IBaseResource theTo, Predicate> thePredicate) { - FhirTerser terser = theFhirContext.newTerser(); - RuntimeResourceDefinition definition = theFhirContext.getResourceDefinition(theFrom); for (BaseRuntimeChildDefinition childDefinition : definition.getChildrenAndExtension()) { - if (!thePredicate.test(Triple.of(childDefinition, theFrom, theTo))) { - continue; + if (thePredicate.test(Triple.of(childDefinition, theFrom, theTo))) { + replaceField(theFrom, theTo, childDefinition); } - - replaceField(theFrom, theTo, childDefinition); } } @@ -304,14 +314,11 @@ public final class TerserUtil { * @param theTo The resource to replace the field on */ public static void replaceField(FhirContext theFhirContext, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - replaceField(theFhirContext, theFhirContext.newTerser(), theFieldName, theFrom, theTo); - } - - /** - * @deprecated Use {@link #replaceField(FhirContext, String, IBaseResource, IBaseResource)} instead - */ - public static void replaceField(FhirContext theFhirContext, FhirTerser theTerser, String theFieldName, IBaseResource theFrom, IBaseResource theTo) { - replaceField(theFrom, theTo, getBaseRuntimeChildDefinition(theFhirContext, theFieldName, theFrom)); + RuntimeResourceDefinition definition = theFhirContext.getResourceDefinition(theFrom); + if (definition == null) { + throw new IllegalArgumentException(String.format("Field %s does not exist in %s", theFieldName, theFrom)); + } + replaceField(theFrom, theTo, theFhirContext.getResourceDefinition(theFrom).getChildByName(theFieldName)); } /** @@ -328,7 +335,7 @@ public final class TerserUtil { /** * Sets the provided field with the given values. This method will add to the collection of existing field values - * in case of multiple cardinality. Use {@link #clearField(FhirContext, FhirTerser, String, IBaseResource, IBase...)} + * in case of multiple cardinality. Use {@link #clearField(FhirContext, String, IBaseResource)} * to remove values before setting * * @param theFhirContext Context holding resource definition @@ -342,7 +349,7 @@ public final class TerserUtil { /** * Sets the provided field with the given values. This method will add to the collection of existing field values - * in case of multiple cardinality. Use {@link #clearField(FhirContext, FhirTerser, String, IBaseResource, IBase...)} + * in case of multiple cardinality. Use {@link #clearField(FhirContext, String, IBaseResource)} * to remove values before setting * * @param theFhirContext Context holding resource definition @@ -397,10 +404,26 @@ public final class TerserUtil { setFieldByFhirPath(theFhirContext.newTerser(), theFhirPath, theResource, theValue); } + /** + * Returns field values ant the specified FHIR path from the resource. + * + * @param theFhirContext Context holding resource definition + * @param theFhirPath The FHIR path to get the field from + * @param theResource The resource from which the value should be retrieved + * @return Returns the list of field values at the given FHIR path + */ public static List getFieldByFhirPath(FhirContext theFhirContext, String theFhirPath, IBase theResource) { return theFhirContext.newTerser().getValues(theResource, theFhirPath, false, false); } + /** + * Returns the first available field value at the specified FHIR path from the resource. + * + * @param theFhirContext Context holding resource definition + * @param theFhirPath The FHIR path to get the field from + * @param theResource The resource from which the value should be retrieved + * @return Returns the first available value or null if no values can be retrieved + */ public static IBase getFirstFieldByFhirPath(FhirContext theFhirContext, String theFhirPath, IBase theResource) { List values = getFieldByFhirPath(theFhirContext, theFhirPath, theResource); if (values == null || values.isEmpty()) { diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml index aa93351b4b4..f8e96a9f02e 100644 --- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2515-mdm-survivorship-rules-application.yaml @@ -1,4 +1,4 @@ --- type: fix issue: 2515 -title: "Addresses MDM survivorship rules application on matching a single resource" +title: "Fixed issues with application of survivorship rules when matching golden record to a single resource" diff --git a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java index a94efbfb845..0d9d03e6f32 100644 --- a/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java +++ b/hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/util/TerserUtilTest.java @@ -13,6 +13,8 @@ import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.r4.model.PrimitiveType; import org.junit.jupiter.api.Test; +import java.util.Date; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasSize; import static org.junit.jupiter.api.Assertions.*; @@ -303,12 +305,16 @@ class TerserUtilTest { Patient p2 = new Patient(); p2.addName().setFamily("Smith"); + Date dob = new Date(); + p2.setBirthDate(dob); TerserUtil.replaceFieldsByPredicate(ourFhirContext, p1, p2, TerserUtil.EXCLUDE_IDS_META_AND_EMPTY); + // expect p2 to have "Doe" and MALE after replace assertEquals(1, p2.getName().size()); - assertEquals("Smith", p2.getName().get(0).getFamily()); + assertEquals("Doe", p2.getName().get(0).getFamily()); assertEquals(Enumerations.AdministrativeGender.MALE, p2.getGender()); + assertEquals(dob, p2.getBirthDate()); } @Test From 4e266462ec2e0363bbee8298e34263940eaee286 Mon Sep 17 00:00:00 2001 From: Nick Goupinets Date: Tue, 20 Apr 2021 16:17:27 -0400 Subject: [PATCH 7/7] Bumped up version due to breaking changes --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- hapi-fhir-bom/pom.xml | 4 ++-- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 8 ++++---- hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jaxrsserver-example/pom.xml | 2 +- hapi-fhir-jpaserver-api/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- hapi-fhir-jpaserver-batch/pom.xml | 2 +- hapi-fhir-jpaserver-cql/pom.xml | 6 +++--- hapi-fhir-jpaserver-mdm/pom.xml | 6 +++--- hapi-fhir-jpaserver-migrate/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 4 ++-- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../hapi-fhir-spring-boot-autoconfigure/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- hapi-fhir-structures-r5/pom.xml | 2 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2.1/pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 16 ++++++++-------- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- restful-server-example/pom.xml | 2 +- .../pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-client/pom.xml | 2 +- tests/hapi-fhir-base-test-mindeps-server/pom.xml | 2 +- 57 files changed, 73 insertions(+), 73 deletions(-) diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index 2925cddee83..9df4f52f5df 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 60f23bd7bcc..a03a6465c2a 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 00ce73745e2..912fe4efd95 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index d3c726265b4..fdb411e91dc 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/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 2816ae6159e..92bafa40399 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 7d9dc89fe6c..0c0e9694712 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 1055a8ed4ea..23fdc156c0e 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 8784078d56b..ae67b1dad2f 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index cef760eeff8..52fed03fb71 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index e7ac14275c6..f407f56be2d 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 2ec2f22795c..a988e2f45c5 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 24b559ea001..8ea8d57f03b 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 40519292d48..2fcd0c94674 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -78,13 +78,13 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu2 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT compile ca.uhn.hapi.fhir hapi-fhir-jpaserver-subscription - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT compile @@ -101,7 +101,7 @@ ca.uhn.hapi.fhir hapi-fhir-testpage-overlay - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT classes diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 43dd8b85ed7..1d22f0b5e4a 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index 073ecc3dbf0..b2004c3ad14 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index cce18f1d9c1..c3417a5963f 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index ac534aaccba..fa591624b35 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index eedfef43910..3fed26d92f7 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index a08e196fe26..6b49017689b 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index 20069c8fa7e..9be25f3da9e 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -144,13 +144,13 @@ ca.uhn.hapi.fhir hapi-fhir-test-utilities - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT test ca.uhn.hapi.fhir hapi-fhir-jpaserver-test-utilities - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT test diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index 3295a49c94a..29d7f7a9503 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml @@ -55,13 +55,13 @@ ca.uhn.hapi.fhir hapi-fhir-test-utilities - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT test ca.uhn.hapi.fhir hapi-fhir-jpaserver-test-utilities - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT test diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 68316dcf0db..be260a03b39 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index b46518bed86..7a40544f634 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 5dc3b7d17f4..5bc11f73872 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index fc862aea074..369918d69c8 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index b66f8e9615e..06b73aa7bac 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 183e9a6b602..9cec5a13cf8 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml @@ -164,7 +164,7 @@ ca.uhn.hapi.fhir hapi-fhir-converter - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index adc4be9c0ab..1952a50d819 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 1e71fc77421..4fe87a2ee16 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 d0905db3a66..19eedc6bfd2 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 919e895664c..656d16080d7 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 622de27723a..0f9be244025 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 ad0f6ed0cfb..9d5b6483f92 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 02e9d448d79..a57c5e80e1b 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 c210826be2c..3f90ae6bbcc 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index 38c1789454d..ff3fe4a179a 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index c8054db0e2b..61d4ea265db 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index 6659bcd46c2..9359dc2e980 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 04fc5a8cbc3..5a825a62517 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 8383bdda70a..e842ad1c049 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index e0793555c76..d5f9e85f836 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index f564ed044b8..490ba126870 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index ac4521d10e5..66f0f0ac9fd 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 0a140bc05ab..072a4f9a21c 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 4db0f72591a..f8cc76070d3 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 a3b7462547d..a69e2ea236d 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 33d67b4e94a..0061ae4ef6e 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 5f830ffce69..ace6fe58362 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 dbc5e9359b8..442455129ad 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index aafc58b15ba..a441397e88e 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index 6daf487888f..1da19fdaf24 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 6b9aa6546e9..2f98895c12d 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a30317cecab..109923b7ecc 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/restful-server-example/pom.xml b/restful-server-example/pom.xml index 7640191ae97..ee4e9459316 100644 --- a/restful-server-example/pom.xml +++ b/restful-server-example/pom.xml @@ -8,7 +8,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../pom.xml diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index 2ef7b674d4b..757146f0f1c 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 85242f389d3..e295bb2a92c 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-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 9716634f826..bde4aa9378f 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 - 5.4.0-PRE6-SNAPSHOT + 5.4.0-PRE7-SNAPSHOT ../../pom.xml