diff --git a/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/interceptor/EmpiStorageInterceptorIT.java b/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/interceptor/EmpiStorageInterceptorIT.java index 56b0bebbc76..c2ac7766a1b 100644 --- a/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/interceptor/EmpiStorageInterceptorIT.java +++ b/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/interceptor/EmpiStorageInterceptorIT.java @@ -102,6 +102,19 @@ public class EmpiStorageInterceptorIT extends BaseEmpiR4Test { } } + @Test + public void testCreatingPersonWithInsufficentEMPIAttributesIsNotEMPIProcessed() throws InterruptedException { + myEmpiHelper.createWithLatch(new Patient()); + assertLinkCount(0); + } + + @Test + public void testCreatingPatientWithOneOrMoreMatchingAttributesIsEMPIProcessed() throws InterruptedException { + myEmpiHelper.createWithLatch(buildPaulPatient()); + assertLinkCount(1); + + } + @Test public void testCreateOrganizationWithEmpiTagForbidden() throws InterruptedException { //Creating a organization with the EMPI-MANAGED tag should fail