Compile fixes
This commit is contained in:
3
pom.xml
3
pom.xml
@@ -14,8 +14,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<!-- FIMXME KBD Change this to 5.3.0 BEFORE merging this code to master ! -->
|
<version>5.4.0</version>
|
||||||
<version>5.4.0-PRE2-SNAPSHOT</version>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import ca.uhn.fhir.jpa.starter.AppProperties;
|
|||||||
import ca.uhn.fhir.mdm.api.IMdmSettings;
|
import ca.uhn.fhir.mdm.api.IMdmSettings;
|
||||||
import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator;
|
import ca.uhn.fhir.mdm.rules.config.MdmRuleValidator;
|
||||||
import ca.uhn.fhir.mdm.rules.config.MdmSettings;
|
import ca.uhn.fhir.mdm.rules.config.MdmSettings;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRetriever;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -30,8 +30,8 @@ import java.io.IOException;
|
|||||||
public class MdmConfig {
|
public class MdmConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
MdmRuleValidator mdmRuleValidator(FhirContext theFhirContext, ISearchParamRetriever theSearchParamRetriever) {
|
MdmRuleValidator mdmRuleValidator(FhirContext theFhirContext, ISearchParamRegistry theSearchParamRegistry) {
|
||||||
return new MdmRuleValidator(theFhirContext, theSearchParamRetriever);
|
return new MdmRuleValidator(theFhirContext, theSearchParamRegistry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package ca.uhn.fhir.jpa.starter;
|
|||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||||
|
import ca.uhn.fhir.context.support.IValidationSupport;
|
||||||
import ca.uhn.fhir.cql.common.provider.CqlProviderLoader;
|
import ca.uhn.fhir.cql.common.provider.CqlProviderLoader;
|
||||||
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
||||||
import ca.uhn.fhir.interceptor.api.IInterceptorService;
|
import ca.uhn.fhir.interceptor.api.IInterceptorService;
|
||||||
@@ -9,31 +10,38 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
|||||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||||
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
||||||
import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor;
|
import ca.uhn.fhir.jpa.binstore.BinaryStorageInterceptor;
|
||||||
import ca.uhn.fhir.jpa.bulk.provider.BulkDataExportProvider;
|
import ca.uhn.fhir.jpa.bulk.export.provider.BulkDataExportProvider;
|
||||||
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
||||||
import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc;
|
import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc;
|
||||||
import ca.uhn.fhir.jpa.packages.PackageInstallOutcomeJson;
|
|
||||||
import ca.uhn.fhir.jpa.packages.PackageInstallationSpec;
|
import ca.uhn.fhir.jpa.packages.PackageInstallationSpec;
|
||||||
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
|
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
|
||||||
import ca.uhn.fhir.jpa.provider.*;
|
import ca.uhn.fhir.jpa.provider.GraphQLProvider;
|
||||||
|
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
|
||||||
|
import ca.uhn.fhir.jpa.provider.JpaCapabilityStatementProvider;
|
||||||
|
import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2;
|
||||||
|
import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider;
|
||||||
|
import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider;
|
||||||
import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
|
import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3;
|
||||||
import ca.uhn.fhir.jpa.provider.r4.JpaConformanceProviderR4;
|
|
||||||
import ca.uhn.fhir.jpa.provider.r5.JpaConformanceProviderR5;
|
|
||||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||||
import ca.uhn.fhir.jpa.searchparam.registry.ISearchParamRegistry;
|
|
||||||
import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor;
|
import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor;
|
||||||
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator;
|
||||||
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
import ca.uhn.fhir.narrative.INarrativeGenerator;
|
||||||
import ca.uhn.fhir.narrative2.NullNarrativeGenerator;
|
import ca.uhn.fhir.narrative2.NullNarrativeGenerator;
|
||||||
|
import ca.uhn.fhir.rest.server.ApacheProxyAddressStrategy;
|
||||||
import ca.uhn.fhir.rest.server.ETagSupportEnum;
|
import ca.uhn.fhir.rest.server.ETagSupportEnum;
|
||||||
import ca.uhn.fhir.rest.server.HardcodedServerAddressStrategy;
|
import ca.uhn.fhir.rest.server.HardcodedServerAddressStrategy;
|
||||||
import ca.uhn.fhir.rest.server.ApacheProxyAddressStrategy;
|
|
||||||
import ca.uhn.fhir.rest.server.IncomingRequestAddressStrategy;
|
import ca.uhn.fhir.rest.server.IncomingRequestAddressStrategy;
|
||||||
import ca.uhn.fhir.rest.server.RestfulServer;
|
import ca.uhn.fhir.rest.server.RestfulServer;
|
||||||
import ca.uhn.fhir.rest.server.interceptor.*;
|
import ca.uhn.fhir.rest.server.interceptor.CorsInterceptor;
|
||||||
|
import ca.uhn.fhir.rest.server.interceptor.FhirPathFilterInterceptor;
|
||||||
|
import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor;
|
||||||
|
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
|
||||||
|
import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor;
|
||||||
|
import ca.uhn.fhir.rest.server.interceptor.ResponseValidatingInterceptor;
|
||||||
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
|
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
|
||||||
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
|
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
|
||||||
import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy;
|
import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy;
|
||||||
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
import ca.uhn.fhir.validation.IValidatorModule;
|
import ca.uhn.fhir.validation.IValidatorModule;
|
||||||
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
import ca.uhn.fhir.validation.ResultSeverityEnum;
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
@@ -44,73 +52,60 @@ import org.springframework.http.HttpHeaders;
|
|||||||
import org.springframework.web.cors.CorsConfiguration;
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class BaseJpaRestfulServer extends RestfulServer {
|
public class BaseJpaRestfulServer extends RestfulServer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
DaoRegistry daoRegistry;
|
DaoRegistry daoRegistry;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
DaoConfig daoConfig;
|
DaoConfig daoConfig;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ISearchParamRegistry searchParamRegistry;
|
ISearchParamRegistry searchParamRegistry;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IFhirSystemDao fhirSystemDao;
|
IFhirSystemDao fhirSystemDao;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ResourceProviderFactory resourceProviders;
|
ResourceProviderFactory resourceProviders;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IJpaSystemProvider jpaSystemProvider;
|
IJpaSystemProvider jpaSystemProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IInterceptorBroadcaster interceptorBroadcaster;
|
IInterceptorBroadcaster interceptorBroadcaster;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
DatabaseBackedPagingProvider databaseBackedPagingProvider;
|
DatabaseBackedPagingProvider databaseBackedPagingProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IInterceptorService interceptorService;
|
IInterceptorService interceptorService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IValidatorModule validatorModule;
|
IValidatorModule validatorModule;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
Optional<GraphQLProvider> graphQLProvider;
|
Optional<GraphQLProvider> graphQLProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
BulkDataExportProvider bulkDataExportProvider;
|
BulkDataExportProvider bulkDataExportProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
PartitionManagementProvider partitionManagementProvider;
|
PartitionManagementProvider partitionManagementProvider;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
BinaryStorageInterceptor binaryStorageInterceptor;
|
BinaryStorageInterceptor binaryStorageInterceptor;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IPackageInstallerSvc packageInstallerSvc;
|
IPackageInstallerSvc packageInstallerSvc;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AppProperties appProperties;
|
AppProperties appProperties;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
ApplicationContext myApplicationContext;
|
ApplicationContext myApplicationContext;
|
||||||
|
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
IRepositoryValidationInterceptorFactory factory;
|
IRepositoryValidationInterceptorFactory factory;
|
||||||
|
|
||||||
// These are set only if the features are enabled
|
// These are set only if the features are enabled
|
||||||
private CqlProviderLoader cqlProviderLoader;
|
private CqlProviderLoader cqlProviderLoader;
|
||||||
|
@Autowired
|
||||||
|
private IValidationSupport myValidationSupport;
|
||||||
|
|
||||||
public BaseJpaRestfulServer() {
|
public BaseJpaRestfulServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
protected void initialize() throws ServletException {
|
protected void initialize() throws ServletException {
|
||||||
@@ -158,14 +153,14 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
setServerConformanceProvider(confProvider);
|
setServerConformanceProvider(confProvider);
|
||||||
} else if (fhirVersion == FhirVersionEnum.R4) {
|
} else if (fhirVersion == FhirVersionEnum.R4) {
|
||||||
|
|
||||||
JpaConformanceProviderR4 confProvider = new JpaConformanceProviderR4(this, fhirSystemDao,
|
JpaCapabilityStatementProvider confProvider = new JpaCapabilityStatementProvider(this, fhirSystemDao,
|
||||||
daoConfig, searchParamRegistry);
|
daoConfig, searchParamRegistry, myValidationSupport);
|
||||||
confProvider.setImplementationDescription("HAPI FHIR R4 Server");
|
confProvider.setImplementationDescription("HAPI FHIR R4 Server");
|
||||||
setServerConformanceProvider(confProvider);
|
setServerConformanceProvider(confProvider);
|
||||||
} else if (fhirVersion == FhirVersionEnum.R5) {
|
} else if (fhirVersion == FhirVersionEnum.R5) {
|
||||||
|
|
||||||
JpaConformanceProviderR5 confProvider = new JpaConformanceProviderR5(this, fhirSystemDao,
|
JpaCapabilityStatementProvider confProvider = new JpaCapabilityStatementProvider(this, fhirSystemDao,
|
||||||
daoConfig, searchParamRegistry);
|
daoConfig, searchParamRegistry, myValidationSupport);
|
||||||
confProvider.setImplementationDescription("HAPI FHIR R5 Server");
|
confProvider.setImplementationDescription("HAPI FHIR R5 Server");
|
||||||
setServerConformanceProvider(confProvider);
|
setServerConformanceProvider(confProvider);
|
||||||
} else {
|
} else {
|
||||||
@@ -374,7 +369,7 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(factory != null) {
|
if (factory != null) {
|
||||||
interceptorService.registerInterceptor(factory.buildUsingStoredStructureDefinitions());
|
interceptorService.registerInterceptor(factory.buildUsingStoredStructureDefinitions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,16 +67,18 @@ public class ExampleServerR5IT {
|
|||||||
public void testWebsocketSubscription() throws Exception {
|
public void testWebsocketSubscription() throws Exception {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create topic
|
* Create topic (will be contained in subscription)
|
||||||
*/
|
*/
|
||||||
SubscriptionTopic topic = new SubscriptionTopic();
|
SubscriptionTopic topic = new SubscriptionTopic();
|
||||||
topic.getResourceTrigger().getQueryCriteria().setCurrent("Observation?status=final");
|
topic.setId("#1");
|
||||||
|
topic.getResourceTriggerFirstRep().getQueryCriteria().setCurrent("Observation?status=final");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create subscription
|
* Create subscription
|
||||||
*/
|
*/
|
||||||
Subscription subscription = new Subscription();
|
Subscription subscription = new Subscription();
|
||||||
subscription.getTopic().setResource(topic);
|
subscription.getContained().add(topic);
|
||||||
|
subscription.setTopic("#1");
|
||||||
subscription.setReason("Monitor new neonatal function (note, age will be determined by the monitor)");
|
subscription.setReason("Monitor new neonatal function (note, age will be determined by the monitor)");
|
||||||
subscription.setStatus(Enumerations.SubscriptionState.REQUESTED);
|
subscription.setStatus(Enumerations.SubscriptionState.REQUESTED);
|
||||||
subscription.getChannelType()
|
subscription.getChannelType()
|
||||||
|
|||||||
Reference in New Issue
Block a user