Unit Test work - still cannot get Dstu3 working after several attempts, but included the skelton of a test to capture the effort anyways.
This commit is contained in:
@@ -2,6 +2,8 @@ package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.cql.provider.CqlProviderLoader;
|
||||
import ca.uhn.fhir.empi.provider.EmpiProviderLoader;
|
||||
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
||||
import ca.uhn.fhir.interceptor.api.IInterceptorService;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||
@@ -97,6 +99,10 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
@Autowired
|
||||
ApplicationContext myApplicationContext;
|
||||
|
||||
// These are set only if the features are enabled
|
||||
private CqlProviderLoader cqlProviderLoader;
|
||||
private EmpiProviderLoader empiProviderLoader;
|
||||
|
||||
public BaseJpaRestfulServer() {
|
||||
|
||||
}
|
||||
@@ -121,10 +127,21 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
}
|
||||
|
||||
setFhirContext(fhirSystemDao.getContext());
|
||||
|
||||
FhirVersionEnum fhirVersion = fhirSystemDao.getContext().getVersion().getVersion();
|
||||
if (fhirVersion == FhirVersionEnum.DSTU3 || fhirVersion == FhirVersionEnum.R4) {
|
||||
if (appProperties.getCql_enabled()) {
|
||||
cqlProviderLoader = myApplicationContext.getBean(CqlProviderLoader.class);
|
||||
cqlProviderLoader.loadProvider();
|
||||
}
|
||||
if (appProperties.getEmpi_enabled()) {
|
||||
empiProviderLoader = myApplicationContext.getBean(EmpiProviderLoader.class);
|
||||
empiProviderLoader.loadProvider();
|
||||
}
|
||||
}
|
||||
registerProviders(resourceProviders.createProviders());
|
||||
registerProvider(jpaSystemProvider);
|
||||
|
||||
FhirVersionEnum fhirVersion = fhirSystemDao.getContext().getVersion().getVersion();
|
||||
/*
|
||||
* The conformance provider exports the supported resources, search parameters, etc for
|
||||
* this server. The JPA version adds resourceProviders counts to the exported statement, so it
|
||||
|
||||
Reference in New Issue
Block a user