Fix resourcemastchersvc tests

This commit is contained in:
Tadgh 2020-11-16 20:06:46 -05:00
parent d15ce0db08
commit e4ce94bc7c
2 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeEach;
import java.util.ArrayList;
import java.util.Arrays;
public abstract class BaseEmpiRulesR4Test extends BaseR4Test {
public static final String PATIENT_GIVEN = "patient-given";
@ -65,6 +66,7 @@ public abstract class BaseEmpiRulesR4Test extends BaseR4Test {
retval.addFilterSearchParam(activePatientsBlockingFilter);
retval.addMatchField(myGivenNameMatchField);
retval.addMatchField(lastNameMatchField);
retval.setMdmTypes(Arrays.asList("Patient", "Practitioner", "Medication"));
retval.putMatchResult(myBothNameFields, EmpiMatchResultEnum.MATCH);
retval.putMatchResult(PATIENT_GIVEN, EmpiMatchResultEnum.POSSIBLE_MATCH);
return retval;

View File

@ -22,6 +22,8 @@ public class EmpiResourceMatcherSvcR4Test extends BaseEmpiRulesR4Test {
when(mySearchParamRetriever.getActiveSearchParam("Patient", "birthdate")).thenReturn(mock(RuntimeSearchParam.class));
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));
when(mySearchParamRetriever.getActiveSearchParam("Patient", "active")).thenReturn(mock(RuntimeSearchParam.class));
myEmpiResourceMatcherSvc = buildMatcher(buildActiveBirthdateIdRules());