removed identifierSystem from extensionMatcher and removed related test

This commit is contained in:
long 2021-03-23 13:21:32 -06:00
parent 8ead3c5f22
commit caaa040def
2 changed files with 0 additions and 21 deletions

View File

@ -19,11 +19,6 @@ public class ExtensionMatcher implements IMdmFieldMatcher{
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 rightExtensionValue : rightExtension) {
match |= ExtensionUtil.equals(leftExtensionValue, rightExtensionValue);

View File

@ -57,22 +57,6 @@ public class ExtensionMatcherR4Test extends BaseMatcherR4Test {
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
public void testPatientWithoutIntExtension(){
Patient patient1 = new Patient();