removed identifierSystem from extensionMatcher and removed related test
This commit is contained in:
parent
8ead3c5f22
commit
caaa040def
|
@ -19,11 +19,6 @@ public class ExtensionMatcher implements IMdmFieldMatcher{
|
||||||
|
|
||||||
boolean match = false;
|
boolean match = false;
|
||||||
|
|
||||||
if (theIdentifierSystem != null) {
|
|
||||||
leftExtension.removeIf(iBaseExtension -> !iBaseExtension.getUrl().equals(theIdentifierSystem));
|
|
||||||
rightExtension.removeIf(iBaseExtension -> !iBaseExtension.getUrl().equals(theIdentifierSystem));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (IBaseExtension leftExtensionValue : leftExtension) {
|
for (IBaseExtension leftExtensionValue : leftExtension) {
|
||||||
for (IBaseExtension rightExtensionValue : rightExtension) {
|
for (IBaseExtension rightExtensionValue : rightExtension) {
|
||||||
match |= ExtensionUtil.equals(leftExtensionValue, rightExtensionValue);
|
match |= ExtensionUtil.equals(leftExtensionValue, rightExtensionValue);
|
||||||
|
|
|
@ -57,22 +57,6 @@ public class ExtensionMatcherR4Test extends BaseMatcherR4Test {
|
||||||
assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
|
assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSpecificIdentifierSystem(){
|
|
||||||
Patient patient1 = new Patient();
|
|
||||||
Patient patient2 = new Patient();
|
|
||||||
|
|
||||||
patient1.addExtension("asd",new StringType("Patient1"));
|
|
||||||
patient1.addExtension("url1", new StringType("asd"));
|
|
||||||
patient2.addExtension("asd",new StringType("Patient1"));
|
|
||||||
patient2.addExtension("asdasd", new StringType("some value"));
|
|
||||||
patient2.addExtension("url1", new StringType("some value 123"));
|
|
||||||
|
|
||||||
assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, null));
|
|
||||||
assertTrue(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, "asd"));
|
|
||||||
assertFalse(MdmMatcherEnum.EXTENSION_ANY_ORDER.match(ourFhirContext, patient1, patient2, false, "url1"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPatientWithoutIntExtension(){
|
public void testPatientWithoutIntExtension(){
|
||||||
Patient patient1 = new Patient();
|
Patient patient1 = new Patient();
|
||||||
|
|
Loading…
Reference in New Issue