From e4ad37031430bc3cab3f47629584653c7af63e50 Mon Sep 17 00:00:00 2001 From: Luke deGruchy Date: Thu, 22 Dec 2022 13:12:30 -0500 Subject: [PATCH] Remove duplicate dependency (MemberMatcherR4Helper) from JpaConfig that was present in both JpaConfig and JpaR4Config. (#4390) * Remove duplicate dependency (MemberMatcherR4Helper) from JpaConfig that was present in both JpaConfig and JpaR4Config. * Add back @Import for JpaConfig to JpaDstu2Config to resolve DSTU2 unit test issue in jpaserver-starter. --- .../ca/uhn/fhir/jpa/config/JpaConfig.java | 19 ------------------- .../uhn/fhir/jpa/config/JpaDstu2Config.java | 3 ++- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java index 4673a28a933..43bd631a23d 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java @@ -74,8 +74,6 @@ import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider; import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; import ca.uhn.fhir.jpa.provider.ValueSetOperationProvider; import ca.uhn.fhir.jpa.provider.ValueSetOperationProviderDstu2; -import ca.uhn.fhir.jpa.provider.r4.IConsentExtensionProvider; -import ca.uhn.fhir.jpa.provider.r4.MemberMatcherR4Helper; import ca.uhn.fhir.jpa.sched.AutowiringSpringBeanJobFactory; import ca.uhn.fhir.jpa.sched.HapiSchedulerServiceImpl; import ca.uhn.fhir.jpa.search.ISynchronousSearchSvc; @@ -149,9 +147,6 @@ import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInter import ca.uhn.fhir.rest.server.util.ISearchParamRegistry; import ca.uhn.hapi.converters.canonical.VersionCanonicalizer; import org.hl7.fhir.common.hapi.validation.support.UnknownCodeSystemWarningValidationSupport; -import org.hl7.fhir.r4.model.Consent; -import org.hl7.fhir.r4.model.Coverage; -import org.hl7.fhir.r4.model.Patient; import org.hl7.fhir.utilities.graphql.IGraphQLStorageServices; import org.hl7.fhir.utilities.npm.PackageClient; import org.springframework.beans.factory.annotation.Autowired; @@ -746,20 +741,6 @@ public class JpaConfig { return new UnknownCodeSystemWarningValidationSupport(theFhirContext); } - @Lazy - @Bean - public MemberMatcherR4Helper memberMatcherR4Helper( - @Autowired FhirContext theContext, - @Autowired IFhirResourceDao theCoverageDao, - @Autowired IFhirResourceDao thePatientDao, - @Autowired IFhirResourceDao theConsentDao, - @Autowired(required = false) IConsentExtensionProvider theExtensionProvider - ) { - return new MemberMatcherR4Helper( - theContext, theCoverageDao, thePatientDao, theConsentDao, theExtensionProvider - ); - } - @Lazy @Bean public NicknameInterceptor nicknameInterceptor() throws IOException { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaDstu2Config.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaDstu2Config.java index 59b08b9c091..be82f6c6c26 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaDstu2Config.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaDstu2Config.java @@ -38,7 +38,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement @Import({ FhirContextDstu2Config.class, - GeneratedDaoAndResourceProviderConfigDstu2.class + GeneratedDaoAndResourceProviderConfigDstu2.class, + JpaConfig.class }) public class JpaDstu2Config { @Bean