myFieldMatchers = new ArrayList<>();
- public MdmResourceMatcherSvc(FhirContext theFhirContext, IMdmSettings theMdmSettings) {
- myFhirContext = theFhirContext;
-
- setMdmSettings(theMdmSettings);
- }
+ private MdmRulesJson myMdmRulesJson;
- public void setMdmSettings(IMdmSettings theMdmSettings) {
+ public MdmResourceMatcherSvc(
+ FhirContext theFhirContext,
+ IMatcherFactory theIMatcherFactory,
+ IMdmSettings theMdmSettings
+ ) {
+ myFhirContext = theFhirContext;
+ myMatcherFactory = theIMatcherFactory;
myMdmRulesJson = theMdmSettings.getMdmRules();
addFieldMatchers();
@@ -69,7 +73,7 @@ private void addFieldMatchers() {
}
myFieldMatchers.clear();
for (MdmFieldMatchJson matchFieldJson : myMdmRulesJson.getMatchFields()) {
- myFieldMatchers.add(new MdmResourceFieldMatcher( myFhirContext, matchFieldJson, myMdmRulesJson));
+ myFieldMatchers.add(new MdmResourceFieldMatcher(myFhirContext, myMatcherFactory, matchFieldJson, myMdmRulesJson));
}
}
@@ -77,9 +81,8 @@ private void addFieldMatchers() {
* Given two {@link IBaseResource}s, perform all comparisons on them to determine an {@link MdmMatchResultEnum}, indicating
* to what level the two resources are considered to be matching.
*
- * @param theLeftResource The first {@link IBaseResource}.
+ * @param theLeftResource The first {@link IBaseResource}.
* @param theRightResource The second {@link IBaseResource}
- *
* @return an {@link MdmMatchResultEnum} indicating the result of the comparison.
*/
public MdmMatchOutcome getMatchResult(IBaseResource theLeftResource, IBaseResource theRightResource) {
@@ -91,8 +94,8 @@ MdmMatchOutcome match(IBaseResource theLeftResource, IBaseResource theRightResou
MdmMatchResultEnum matchResultEnum = myMdmRulesJson.getMatchResult(matchResult.getVector());
matchResult.setMatchResultEnum(matchResultEnum);
if (ourLog.isDebugEnabled()) {
- ourLog.debug("{} {}: {}", matchResult.getMatchResultEnum(), theRightResource.getIdElement().toUnqualifiedVersionless(), matchResult);
- if (ourLog.isTraceEnabled()) {
+ ourLog.debug("{} {}: {}", matchResult.getMatchResultEnum(), theRightResource.getIdElement().toUnqualifiedVersionless(), matchResult);
+ if (ourLog.isTraceEnabled()) {
ourLog.trace("Field matcher results:\n{}", myMdmRulesJson.getDetailedFieldMatchResultWithSuccessInformation(matchResult.getVector()));
}
}
@@ -105,11 +108,11 @@ MdmMatchOutcome match(IBaseResource theLeftResource, IBaseResource theRightResou
* start with a binary representation of the value 0 for long: 0000
* first_name matches, so the value `1` is bitwise-ORed to the current value (0) in right-most position.
* `0001`
- *
+ *
* Next, we look at the second field comparator, and see if it matches. If it does, we left-shift 1 by the index
* of the comparator, in this case also 1.
* `0010`
- *
+ *
* Then, we bitwise-or it with the current retval:
* 0001|0010 = 0011
* The binary string is now `0011`, which when you return it as a long becomes `3`.
@@ -146,11 +149,16 @@ private MdmMatchOutcome getMatchOutcome(IBaseResource theLeftResource, IBaseReso
return retVal;
}
-
- private boolean isValidResourceType(String theResourceType, String theFieldComparatorType) {
+ private boolean isValidResourceType(String theResourceType, String theFieldComparatorType) {
return (
theFieldComparatorType.equalsIgnoreCase(MdmConstants.ALL_RESOURCE_SEARCH_PARAM_TYPE)
- || theFieldComparatorType.equalsIgnoreCase(theResourceType)
+ || theFieldComparatorType.equalsIgnoreCase(theResourceType)
);
}
+
+ @VisibleForTesting
+ public void setMdmRulesJson(MdmRulesJson theMdmRulesJson) {
+ myMdmRulesJson = theMdmRulesJson;
+ addFieldMatchers();
+ }
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/BaseR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/BaseR4Test.java
index 494cd93992d3..c4e506656747 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/BaseR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/BaseR4Test.java
@@ -1,14 +1,19 @@
package ca.uhn.fhir.mdm;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.jpa.nickname.NicknameSvc;
+import ca.uhn.fhir.mdm.api.IMdmSettings;
import ca.uhn.fhir.mdm.api.MdmMatchOutcome;
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator;
import ca.uhn.fhir.mdm.rules.config.MdmSettings;
import ca.uhn.fhir.mdm.rules.json.MdmRulesJson;
+import ca.uhn.fhir.mdm.rules.matcher.IMatcherFactory;
+import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherFactory;
import ca.uhn.fhir.mdm.rules.svc.MdmResourceMatcherSvc;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import org.hl7.fhir.r4.model.Patient;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
@@ -20,6 +25,20 @@ public abstract class BaseR4Test {
protected static final FhirContext ourFhirContext = FhirContext.forR4();
protected ISearchParamRegistry mySearchParamRetriever = mock(ISearchParamRegistry.class);
+ protected IMatcherFactory myIMatcherFactory;
+
+ protected IMdmSettings myMdmSettings;
+
+ @BeforeEach
+ public void before() {
+ myMdmSettings = mock(IMdmSettings.class);
+ myIMatcherFactory = new MdmMatcherFactory(
+ ourFhirContext,
+ myMdmSettings,
+ new NicknameSvc()
+ );
+ }
+
protected Patient buildJohn() {
Patient patient = new Patient();
patient.addName().addGiven("John");
@@ -35,7 +54,10 @@ protected Patient buildJohny() {
}
protected MdmResourceMatcherSvc buildMatcher(MdmRulesJson theMdmRulesJson) {
- return new MdmResourceMatcherSvc(ourFhirContext, new MdmSettings(new MdmRuleValidator(ourFhirContext, mySearchParamRetriever)).setMdmRules(theMdmRulesJson));
+ return new MdmResourceMatcherSvc(ourFhirContext,
+ myIMatcherFactory,
+ new MdmSettings(new MdmRuleValidator(ourFhirContext, mySearchParamRetriever)).setMdmRules(theMdmRulesJson)
+ );
}
protected void assertMatch(MdmMatchResultEnum theExpectedMatchEnum, MdmMatchOutcome theMatchResult) {
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/json/VectorMatchResultMapTest.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/json/VectorMatchResultMapTest.java
index e129cf2f8356..19d105e6cd46 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/json/VectorMatchResultMapTest.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/json/VectorMatchResultMapTest.java
@@ -1,7 +1,7 @@
package ca.uhn.fhir.mdm.rules.json;
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
-import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherEnum;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -27,7 +27,7 @@ public void splitFieldMatchNames() {
@Test
public void testMatchBeforePossibleMatch() {
MdmRulesJson mdmRulesJson = new MdmRulesJson();
- MdmMatcherJson matcherJson = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.STRING);
+ MdmMatcherJson matcherJson = new MdmMatcherJson().setAlgorithm(MatchTypeEnum.STRING);
mdmRulesJson.addMatchField(new MdmFieldMatchJson().setName("given").setResourceType("Patient").setResourcePath("name.given").setMatcher(matcherJson));
mdmRulesJson.addMatchField(new MdmFieldMatchJson().setName("family").setResourceType("Patient").setResourcePath("name.family").setMatcher(matcherJson));
mdmRulesJson.addMatchField(new MdmFieldMatchJson().setName("prefix").setResourceType("Patient").setResourcePath("name.prefix").setMatcher(matcherJson));
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/BaseMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/BaseMatcherR4Test.java
index f6243442212d..5a19e8956be7 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/BaseMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/BaseMatcherR4Test.java
@@ -1,7 +1,16 @@
package ca.uhn.fhir.mdm.rules.matcher;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
+import org.junit.jupiter.api.BeforeEach;
public abstract class BaseMatcherR4Test {
protected static final FhirContext ourFhirContext = FhirContext.forR4();
+
+ protected MdmMatcherJson myMdmMatcherJson;
+
+ @BeforeEach
+ public void before() {
+ myMdmMatcherJson = new MdmMatcherJson();
+ }
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/DateMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/DateMatcherR4Test.java
index 113c8ba6a842..9b79f81a578f 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/DateMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/DateMatcherR4Test.java
@@ -1,8 +1,10 @@
package ca.uhn.fhir.mdm.rules.matcher;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.HapiDateMatcher;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import org.hl7.fhir.r4.model.DateTimeType;
import org.hl7.fhir.r4.model.DateType;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.util.Calendar;
@@ -14,6 +16,14 @@
public class DateMatcherR4Test extends BaseMatcherR4Test {
+ private HapiDateMatcher myDateMatcher;
+
+ @BeforeEach
+ public void before() {
+ super.before();
+ myDateMatcher = new HapiDateMatcher(ourFhirContext);
+ }
+
@Test
public void testExactDatePrecision() {
Calendar cal = new GregorianCalendar(2020, 6, 15);
@@ -43,7 +53,8 @@ public void testExactDatePrecision() {
}
private boolean dateMatch(Date theDate, Date theSameMonth, TemporalPrecisionEnum theTheDay) {
- return MdmMatcherEnum.DATE.match(ourFhirContext, new DateType(theDate, theTheDay), new DateType(theSameMonth, theTheDay), true, null);
+ myMdmMatcherJson.setExact(true);
+ return myDateMatcher.matches(new DateType(theDate, theTheDay), new DateType(theSameMonth, theTheDay), myMdmMatcherJson);
}
@Test
@@ -87,12 +98,11 @@ public void testExactDateTimePrecision() {
}
private boolean dateTimeMatch(Date theDate, Date theSecondDate, TemporalPrecisionEnum thePrecision, TemporalPrecisionEnum theSecondPrecision) {
- return MdmMatcherEnum.DATE.match(
- ourFhirContext,
+ myMdmMatcherJson.setExact(true);
+ return myDateMatcher.matches(
new DateTimeType(theDate, thePrecision),
new DateTimeType(theSecondDate, theSecondPrecision),
- true,
- null
+ myMdmMatcherJson
);
}
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/EmptyFieldMatcherTest.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/EmptyFieldMatcherTest.java
index f1ef1982b22b..67ba92324272 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/EmptyFieldMatcherTest.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/EmptyFieldMatcherTest.java
@@ -2,6 +2,8 @@
import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.EmptyFieldMatcher;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import ca.uhn.fhir.model.primitive.StringDt;
import org.junit.jupiter.api.Test;
@@ -16,16 +18,16 @@ public void testEmptyFieldMatch() {
StringDt leftEmpty = new StringDt("");
StringDt rightEmpty = new StringDt("");
StringDt right = new StringDt("a value");
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.EMPTY_FIELD);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
-
- assertTrue(fieldMatch.match(ourFhirContext, null, null).match);
- assertTrue(fieldMatch.match(ourFhirContext, null, rightEmpty).match);
- assertTrue(fieldMatch.match(ourFhirContext, leftEmpty, null).match);
- assertTrue(fieldMatch.match(ourFhirContext, leftEmpty, rightEmpty).match);
- assertFalse(fieldMatch.match(ourFhirContext, null, right).match);
- assertFalse(fieldMatch.match(ourFhirContext, left, null).match);
- assertFalse(fieldMatch.match(ourFhirContext, left, right).match);
+
+ EmptyFieldMatcher fieldMatch = new EmptyFieldMatcher();
+
+ assertTrue(fieldMatch.matches(null, null, null));
+ assertTrue(fieldMatch.matches(null, rightEmpty, null));
+ assertTrue(fieldMatch.matches(leftEmpty, null, null));
+ assertTrue(fieldMatch.matches(leftEmpty, rightEmpty, null));
+ assertFalse(fieldMatch.matches(null, right, null));
+ assertFalse(fieldMatch.matches(left, null, null));
+ assertFalse(fieldMatch.matches(left, right, null));
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcherR4Test.java
index c5252b1e0160..569e1b133fef 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/ExtensionMatcherR4Test.java
@@ -1,16 +1,28 @@
package ca.uhn.fhir.mdm.rules.matcher;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.ExtensionMatcher;
+import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4.model.IntegerType;
-import org.hl7.fhir.r4.model.Organization;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.StringType;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ExtensionMatcherR4Test extends BaseMatcherR4Test {
+
+ private ExtensionMatcher myExtensionMatcher;
+
+ @BeforeEach
+ public void before() {
+ super.before();
+
+ myExtensionMatcher = new ExtensionMatcher();
+ }
+
@Test
public void testPatientWithMatchingExtension(){
Patient patient1 = new Patient();
@@ -19,7 +31,7 @@ public void testPatientWithMatchingExtension(){
patient1.addExtension("asd",new StringType("Patient1"));
patient2.addExtension("asd",new StringType("Patient1"));
- assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertTrue(match(patient1, patient2));
}
@Test
@@ -30,7 +42,7 @@ public void testPatientWithoutMatchingExtension(){
patient1.addExtension("asd",new StringType("Patient1"));
patient2.addExtension("asd",new StringType("Patient2"));
- assertFalse(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertFalse(match(patient1, patient2));
}
@Test
@@ -41,7 +53,7 @@ public void testPatientSameValueDifferentUrl(){
patient1.addExtension("asd",new StringType("Patient1"));
patient2.addExtension("asd1",new StringType("Patient1"));
- assertFalse(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertFalse(match(patient1, patient2));
}
@Test
@@ -54,7 +66,7 @@ public void testPatientWithMultipleExtensionOneMatching(){
patient2.addExtension("asd",new StringType("Patient1"));
patient2.addExtension("asdasd", new StringType("some value"));
- assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertTrue(match(patient1, patient2));
}
@Test
@@ -65,7 +77,7 @@ public void testPatientWithoutIntExtension(){
patient1.addExtension("asd", new IntegerType(123));
patient2.addExtension("asd", new IntegerType(123));
- assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertTrue(match(patient1, patient2));
}
@Test
@@ -73,7 +85,10 @@ public void testPatientWithNoExtension(){
Patient patient1 = new Patient();
Patient patient2 = new Patient();
- assertFalse(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
+ assertFalse(match(patient1, patient2));
}
+ private boolean match(IBase theFirst, IBase theSecond) {
+ return myExtensionMatcher.matches(theFirst, theSecond, myMdmMatcherJson);
+ }
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/IdentifierMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/IdentifierMatcherR4Test.java
index 66666446f8a6..221eb0d87566 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/IdentifierMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/IdentifierMatcherR4Test.java
@@ -1,8 +1,9 @@
package ca.uhn.fhir.mdm.rules.matcher;
-import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
-import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.IdentifierMatcher;
+import org.hl7.fhir.instance.model.api.IBase;
import org.hl7.fhir.r4.model.Identifier;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -14,15 +15,20 @@ public class IdentifierMatcherR4Test extends BaseMatcherR4Test {
private static final String MATCHING_VALUE = "matchme";
private static final String OTHER_VALUE = "strange";
+ private IdentifierMatcher myIdentifierMatcher;
+
+ @BeforeEach
+ public void before() {
+ super.before();
+ myIdentifierMatcher = new IdentifierMatcher();
+ }
+
@Test
public void testIdentifierMatch() {
Identifier left = new Identifier().setSystem(MATCHING_SYSTEM).setValue(MATCHING_VALUE);
Identifier right = new Identifier().setSystem(MATCHING_SYSTEM).setValue(MATCHING_VALUE);
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.IDENTIFIER);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
-
- assertTrue(fieldMatch.match(ourFhirContext, left, right).match);
+ assertTrue(match(left, right));
}
@Test
@@ -33,17 +39,15 @@ public void testIdentifierNoMatch() {
Identifier rightNoSystem = new Identifier().setValue(MATCHING_VALUE);
Identifier rightNoValue = new Identifier().setSystem(MATCHING_SYSTEM);
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.IDENTIFIER);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
-
- assertFalse(fieldMatch.match(ourFhirContext, left, rightWrongSystem).match);
- assertFalse(fieldMatch.match(ourFhirContext, left, rightWrongValue).match);
- assertFalse(fieldMatch.match(ourFhirContext, left, rightNoSystem).match);
- assertFalse(fieldMatch.match(ourFhirContext, left, rightNoValue).match);
- assertFalse(fieldMatch.match(ourFhirContext, rightWrongSystem, left).match);
- assertFalse(fieldMatch.match(ourFhirContext, rightWrongValue, left).match);
- assertFalse(fieldMatch.match(ourFhirContext, rightNoSystem, left).match);
- assertFalse(fieldMatch.match(ourFhirContext, rightNoValue, left).match);
+
+ assertFalse(match(left, rightWrongSystem));
+ assertFalse(match(left, rightWrongValue));
+ assertFalse(match(left, rightNoSystem));
+ assertFalse(match(left, rightNoValue));
+ assertFalse(match(rightWrongSystem, left));
+ assertFalse(match(rightWrongValue, left));
+ assertFalse(match(rightNoSystem, left));
+ assertFalse(match(rightNoValue, left));
}
@Test
@@ -51,10 +55,9 @@ public void testIdentifierMatchWithNoValues() {
Identifier left = new Identifier().setSystem(MATCHING_SYSTEM);
Identifier right = new Identifier().setSystem(MATCHING_SYSTEM);
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.IDENTIFIER).setIdentifierSystem(MATCHING_SYSTEM);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
+ myMdmMatcherJson.setIdentifierSystem(MATCHING_SYSTEM);
- assertFalse(fieldMatch.match(ourFhirContext, left, right).match);
+ assertFalse(match(left, right));
}
@Test
@@ -62,10 +65,9 @@ public void testIdentifierNamedSystemMatch() {
Identifier left = new Identifier().setSystem(MATCHING_SYSTEM).setValue(MATCHING_VALUE);
Identifier right = new Identifier().setSystem(MATCHING_SYSTEM).setValue(MATCHING_VALUE);
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.IDENTIFIER).setIdentifierSystem(MATCHING_SYSTEM);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
+ myMdmMatcherJson.setIdentifierSystem(MATCHING_SYSTEM);
- assertTrue(fieldMatch.match(ourFhirContext, left, right).match);
+ assertTrue(match(left, right));
}
@Test
@@ -73,9 +75,12 @@ public void testIdentifierSystemNoMatch() {
Identifier left = new Identifier().setSystem(OTHER_SYSTEM).setValue(MATCHING_VALUE);
Identifier right = new Identifier().setSystem(OTHER_SYSTEM).setValue(MATCHING_VALUE);
- MdmMatcherJson matcher = new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.IDENTIFIER).setIdentifierSystem(MATCHING_SYSTEM);
- MdmFieldMatchJson fieldMatch = new MdmFieldMatchJson().setMatcher(matcher);
+ myMdmMatcherJson.setIdentifierSystem(MATCHING_SYSTEM);
+
+ assertFalse(match(left, right));
+ }
- assertFalse(fieldMatch.match(ourFhirContext, left, right).match);
+ private boolean match(IBase theFirst, IBase theSecond) {
+ return myIdentifierMatcher.matches(theFirst, theSecond, myMdmMatcherJson);
}
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/NicknameMatcherTest.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/NicknameMatcherTest.java
index f1ed249a21f5..d59a76312c25 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/NicknameMatcherTest.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/NicknameMatcherTest.java
@@ -1,31 +1,48 @@
package ca.uhn.fhir.mdm.rules.matcher;
+import ca.uhn.fhir.jpa.nickname.NicknameSvc;
+import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.NicknameMatcher;
+import ca.uhn.fhir.mdm.rules.matcher.models.IMdmFieldMatcher;
+import org.hl7.fhir.r4.model.StringType;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
class NicknameMatcherTest {
- IMdmStringMatcher matcher = new NicknameMatcher();
+ IMdmFieldMatcher matcher;
+
+ NicknameSvc myNicknameSvc = new NicknameSvc();
+
+ @BeforeEach
+ public void begin() {
+ matcher = new NicknameMatcher(myNicknameSvc);
+ }
@Test
public void testMatches() {
- assertTrue(matcher.matches("Ken", "ken"));
- assertTrue(matcher.matches("ken", "Ken"));
- assertTrue(matcher.matches("Ken", "Ken"));
- assertTrue(matcher.matches("Kenneth", "Ken"));
- assertTrue(matcher.matches("Kenneth", "Kenny"));
- assertTrue(matcher.matches("Ken", "Kenneth"));
- assertTrue(matcher.matches("Kenny", "Kenneth"));
- assertTrue(matcher.matches("Jim", "Jimmy"));
- assertTrue(matcher.matches("Jimmy", "Jim"));
- assertTrue(matcher.matches("Jim", "James"));
- assertTrue(matcher.matches("Jimmy", "James"));
- assertTrue(matcher.matches("James", "Jimmy"));
- assertTrue(matcher.matches("James", "Jim"));
+ Assertions.assertTrue(match("Ken", "ken"));
+ Assertions.assertTrue(match("ken", "Ken"));
+ Assertions.assertTrue(match("Ken", "Ken"));
+ Assertions.assertTrue(match("Kenneth", "Ken"));
+ Assertions.assertTrue(match("Kenneth", "Kenny"));
+ Assertions.assertTrue(match("Ken", "Kenneth"));
+ Assertions.assertTrue(match("Kenny", "Kenneth"));
+ Assertions.assertTrue(match("Jim", "Jimmy"));
+ Assertions.assertTrue(match("Jimmy", "Jim"));
+ Assertions.assertTrue(match("Jim", "James"));
+ Assertions.assertTrue(match("Jimmy", "James"));
+ Assertions.assertTrue(match("James", "Jimmy"));
+ Assertions.assertTrue(match("James", "Jim"));
- assertFalse(matcher.matches("Ken", "Bob"));
+ Assertions.assertFalse(match("Ken", "Bob"));
// These aren't nickname matches. If you want matches like these use a phonetic matcher
- assertFalse(matcher.matches("Allen", "Allan"));
+ Assertions.assertFalse(match("Allen", "Allan"));
+ }
+
+ private boolean match(String theFirst, String theSecond) {
+ MdmMatcherJson json = new MdmMatcherJson();
+ json.setExact(true);
+ return matcher.matches(new StringType(theFirst), new StringType(theSecond), json);
}
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/StringMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/StringMatcherR4Test.java
index 73aafb7aebed..646641f8966b 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/StringMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/matcher/StringMatcherR4Test.java
@@ -1,106 +1,140 @@
package ca.uhn.fhir.mdm.rules.matcher;
+import ca.uhn.fhir.jpa.nickname.NicknameSvc;
+import ca.uhn.fhir.mdm.api.IMdmSettings;
+import ca.uhn.fhir.mdm.rules.matcher.models.IMdmFieldMatcher;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.hl7.fhir.r4.model.BooleanType;
import org.hl7.fhir.r4.model.DateType;
import org.hl7.fhir.r4.model.Enumeration;
import org.hl7.fhir.r4.model.Enumerations;
import org.hl7.fhir.r4.model.StringType;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.annotation.Nonnull;
+
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.mock;
public class StringMatcherR4Test extends BaseMatcherR4Test {
private static final Logger ourLog = LoggerFactory.getLogger(StringMatcherR4Test.class);
public static final String LEFT_NAME = "namadega";
public static final String RIGHT_NAME = "namaedga";
+ private IMatcherFactory myIMatcherFactory;
+
+ private IMdmSettings myMdmSettings;
+
+ @BeforeEach
+ public void before() {
+ super.before();
+
+ myMdmSettings = mock(IMdmSettings.class);
+
+ myIMatcherFactory = new MdmMatcherFactory(
+ ourFhirContext,
+ myMdmSettings,
+ new NicknameSvc()
+ );
+ }
+
+ private @Nonnull IMdmFieldMatcher getFieldMatcher(MatchTypeEnum theMatchTypeEnum) {
+ return myIMatcherFactory.getFieldMatcherForMatchType(theMatchTypeEnum);
+ }
+
@Test
public void testNamadega() {
String left = LEFT_NAME;
String right = RIGHT_NAME;
- assertTrue(match(MdmMatcherEnum.COLOGNE, left, right));
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, left, right));
- assertTrue(match(MdmMatcherEnum.MATCH_RATING_APPROACH, left, right));
- assertTrue(match(MdmMatcherEnum.METAPHONE, left, right));
- assertTrue(match(MdmMatcherEnum.SOUNDEX, left, right));
- assertTrue(match(MdmMatcherEnum.METAPHONE, left, right));
-
- assertFalse(match(MdmMatcherEnum.CAVERPHONE1, left, right));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE2, left, right));
- assertFalse(match(MdmMatcherEnum.NYSIIS, left, right));
- assertFalse(match(MdmMatcherEnum.REFINED_SOUNDEX, left, right));
- assertFalse(match(MdmMatcherEnum.STRING, left, right));
- assertFalse(match(MdmMatcherEnum.SUBSTRING, left, right));
+ assertTrue(match(MatchTypeEnum.COLOGNE, left, right));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, left, right));
+ assertTrue(match(MatchTypeEnum.MATCH_RATING_APPROACH, left, right));
+ assertTrue(match(MatchTypeEnum.METAPHONE, left, right));
+ assertTrue(match(MatchTypeEnum.SOUNDEX, left, right));
+
+ assertFalse(match(MatchTypeEnum.CAVERPHONE1, left, right));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE2, left, right));
+ assertFalse(match(MatchTypeEnum.NYSIIS, left, right));
+ assertFalse(match(MatchTypeEnum.REFINED_SOUNDEX, left, right));
+ assertFalse(match(MatchTypeEnum.STRING, left, right));
+ assertFalse(match(MatchTypeEnum.SUBSTRING, left, right));
}
@Test
public void testNumeric() {
- assertTrue(match(MdmMatcherEnum.NUMERIC, "4169671111", "(416) 967-1111"));
- assertFalse(match(MdmMatcherEnum.NUMERIC, "5169671111", "(416) 967-1111"));
- assertFalse(match(MdmMatcherEnum.NUMERIC, "4169671111", "(416) 967-1111x123"));
+ assertTrue(match(MatchTypeEnum.NUMERIC, "4169671111", "(416) 967-1111"));
+ assertFalse(match(MatchTypeEnum.NUMERIC, "5169671111", "(416) 967-1111"));
+ assertFalse(match(MatchTypeEnum.NUMERIC, "4169671111", "(416) 967-1111x123"));
}
@Test
public void testMetaphone() {
- assertTrue(match(MdmMatcherEnum.METAPHONE, "Durie", "dury"));
- assertTrue(match(MdmMatcherEnum.METAPHONE, "Balo", "ballo"));
- assertTrue(match(MdmMatcherEnum.METAPHONE, "Hans Peter", "Hanspeter"));
- assertTrue(match(MdmMatcherEnum.METAPHONE, "Lawson", "Law son"));
-
- assertFalse(match(MdmMatcherEnum.METAPHONE, "Allsop", "Allsob"));
- assertFalse(match(MdmMatcherEnum.METAPHONE, "Gevne", "Geve"));
- assertFalse(match(MdmMatcherEnum.METAPHONE, "Bruce", "Bruch"));
- assertFalse(match(MdmMatcherEnum.METAPHONE, "Smith", "Schmidt"));
- assertFalse(match(MdmMatcherEnum.METAPHONE, "Jyothi", "Jyoti"));
+ assertTrue(match(MatchTypeEnum.METAPHONE, "Durie", "dury"));
+ assertTrue(match(MatchTypeEnum.METAPHONE, "Balo", "ballo"));
+ assertTrue(match(MatchTypeEnum.METAPHONE, "Hans Peter", "Hanspeter"));
+ assertTrue(match(MatchTypeEnum.METAPHONE, "Lawson", "Law son"));
+
+ assertFalse(match(MatchTypeEnum.METAPHONE, "Allsop", "Allsob"));
+ assertFalse(match(MatchTypeEnum.METAPHONE, "Gevne", "Geve"));
+ assertFalse(match(MatchTypeEnum.METAPHONE, "Bruce", "Bruch"));
+ assertFalse(match(MatchTypeEnum.METAPHONE, "Smith", "Schmidt"));
+ assertFalse(match(MatchTypeEnum.METAPHONE, "Jyothi", "Jyoti"));
}
@Test
public void testDoubleMetaphone() {
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Durie", "dury"));
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Balo", "ballo"));
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Hans Peter", "Hanspeter"));
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Lawson", "Law son"));
- assertTrue(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Allsop", "Allsob"));
-
- assertFalse(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Gevne", "Geve"));
- assertFalse(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Bruce", "Bruch"));
- assertFalse(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Smith", "Schmidt"));
- assertFalse(match(MdmMatcherEnum.DOUBLE_METAPHONE, "Jyothi", "Jyoti"));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, "Durie", "dury"));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, "Balo", "ballo"));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, "Hans Peter", "Hanspeter"));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, "Lawson", "Law son"));
+ assertTrue(match(MatchTypeEnum.DOUBLE_METAPHONE, "Allsop", "Allsob"));
+
+ assertFalse(match(MatchTypeEnum.DOUBLE_METAPHONE, "Gevne", "Geve"));
+ assertFalse(match(MatchTypeEnum.DOUBLE_METAPHONE, "Bruce", "Bruch"));
+ assertFalse(match(MatchTypeEnum.DOUBLE_METAPHONE, "Smith", "Schmidt"));
+ assertFalse(match(MatchTypeEnum.DOUBLE_METAPHONE, "Jyothi", "Jyoti"));
}
@Test
public void testNormalizeCase() {
- assertTrue(match(MdmMatcherEnum.STRING, "joe", "JoE"));
- assertTrue(match(MdmMatcherEnum.STRING, "MCTAVISH", "McTavish"));
+ assertTrue(match(MatchTypeEnum.STRING, "joe", "JoE"));
+ assertTrue(match(MatchTypeEnum.STRING, "MCTAVISH", "McTavish"));
- assertFalse(match(MdmMatcherEnum.STRING, "joey", "joe"));
- assertFalse(match(MdmMatcherEnum.STRING, "joe", "joey"));
+ assertFalse(match(MatchTypeEnum.STRING, "joey", "joe"));
+ assertFalse(match(MatchTypeEnum.STRING, "joe", "joey"));
}
@Test
public void testExactString() {
- assertTrue(MdmMatcherEnum.STRING.match(ourFhirContext, new StringType("Jilly"), new StringType("Jilly"), true, null));
+ myMdmMatcherJson.setExact(true);
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, new StringType("MCTAVISH"), new StringType("McTavish"), true, null));
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, new StringType("Durie"), new StringType("dury"), true, null));
+ assertTrue(getFieldMatcher(MatchTypeEnum.STRING).matches(new StringType("Jilly"), new StringType("Jilly"), myMdmMatcherJson));
+
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(new StringType("MCTAVISH"), new StringType("McTavish"), myMdmMatcherJson));
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(new StringType("Durie"), new StringType("dury"), myMdmMatcherJson));
}
@Test
public void testExactBoolean() {
- assertTrue(MdmMatcherEnum.STRING.match(ourFhirContext, new BooleanType(true), new BooleanType(true), true, null));
+ myMdmMatcherJson.setExact(true);
+
+ assertTrue(getFieldMatcher(MatchTypeEnum.STRING).matches(new BooleanType(true), new BooleanType(true), myMdmMatcherJson));
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, new BooleanType(true), new BooleanType(false), true, null));
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, new BooleanType(false), new BooleanType(true), true, null));
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(new BooleanType(true), new BooleanType(false), myMdmMatcherJson));
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(new BooleanType(false), new BooleanType(true), myMdmMatcherJson));
}
@Test
public void testExactDateString() {
- assertTrue(MdmMatcherEnum.STRING.match(ourFhirContext, new DateType("1965-08-09"), new DateType("1965-08-09"), true, null));
+ myMdmMatcherJson.setExact(true);
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, new DateType("1965-08-09"), new DateType("1965-09-08"), true, null));
+ assertTrue(getFieldMatcher(MatchTypeEnum.STRING).matches(new DateType("1965-08-09"), new DateType("1965-08-09"), myMdmMatcherJson));
+
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(new DateType("1965-08-09"), new DateType("1965-09-08"), myMdmMatcherJson));
}
@@ -112,52 +146,55 @@ public void testExactGender() {
Enumeration female = new Enumeration(new Enumerations.AdministrativeGenderEnumFactory());
female.setValue(Enumerations.AdministrativeGender.FEMALE);
- assertTrue(MdmMatcherEnum.STRING.match(ourFhirContext, male, male, true, null));
+ myMdmMatcherJson.setExact(true);
+
+ assertTrue(getFieldMatcher(MatchTypeEnum.STRING).matches(male, male, myMdmMatcherJson));
- assertFalse(MdmMatcherEnum.STRING.match(ourFhirContext, male, female, true, null));
+ assertFalse(getFieldMatcher(MatchTypeEnum.STRING).matches(male, female, myMdmMatcherJson));
}
@Test
public void testSoundex() {
- assertTrue(match(MdmMatcherEnum.SOUNDEX, "Gail", "Gale"));
- assertTrue(match(MdmMatcherEnum.SOUNDEX, "John", "Jon"));
- assertTrue(match(MdmMatcherEnum.SOUNDEX, "Thom", "Tom"));
+ assertTrue(match(MatchTypeEnum.SOUNDEX, "Gail", "Gale"));
+ assertTrue(match(MatchTypeEnum.SOUNDEX, "John", "Jon"));
+ assertTrue(match(MatchTypeEnum.SOUNDEX, "Thom", "Tom"));
- assertFalse(match(MdmMatcherEnum.SOUNDEX, "Fred", "Frank"));
- assertFalse(match(MdmMatcherEnum.SOUNDEX, "Thomas", "Tom"));
+ assertFalse(match(MatchTypeEnum.SOUNDEX, "Fred", "Frank"));
+ assertFalse(match(MatchTypeEnum.SOUNDEX, "Thomas", "Tom"));
}
@Test
public void testCaverphone1() {
- assertTrue(match(MdmMatcherEnum.CAVERPHONE1, "Gail", "Gael"));
- assertTrue(match(MdmMatcherEnum.CAVERPHONE1, "John", "Jon"));
+ assertTrue(match(MatchTypeEnum.CAVERPHONE1, "Gail", "Gael"));
+ assertTrue(match(MatchTypeEnum.CAVERPHONE1, "John", "Jon"));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE1, "Gail", "Gale"));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE1, "Fred", "Frank"));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE1, "Thomas", "Tom"));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE1, "Gail", "Gale"));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE1, "Fred", "Frank"));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE1, "Thomas", "Tom"));
}
@Test
public void testCaverphone2() {
- assertTrue(match(MdmMatcherEnum.CAVERPHONE2, "Gail", "Gael"));
- assertTrue(match(MdmMatcherEnum.CAVERPHONE2, "John", "Jon"));
- assertTrue(match(MdmMatcherEnum.CAVERPHONE2, "Gail", "Gale"));
+ assertTrue(match(MatchTypeEnum.CAVERPHONE2, "Gail", "Gael"));
+ assertTrue(match(MatchTypeEnum.CAVERPHONE2, "John", "Jon"));
+ assertTrue(match(MatchTypeEnum.CAVERPHONE2, "Gail", "Gale"));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE2, "Fred", "Frank"));
- assertFalse(match(MdmMatcherEnum.CAVERPHONE2, "Thomas", "Tom"));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE2, "Fred", "Frank"));
+ assertFalse(match(MatchTypeEnum.CAVERPHONE2, "Thomas", "Tom"));
}
@Test
public void testNormalizeSubstring() {
- assertTrue(match(MdmMatcherEnum.SUBSTRING, "BILLY", "Bill"));
- assertTrue(match(MdmMatcherEnum.SUBSTRING, "Bill", "Billy"));
- assertTrue(match(MdmMatcherEnum.SUBSTRING, "FRED", "Frederik"));
+ assertTrue(match(MatchTypeEnum.SUBSTRING, "BILLY", "Bill"));
+ assertTrue(match(MatchTypeEnum.SUBSTRING, "Bill", "Billy"));
+ assertTrue(match(MatchTypeEnum.SUBSTRING, "FRED", "Frederik"));
- assertFalse(match(MdmMatcherEnum.SUBSTRING, "Fred", "Friederik"));
+ assertFalse(match(MatchTypeEnum.SUBSTRING, "Fred", "Friederik"));
}
- private boolean match(MdmMatcherEnum theMatcher, String theLeft, String theRight) {
- return theMatcher.match(ourFhirContext, new StringType(theLeft), new StringType(theRight), false, null);
+ private boolean match(MatchTypeEnum theMatcher, String theLeft, String theRight) {
+ return getFieldMatcher(theMatcher)
+ .matches(new StringType(theLeft), new StringType(theRight), myMdmMatcherJson);
}
}
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/BaseMdmRulesR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/BaseMdmRulesR4Test.java
index ce8721b97eb3..4ef383b97677 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/BaseMdmRulesR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/BaseMdmRulesR4Test.java
@@ -29,6 +29,7 @@ public abstract class BaseMdmRulesR4Test extends BaseR4Test {
@BeforeEach
public void before() {
+ super.before();
myMdmRulesJson = new MdmRulesJson();
ArrayList myLegalMdmTypes = new ArrayList<>();
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/CustomResourceMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/CustomResourceMatcherR4Test.java
index 7232394673e8..d46e225119ff 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/CustomResourceMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/CustomResourceMatcherR4Test.java
@@ -6,7 +6,7 @@
import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
import ca.uhn.fhir.mdm.rules.json.MdmRulesJson;
-import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherEnum;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.hl7.fhir.r4.model.HumanName;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeAll;
@@ -20,7 +20,7 @@
public class CustomResourceMatcherR4Test extends BaseR4Test {
- public static final String FIELD_EXACT_MATCH_NAME = MdmMatcherEnum.NAME_ANY_ORDER.name();
+ public static final String FIELD_EXACT_MATCH_NAME = MatchTypeEnum.NAME_ANY_ORDER.name();
private static Patient ourJohnHenry;
private static Patient ourJohnHENRY;
private static Patient ourJaneHenry;
@@ -32,6 +32,7 @@ public class CustomResourceMatcherR4Test extends BaseR4Test {
@BeforeEach
public void before() {
+ super.before();
when(mySearchParamRetriever.getActiveSearchParam("Patient", "identifier")).thenReturn(mock(RuntimeSearchParam.class));
when(mySearchParamRetriever.getActiveSearchParam("Practitioner", "identifier")).thenReturn(mock(RuntimeSearchParam.class));
when(mySearchParamRetriever.getActiveSearchParam("Medication", "identifier")).thenReturn(mock(RuntimeSearchParam.class));
@@ -40,7 +41,8 @@ public void before() {
@Test
public void testExactNameAnyOrder() {
- MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MdmMatcherEnum.NAME_ANY_ORDER, true));
+ MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MatchTypeEnum.NAME_ANY_ORDER, true));
+
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourJohnHenry));
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJohn));
assertMatch(MdmMatchResultEnum.NO_MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJOHN));
@@ -53,7 +55,8 @@ public void testExactNameAnyOrder() {
@Test
public void testNormalizedNameAnyOrder() {
- MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MdmMatcherEnum.NAME_ANY_ORDER, false));
+ MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MatchTypeEnum.NAME_ANY_ORDER, false));
+
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourJohnHenry));
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJohn));
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJOHN));
@@ -66,7 +69,8 @@ public void testNormalizedNameAnyOrder() {
@Test
public void testExactNameFirstAndLast() {
- MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MdmMatcherEnum.NAME_FIRST_AND_LAST, true));
+ MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MatchTypeEnum.NAME_FIRST_AND_LAST, true));
+
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourJohnHenry));
assertMatchResult(MdmMatchResultEnum.MATCH, 1L, 1.0, false, false, nameAnyOrderMatcher.match(ourJohnHenry, ourJohnHenry));
assertMatch(MdmMatchResultEnum.NO_MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJohn));
@@ -80,7 +84,8 @@ public void testExactNameFirstAndLast() {
@Test
public void testNormalizedNameFirstAndLast() {
- MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MdmMatcherEnum.NAME_FIRST_AND_LAST, false));
+ MdmResourceMatcherSvc nameAnyOrderMatcher = buildMatcher(buildNameRules(MatchTypeEnum.NAME_FIRST_AND_LAST, false));
+
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourJohnHenry));
assertMatch(MdmMatchResultEnum.NO_MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJohn));
assertMatch(MdmMatchResultEnum.NO_MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourHenryJOHN));
@@ -91,7 +96,7 @@ public void testNormalizedNameFirstAndLast() {
assertMatch(MdmMatchResultEnum.MATCH, nameAnyOrderMatcher.match(ourJohnHenry, ourBillyJohnHenry));
}
- private MdmRulesJson buildNameRules(MdmMatcherEnum theAlgorithm, boolean theExact) {
+ private MdmRulesJson buildNameRules(MatchTypeEnum theAlgorithm, boolean theExact) {
MdmMatcherJson matcherJson = new MdmMatcherJson().setAlgorithm(theAlgorithm).setExact(theExact);
MdmFieldMatchJson nameAnyOrderFieldMatch = new MdmFieldMatchJson()
.setName(FIELD_EXACT_MATCH_NAME)
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/FhirPathResourceMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/FhirPathResourceMatcherR4Test.java
index b482fcd71caa..d46a0d067767 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/FhirPathResourceMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/FhirPathResourceMatcherR4Test.java
@@ -6,7 +6,7 @@
import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
import ca.uhn.fhir.mdm.rules.json.MdmRulesJson;
-import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherEnum;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.hl7.fhir.r4.model.HumanName;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeEach;
@@ -46,10 +46,9 @@ public void before() {
}
}
-
@Test
public void testFhirPathOrderedMatches() {
- MdmResourceMatcherSvc matcherSvc = buildMatcher(buildOrderedGivenNameRules(MdmMatcherEnum.STRING));
+ MdmResourceMatcherSvc matcherSvc = buildMatcher(buildOrderedGivenNameRules(MatchTypeEnum.STRING));
myLeft = new Patient();
HumanName name = myLeft.addName();
@@ -63,6 +62,7 @@ public void testFhirPathOrderedMatches() {
name2.addGiven("Gary");
myRight.setId("Patient/2");
+ // test
MdmMatchOutcome result = matcherSvc.match(myLeft, myRight);
assertMatchResult(MdmMatchResultEnum.NO_MATCH, 0L, 0.0, false, false, result);
@@ -85,12 +85,12 @@ public void testFhirPathOrderedMatches() {
@Test
public void testStringMatchResult() {
- MdmResourceMatcherSvc matcherSvc = buildMatcher(buildOrderedGivenNameRules(MdmMatcherEnum.STRING));
+ MdmResourceMatcherSvc matcherSvc = buildMatcher(buildOrderedGivenNameRules(MatchTypeEnum.STRING));
MdmMatchOutcome result = matcherSvc.match(myLeft, myRight);
assertMatchResult(MdmMatchResultEnum.NO_MATCH, 0L, 0.0, false, false, result);
}
- protected MdmRulesJson buildOrderedGivenNameRules(MdmMatcherEnum theMatcherEnum) {
+ protected MdmRulesJson buildOrderedGivenNameRules(MatchTypeEnum theMatcherEnum) {
MdmFieldMatchJson firstGivenNameMatchField = new MdmFieldMatchJson()
.setName(PATIENT_GIVEN_FIRST)
.setResourceType("Patient")
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceFieldMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceFieldMatcherR4Test.java
index c00841ca7083..c47be74ba27e 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceFieldMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceFieldMatcherR4Test.java
@@ -3,10 +3,8 @@
import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
import ca.uhn.fhir.mdm.rules.json.MdmRulesJson;
-import ca.uhn.fhir.mdm.rules.json.MdmSimilarityJson;
-import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherEnum;
-import ca.uhn.fhir.mdm.rules.similarity.MdmSimilarityEnum;
-import ca.uhn.fhir.parser.DataFormatException;
+import ca.uhn.fhir.mdm.rules.matcher.fieldmatchers.EmptyFieldMatcher;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.hl7.fhir.r4.model.Encounter;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeEach;
@@ -14,12 +12,12 @@
import java.util.Arrays;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.StringStartsWith.startsWith;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
public class MdmResourceFieldMatcherR4Test extends BaseMdmRulesR4Test {
protected MdmResourceFieldMatcher myComparator;
@@ -30,7 +28,13 @@ public class MdmResourceFieldMatcherR4Test extends BaseMdmRulesR4Test {
@BeforeEach
public void before() {
super.before();
- myComparator = new MdmResourceFieldMatcher(ourFhirContext, myGivenNameMatchField, myMdmRulesJson);
+
+ myComparator = new MdmResourceFieldMatcher(
+ ourFhirContext,
+ myIMatcherFactory,
+ myGivenNameMatchField,
+ myMdmRulesJson
+ );
myJohn = buildJohn();
myJohny = buildJohny();
}
@@ -44,8 +48,13 @@ public void testEmptyPath() {
.setName("empty-given")
.setResourceType("Patient")
.setResourcePath("name.given")
- .setMatcher(new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.EMPTY_FIELD));
- myComparator = new MdmResourceFieldMatcher(ourFhirContext, myGivenNameMatchField, myMdmRulesJson);
+ .setMatcher(new MdmMatcherJson().setAlgorithm(MatchTypeEnum.EMPTY_FIELD));
+ myComparator = new MdmResourceFieldMatcher(
+ ourFhirContext,
+ myIMatcherFactory,
+ myGivenNameMatchField,
+ myMdmRulesJson
+ );
assertFalse(myComparator.match(myJohn, myJohny).match);
@@ -90,6 +99,9 @@ public void testBadType() {
}
}
+ // TODO - what is this supposed to test?
+ // it relies on matcher being null (is this a reasonable assumption?)
+ // and falls through to similarity check
@Test
public void testMatch() {
assertTrue(myComparator.match(myJohn, myJohny).match);
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceMatcherSvcR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceMatcherSvcR4Test.java
index 912348f59808..61045b37671c 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceMatcherSvcR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/MdmResourceMatcherSvcR4Test.java
@@ -36,7 +36,6 @@ public void before() {
public void testCompareFirstNameMatch() {
MdmMatchOutcome result = myMdmResourceMatcherSvc.match(myJohn, myJohny);
assertMatchResult(MdmMatchResultEnum.POSSIBLE_MATCH, 1L, 0.816, false, false, result);
-
}
@Test
diff --git a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/ResourceMatcherR4Test.java b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/ResourceMatcherR4Test.java
index 8a2342c93980..8fa816bc5f11 100644
--- a/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/ResourceMatcherR4Test.java
+++ b/hapi-fhir-server-mdm/src/test/java/ca/uhn/fhir/mdm/rules/svc/ResourceMatcherR4Test.java
@@ -6,7 +6,7 @@
import ca.uhn.fhir.mdm.rules.json.MdmFieldMatchJson;
import ca.uhn.fhir.mdm.rules.json.MdmMatcherJson;
import ca.uhn.fhir.mdm.rules.json.MdmRulesJson;
-import ca.uhn.fhir.mdm.rules.matcher.MdmMatcherEnum;
+import ca.uhn.fhir.mdm.rules.matcher.models.MatchTypeEnum;
import org.hl7.fhir.r4.model.HumanName;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeEach;
@@ -55,19 +55,21 @@ public void before() {
@Test
public void testMetaphoneMatchResult() {
- MdmResourceMatcherSvc matcherSvc = buildMatcher(buildNamePhoneRules(MdmMatcherEnum.METAPHONE));
- MdmMatchOutcome result = matcherSvc.match(myLeft, myRight);
- assertMatchResult(MdmMatchResultEnum.MATCH, 7L, 3.0, false, false, result);
+ MdmResourceMatcherSvc matcherSvc = buildMatcher(buildNamePhoneRules(MatchTypeEnum.METAPHONE));
+
+ MdmMatchOutcome result = matcherSvc.match(myLeft, myRight);
+ assertMatchResult(MdmMatchResultEnum.MATCH, 7L, 3.0, false, false, result);
}
@Test
public void testStringMatchResult() {
- MdmResourceMatcherSvc matcherSvc = buildMatcher(buildNamePhoneRules(MdmMatcherEnum.STRING));
+ MdmResourceMatcherSvc matcherSvc = buildMatcher(buildNamePhoneRules(MatchTypeEnum.STRING));
+
MdmMatchOutcome result = matcherSvc.match(myLeft, myRight);
assertMatchResult(MdmMatchResultEnum.NO_MATCH, 5L, 2.0, false, false, result);
}
- protected MdmRulesJson buildNamePhoneRules(MdmMatcherEnum theMatcherEnum) {
+ protected MdmRulesJson buildNamePhoneRules(MatchTypeEnum theMatcherEnum) {
MdmFieldMatchJson lastNameMatchField = new MdmFieldMatchJson()
.setName(PATIENT_FAMILY)
.setResourceType("Patient")
@@ -84,7 +86,7 @@ protected MdmRulesJson buildNamePhoneRules(MdmMatcherEnum theMatcherEnum) {
.setName(PATIENT_PHONE)
.setResourceType("Patient")
.setResourcePath("telecom.value")
- .setMatcher(new MdmMatcherJson().setAlgorithm(MdmMatcherEnum.STRING));
+ .setMatcher(new MdmMatcherJson().setAlgorithm(MatchTypeEnum.STRING));
MdmRulesJson retval = new MdmRulesJson();
retval.setVersion("test version");
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index f84a86302a15..0ed640c27aee 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index b30a941fc9c9..77ff5e85d8c1 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
index 70d41bc55aad..4131a72db783 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
index 5ba003ee8c69..18bb22d455ec 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
@@ -21,7 +21,7 @@
ca.uhn.hapi.fhir
hapi-fhir-caching-api
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
index bbce9743293b..181f50506b73 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
index 4e213837c38d..09bd53681888 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir
ca.uhn.hapi.fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../../pom.xml
diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml
index 336f2807cd3d..2b208f2a4c83 100644
--- a/hapi-fhir-serviceloaders/pom.xml
+++ b/hapi-fhir-serviceloaders/pom.xml
@@ -5,7 +5,7 @@
hapi-deployable-pom
ca.uhn.hapi.fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-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 74e6524c6d37..2eadb3aacf0a 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.7.3-SNAPSHOT
+ 6.7.6-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 ef7ce4e2eb2b..68729f911045 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.7.3-SNAPSHOT
+ 6.7.6-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 bbce2275e644..911ef458004d 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
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 f22a1b77e9f4..053dae392132 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
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 3b40f5b70766..c3eb384e2d29 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
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 6cbac82b2130..e04106d945d0 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 2fb0f60836ae..67f1758a05e5 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index ffc7c6d92eac..41aee3a6ef1e 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.7.3-SNAPSHOT
+ 6.7.6-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 b5254c05b8ea..2c0d483fb576 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml
index f6e4d2c5da42..3db7d7909f2d 100644
--- a/hapi-fhir-storage-batch2-test-utilities/pom.xml
+++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
@@ -55,11 +55,6 @@
junit-jupiter-params
compile
-
- org.hamcrest
- hamcrest
- compile
-
org.mockito
mockito-core
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index 75dde80756ec..e2943e16547c 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml
index 622754f0120b..ce757764d18a 100644
--- a/hapi-fhir-storage-cr/pom.xml
+++ b/hapi-fhir-storage-cr/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index b5afd30d2fa5..41683f2c5d40 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 470892e5168d..e7cafc21ef9a 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index ff63e862464d..c72de5445b21 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index d8eca92c3795..d4a6a4844537 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index eac2f1a2d764..f920fdb6a50e 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index e28f1911df13..ebb9ff22aca4 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.7.3-SNAPSHOT
+ 6.7.6-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 3038ea589039..9278f52c527a 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 80afda1d51f5..394367d5c853 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml
index 7c63abd158ea..d177f89fc084 100644
--- a/hapi-fhir-structures-r4b/pom.xml
+++ b/hapi-fhir-structures-r4b/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 05e2adef8ee5..4c11c9587612 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index 96a0bcf9f20c..8a6521ad8fe4 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index a618f4af12c1..7c9d233c8508 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index c8a5ebb5d143..a1a323051833 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.7.3-SNAPSHOT
+ 6.7.6-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 660a8568519a..7017285ebb01 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.7.3-SNAPSHOT
+ 6.7.6-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 c07f70601b4d..b1be1ffeddba 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.7.3-SNAPSHOT
+ 6.7.6-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 1bff9aa5ac9b..a7ae0bf600d5 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml
index 83fbb803661b..820dcfca45c8 100644
--- a/hapi-fhir-validation-resources-r4b/pom.xml
+++ b/hapi-fhir-validation-resources-r4b/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 6.7.3-SNAPSHOT
+ 6.7.6-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 070f9931a4c0..643beeae9f92 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 26d4c89c42f0..f5e16d515b5b 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 627d86b0b6e3..702abdb1b300 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index 828b6abf7dd7..ee21d7e99080 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 7370c9e2bafd..0dbdabd1b237 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 6.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index 91037292edc5..f6e04cc5db08 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 6.7.3-SNAPSHOT
+ 6.7.6-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 11de060de8a2..535894c9cc03 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.7.3-SNAPSHOT
+ 6.7.6-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 cc858f7f0afb..bde81d287541 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.7.3-SNAPSHOT
+ 6.7.6-SNAPSHOT
../../pom.xml