Skip to content

Commit

Permalink
Merge pull request #463 from DBCG/bug-460
Browse files Browse the repository at this point in the history
Resolve #460 - Don't register r4 providers in dstu3 mode
  • Loading branch information
JPercival authored Feb 21, 2022
2 parents cc97f03 + 3f0948e commit 0443b7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

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;
import org.springframework.context.annotation.Conditional;
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() {
Expand All @@ -22,4 +23,10 @@ public OperationProvider r4MeasureDataProcessor() {
return new MeasureDataProcessProvider();
}

@Bean
@Conditional(OnR4Condition.class)
public ProcessMessageProvider r4ProcessMessageProvider() {
return new ProcessMessageProvider();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 0443b7c

Please sign in to comment.