diff --git a/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/CaseReportingConfig.java b/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/CaseReportingConfig.java index 81675f6f9..366f1ecb8 100644 --- a/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/CaseReportingConfig.java +++ b/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/CaseReportingConfig.java @@ -2,6 +2,7 @@ import org.opencds.cqf.ruler.api.OperationProvider; import org.opencds.cqf.ruler.casereporting.r4.MeasureDataProcessProvider; +import org.opencds.cqf.ruler.casereporting.r4.ProcessMessageProvider; import org.opencds.cqf.ruler.external.annotations.OnR4Condition; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; @@ -9,7 +10,7 @@ import org.springframework.context.annotation.Configuration; @Configuration -@ConditionalOnProperty(prefix = "hapi.fhir.casereporting", name ="enabled", havingValue = "true", matchIfMissing=true) +@ConditionalOnProperty(prefix = "hapi.fhir.casereporting", name = "enabled", havingValue = "true", matchIfMissing = true) public class CaseReportingConfig { @Bean public CaseReportingProperties caseReportingProperties() { @@ -22,4 +23,10 @@ public OperationProvider r4MeasureDataProcessor() { return new MeasureDataProcessProvider(); } + @Bean + @Conditional(OnR4Condition.class) + public ProcessMessageProvider r4ProcessMessageProvider() { + return new ProcessMessageProvider(); + } + } diff --git a/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/r4/ProcessMessageProvider.java b/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/r4/ProcessMessageProvider.java index ed8e92bd6..046c11ff3 100644 --- a/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/r4/ProcessMessageProvider.java +++ b/plugin/case-reporting/src/main/java/org/opencds/cqf/ruler/casereporting/r4/ProcessMessageProvider.java @@ -25,7 +25,6 @@ import org.opencds.cqf.ruler.provider.DaoRegistryOperationProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao; import ca.uhn.fhir.model.api.annotation.Description; @@ -36,7 +35,6 @@ import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.util.BundleUtil; -@Component public class ProcessMessageProvider extends DaoRegistryOperationProvider { private static final Logger logger = LoggerFactory.getLogger(ProcessMessageProvider.class);