From d6ad4343393bfe1136224dca59fcaa54a859728a Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 6 Aug 2020 11:02:20 -0700 Subject: [PATCH] Rename class, add log --- .../ca/uhn/fhir/jpa/empi/broker/EmpiMessageHandler.java | 4 ++-- .../ca/uhn/fhir/jpa/empi/config/EmpiConsumerConfig.java | 6 +++--- ...ssageFilteringSvc.java => EmpiResourceFilteringSvc.java} | 3 ++- ...teringSvcTest.java => EmpiResourceFilteringSvcTest.java} | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) rename hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/{EmpiMessageFilteringSvc.java => EmpiResourceFilteringSvc.java} (93%) rename hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/{EmpiMessageFilteringSvcTest.java => EmpiResourceFilteringSvcTest.java} (90%) diff --git a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/broker/EmpiMessageHandler.java b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/broker/EmpiMessageHandler.java index 2883d7a8c33..9b05e2793b5 100644 --- a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/broker/EmpiMessageHandler.java +++ b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/broker/EmpiMessageHandler.java @@ -28,7 +28,7 @@ import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster; import ca.uhn.fhir.interceptor.api.Pointcut; import ca.uhn.fhir.jpa.empi.svc.EmpiMatchLinkSvc; -import ca.uhn.fhir.jpa.empi.svc.EmpiMessageFilteringSvc; +import ca.uhn.fhir.jpa.empi.svc.EmpiResourceFilteringSvc; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedJsonMessage; import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage; import ca.uhn.fhir.rest.server.TransactionLogMessages; @@ -52,7 +52,7 @@ public class EmpiMessageHandler implements MessageHandler { @Autowired private FhirContext myFhirContext; @Autowired - private EmpiMessageFilteringSvc myEmpiResourceFileringSvc; + private EmpiResourceFilteringSvc myEmpiResourceFileringSvc; @Override public void handleMessage(Message theMessage) throws MessagingException { diff --git a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/config/EmpiConsumerConfig.java b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/config/EmpiConsumerConfig.java index 22914903141..496d860923e 100644 --- a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/config/EmpiConsumerConfig.java +++ b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/config/EmpiConsumerConfig.java @@ -47,7 +47,7 @@ import ca.uhn.fhir.jpa.empi.svc.EmpiLinkSvcImpl; import ca.uhn.fhir.jpa.empi.svc.EmpiLinkUpdaterSvcImpl; import ca.uhn.fhir.jpa.empi.svc.EmpiMatchFinderSvcImpl; import ca.uhn.fhir.jpa.empi.svc.EmpiMatchLinkSvc; -import ca.uhn.fhir.jpa.empi.svc.EmpiMessageFilteringSvc; +import ca.uhn.fhir.jpa.empi.svc.EmpiResourceFilteringSvc; import ca.uhn.fhir.jpa.empi.svc.EmpiPersonDeletingSvc; import ca.uhn.fhir.jpa.empi.svc.EmpiPersonMergerSvcImpl; import ca.uhn.fhir.jpa.empi.svc.EmpiResetSvcImpl; @@ -214,7 +214,7 @@ public class EmpiConsumerConfig { } @Bean - EmpiMessageFilteringSvc empiMessageFilteringSvc() { - return new EmpiMessageFilteringSvc(); + EmpiResourceFilteringSvc empiMessageFilteringSvc() { + return new EmpiResourceFilteringSvc(); } } diff --git a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvc.java b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvc.java similarity index 93% rename from hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvc.java rename to hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvc.java index 3a09e7d4190..f455ef59eff 100644 --- a/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvc.java +++ b/hapi-fhir-jpaserver-empi/src/main/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvc.java @@ -15,7 +15,7 @@ import java.util.List; * */ @Service -public class EmpiMessageFilteringSvc { +public class EmpiResourceFilteringSvc { private static final Logger ourLog = Logs.getEmpiTroubleshootingLog(); @Autowired @@ -46,6 +46,7 @@ public class EmpiMessageFilteringSvc { .map(searchParam -> myEmpiSearchParamSvc.getValueFromResourceForSearchParam(theResource, searchParam)) .anyMatch(valueList -> !valueList.isEmpty()); + ourLog.debug("Is {} suitable for EMPI processing? : {}", theResource.getId(), containsValueForSomeSearchParam); return containsValueForSomeSearchParam; } diff --git a/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvcTest.java b/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvcTest.java similarity index 90% rename from hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvcTest.java rename to hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvcTest.java index 3e79a04f399..0b4ae216b44 100644 --- a/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiMessageFilteringSvcTest.java +++ b/hapi-fhir-jpaserver-empi/src/test/java/ca/uhn/fhir/jpa/empi/svc/EmpiResourceFilteringSvcTest.java @@ -10,10 +10,10 @@ import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; -class EmpiMessageFilteringSvcTest extends BaseEmpiR4Test { +class EmpiResourceFilteringSvcTest extends BaseEmpiR4Test { @Autowired - private EmpiMessageFilteringSvc myEmpiMessageFilteringSvc; + private EmpiResourceFilteringSvc myEmpiMessageFilteringSvc; @Test public void testFilterResourcesWhichHaveNoRelevantAttributes() {