Fix resourcemastchersvc tests
This commit is contained in:
parent
d15ce0db08
commit
e4ce94bc7c
|
@ -12,6 +12,7 @@ import org.hl7.fhir.r4.model.Patient;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
public abstract class BaseEmpiRulesR4Test extends BaseR4Test {
|
public abstract class BaseEmpiRulesR4Test extends BaseR4Test {
|
||||||
public static final String PATIENT_GIVEN = "patient-given";
|
public static final String PATIENT_GIVEN = "patient-given";
|
||||||
|
@ -65,6 +66,7 @@ public abstract class BaseEmpiRulesR4Test extends BaseR4Test {
|
||||||
retval.addFilterSearchParam(activePatientsBlockingFilter);
|
retval.addFilterSearchParam(activePatientsBlockingFilter);
|
||||||
retval.addMatchField(myGivenNameMatchField);
|
retval.addMatchField(myGivenNameMatchField);
|
||||||
retval.addMatchField(lastNameMatchField);
|
retval.addMatchField(lastNameMatchField);
|
||||||
|
retval.setMdmTypes(Arrays.asList("Patient", "Practitioner", "Medication"));
|
||||||
retval.putMatchResult(myBothNameFields, EmpiMatchResultEnum.MATCH);
|
retval.putMatchResult(myBothNameFields, EmpiMatchResultEnum.MATCH);
|
||||||
retval.putMatchResult(PATIENT_GIVEN, EmpiMatchResultEnum.POSSIBLE_MATCH);
|
retval.putMatchResult(PATIENT_GIVEN, EmpiMatchResultEnum.POSSIBLE_MATCH);
|
||||||
return retval;
|
return retval;
|
||||||
|
|
|
@ -22,6 +22,8 @@ public class EmpiResourceMatcherSvcR4Test extends BaseEmpiRulesR4Test {
|
||||||
|
|
||||||
when(mySearchParamRetriever.getActiveSearchParam("Patient", "birthdate")).thenReturn(mock(RuntimeSearchParam.class));
|
when(mySearchParamRetriever.getActiveSearchParam("Patient", "birthdate")).thenReturn(mock(RuntimeSearchParam.class));
|
||||||
when(mySearchParamRetriever.getActiveSearchParam("Patient", "identifier")).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));
|
when(mySearchParamRetriever.getActiveSearchParam("Patient", "active")).thenReturn(mock(RuntimeSearchParam.class));
|
||||||
|
|
||||||
myEmpiResourceMatcherSvc = buildMatcher(buildActiveBirthdateIdRules());
|
myEmpiResourceMatcherSvc = buildMatcher(buildActiveBirthdateIdRules());
|
||||||
|
|
Loading…
Reference in New Issue