Tracking Hapi 6.2-PRE releases (#408)
* Tracking branch for 6.1 pre-releases. * Update to 6.1.0-PRE3-SNAPSHOT * Adjust for hapi-fhir namespace changes and version * Adjust version to include new hapi-fhir HSearch fast path feature * Bump hapi PRE * Update to PRE16 * Adjust configuration class name to HAPI-FHIR HSearch namespace consolidation. Add commented out sample properties for lucene and elastic. Move batch.job.enabled property under spring: prefix to have it considered. * Adjust enumeration renaming * Repoint FHIR 6.2.0-PRE1-SNAPSHOT * Add missing Bean to starter configuration * Update to hapi-fhir 6.2.0-PRE2-SNAPSHOT * Update application-integrationtest.yaml and rename it as application.yaml to make test configuration independent of prod. * Update to hapi-fhir 6.2.0-PRE5-SNAPSHOT * Update dep * Bump version fix failures * Remove dead import * Fix up * remove batch refs Co-authored-by: Michael Buckley <michael.buckley@smilecdr.com> Co-authored-by: michaelabuckley <michaelabuckley@gmail.com> Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com> Co-authored-by: Tadgh <garygrantgraham@gmail.com>
This commit is contained in:
22
pom.xml
22
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
|
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
|
||||||
<!-- 'mvn clean package com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=distroless-hapi && docker run -p 8080:8080 -e spring.batch.job.enabled=false distroless-hapi' -->
|
<!-- 'mvn clean package com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=distroless-hapi && docker run -p 8080:8080 distroless-hapi' -->
|
||||||
<!--
|
<!--
|
||||||
Note: HAPI projects use the "hapi-fhir" POM as their base to provide easy management.
|
Note: HAPI projects use the "hapi-fhir" POM as their base to provide easy management.
|
||||||
You do not need to use this in your own projects, so the "parent" tag and it's
|
You do not need to use this in your own projects, so the "parent" tag and it's
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>6.1.0</version>
|
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
|
||||||
@@ -382,20 +382,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- The following is not required for the application to build, but allows you to test it by issuing "mvn package jetty:run -Dspring.batch.job.enabled=false" from the command line. -->
|
|
||||||
<!--
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-maven-plugin</artifactId>
|
|
||||||
<version>${jetty_version}</version>
|
|
||||||
<configuration>
|
|
||||||
<webApp>
|
|
||||||
<contextPath>/hapi-fhir-jpaserver</contextPath>
|
|
||||||
<allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
|
|
||||||
</webApp>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Tell Maven which Java source version you want to use -->
|
<!-- Tell Maven which Java source version you want to use -->
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -566,8 +552,8 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
<!-- examples of how to start the server using the default profile-->
|
<!-- examples of how to start the server using the default profile-->
|
||||||
<!-- mvn clean package jetty:run -Dspring.batch.job.enabled=false -->
|
<!-- mvn clean package jetty:run -->
|
||||||
<!-- java -jar -Dspring.batch.job.enabled=false jetty-runner.jar target/hapi-fhir-jpaserver.war -->
|
<!-- java -jar jetty-runner.jar target/hapi-fhir-jpaserver.war -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>jetty</id>
|
<id>jetty</id>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -137,7 +137,6 @@ public class FhirServerConfigCommon {
|
|||||||
daoConfig.setInlineResourceTextBelowSize(appProperties.getInline_resource_storage_below_size());
|
daoConfig.setInlineResourceTextBelowSize(appProperties.getInline_resource_storage_below_size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
daoConfig.setStoreResourceInHSearchIndex(appProperties.getStore_resource_in_lucene_index_enabled());
|
daoConfig.setStoreResourceInHSearchIndex(appProperties.getStore_resource_in_lucene_index_enabled());
|
||||||
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||||
daoConfig.getModelConfig().setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
|
daoConfig.getModelConfig().setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ import org.springframework.context.annotation.Import;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Conditional(OnDSTU2Condition.class)
|
@Conditional(OnDSTU2Condition.class)
|
||||||
@Import({StarterJpaConfig.class, JpaDstu2Config.class})
|
@Import({
|
||||||
|
JpaDstu2Config.class,
|
||||||
|
StarterJpaConfig.class
|
||||||
|
})
|
||||||
public class FhirServerConfigDstu2 {
|
public class FhirServerConfigDstu2 {
|
||||||
@Bean
|
@Bean
|
||||||
public ITermLoaderSvc termLoaderService(ITermDeferredStorageSvc theDeferredStorageSvc, ITermCodeSystemStorageSvc theCodeSystemStorageSvc) {
|
public ITermLoaderSvc termLoaderService(ITermDeferredStorageSvc theDeferredStorageSvc, ITermCodeSystemStorageSvc theCodeSystemStorageSvc) {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import org.springframework.context.annotation.Import;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@Conditional(OnDSTU3Condition.class)
|
@Conditional(OnDSTU3Condition.class)
|
||||||
@Import({
|
@Import({
|
||||||
StarterJpaConfig.class,
|
|
||||||
JpaDstu3Config.class,
|
JpaDstu3Config.class,
|
||||||
|
StarterJpaConfig.class,
|
||||||
StarterCqlDstu3Config.class,
|
StarterCqlDstu3Config.class,
|
||||||
ElasticsearchConfig.class})
|
ElasticsearchConfig.class})
|
||||||
public class FhirServerConfigDstu3 {
|
public class FhirServerConfigDstu3 {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import org.springframework.context.annotation.Import;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@Conditional(OnR4Condition.class)
|
@Conditional(OnR4Condition.class)
|
||||||
@Import({
|
@Import({
|
||||||
StarterJpaConfig.class,
|
|
||||||
JpaR4Config.class,
|
JpaR4Config.class,
|
||||||
|
StarterJpaConfig.class,
|
||||||
StarterCqlR4Config.class,
|
StarterCqlR4Config.class,
|
||||||
ElasticsearchConfig.class
|
ElasticsearchConfig.class
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import ca.uhn.fhir.context.support.IValidationSupport;
|
|||||||
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
import ca.uhn.fhir.interceptor.api.IInterceptorBroadcaster;
|
||||||
import ca.uhn.fhir.jpa.api.IDaoRegistry;
|
import ca.uhn.fhir.jpa.api.IDaoRegistry;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
|
import ca.uhn.fhir.jpa.api.config.ThreadPoolFactoryConfig;
|
||||||
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.batch.config.NonPersistedBatchConfigurer;
|
|
||||||
import ca.uhn.fhir.jpa.binary.interceptor.BinaryStorageInterceptor;
|
import ca.uhn.fhir.jpa.binary.interceptor.BinaryStorageInterceptor;
|
||||||
import ca.uhn.fhir.jpa.binary.provider.BinaryAccessProvider;
|
import ca.uhn.fhir.jpa.binary.provider.BinaryAccessProvider;
|
||||||
import ca.uhn.fhir.jpa.bulk.export.provider.BulkDataExportProvider;
|
import ca.uhn.fhir.jpa.bulk.export.provider.BulkDataExportProvider;
|
||||||
@@ -26,6 +26,8 @@ import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
|
|||||||
import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl;
|
import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl;
|
||||||
import ca.uhn.fhir.jpa.dao.search.HSearchSortHelperImpl;
|
import ca.uhn.fhir.jpa.dao.search.HSearchSortHelperImpl;
|
||||||
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
|
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
|
||||||
|
import ca.uhn.fhir.jpa.dao.tx.HapiTransactionService;
|
||||||
|
import ca.uhn.fhir.jpa.delete.ThreadSafeResourceDeleterSvc;
|
||||||
import ca.uhn.fhir.jpa.graphql.GraphQLProvider;
|
import ca.uhn.fhir.jpa.graphql.GraphQLProvider;
|
||||||
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
|
||||||
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor;
|
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor;
|
||||||
@@ -62,14 +64,10 @@ import ca.uhn.fhir.validation.ResultSeverityEnum;
|
|||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
|
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
|
||||||
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.*;
|
||||||
import org.springframework.context.annotation.Conditional;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
import org.springframework.core.env.ConfigurableEnvironment;
|
import org.springframework.core.env.ConfigurableEnvironment;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.orm.jpa.JpaTransactionManager;
|
import org.springframework.orm.jpa.JpaTransactionManager;
|
||||||
@@ -83,6 +81,9 @@ import java.util.*;
|
|||||||
import static ca.uhn.fhir.jpa.starter.common.validation.IRepositoryValidationInterceptorFactory.ENABLE_REPOSITORY_VALIDATING_INTERCEPTOR;
|
import static ca.uhn.fhir.jpa.starter.common.validation.IRepositoryValidationInterceptorFactory.ENABLE_REPOSITORY_VALIDATING_INTERCEPTOR;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@Import(
|
||||||
|
ThreadPoolFactoryConfig.class
|
||||||
|
)
|
||||||
public class StarterJpaConfig {
|
public class StarterJpaConfig {
|
||||||
|
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StarterJpaConfig.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StarterJpaConfig.class);
|
||||||
@@ -103,10 +104,6 @@ public class StarterJpaConfig {
|
|||||||
return ValidationSupportConfigUtil.newCachingValidationSupport(theJpaValidationSupportChain);
|
return ValidationSupportConfigUtil.newCachingValidationSupport(theJpaValidationSupportChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public BatchConfigurer batchConfigurer() {
|
|
||||||
return new NonPersistedBatchConfigurer();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConfigurableEnvironment configurableEnvironment;
|
private ConfigurableEnvironment configurableEnvironment;
|
||||||
@@ -123,6 +120,7 @@ public class StarterJpaConfig {
|
|||||||
return pagingProvider;
|
return pagingProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public IResourceSupportedSvc resourceSupportedSvc(IDaoRegistry theDaoRegistry) {
|
public IResourceSupportedSvc resourceSupportedSvc(IDaoRegistry theDaoRegistry) {
|
||||||
return new DaoRegistryResourceSupportedSvc(theDaoRegistry);
|
return new DaoRegistryResourceSupportedSvc(theDaoRegistry);
|
||||||
@@ -150,7 +148,7 @@ public class StarterJpaConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
public JpaTransactionManager hapiTransactionManager(EntityManagerFactory entityManagerFactory) {
|
public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
|
||||||
JpaTransactionManager retVal = new JpaTransactionManager();
|
JpaTransactionManager retVal = new JpaTransactionManager();
|
||||||
retVal.setEntityManagerFactory(entityManagerFactory);
|
retVal.setEntityManagerFactory(entityManagerFactory);
|
||||||
return retVal;
|
return retVal;
|
||||||
@@ -246,7 +244,7 @@ public class StarterJpaConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public RestfulServer restfulServer(IFhirSystemDao<?, ?> fhirSystemDao, AppProperties appProperties, DaoRegistry daoRegistry, Optional<MdmProviderLoader> mdmProviderProvider, IJpaSystemProvider jpaSystemProvider, ResourceProviderFactory resourceProviderFactory, DaoConfig daoConfig, ISearchParamRegistry searchParamRegistry, IValidationSupport theValidationSupport, DatabaseBackedPagingProvider databaseBackedPagingProvider, LoggingInterceptor loggingInterceptor, Optional<TerminologyUploaderProvider> terminologyUploaderProvider, Optional<SubscriptionTriggeringProvider> subscriptionTriggeringProvider, Optional<CorsInterceptor> corsInterceptor, IInterceptorBroadcaster interceptorBroadcaster, Optional<BinaryAccessProvider> binaryAccessProvider, BinaryStorageInterceptor binaryStorageInterceptor, IValidatorModule validatorModule, Optional<GraphQLProvider> graphQLProvider, BulkDataExportProvider bulkDataExportProvider, BulkDataImportProvider bulkDataImportProvider, ValueSetOperationProvider theValueSetOperationProvider, ReindexProvider reindexProvider, PartitionManagementProvider partitionManagementProvider, Optional<RepositoryValidatingInterceptor> repositoryValidatingInterceptor, IPackageInstallerSvc packageInstallerSvc) {
|
public RestfulServer restfulServer(IFhirSystemDao<?, ?> fhirSystemDao, AppProperties appProperties, DaoRegistry daoRegistry, Optional<MdmProviderLoader> mdmProviderProvider, IJpaSystemProvider jpaSystemProvider, ResourceProviderFactory resourceProviderFactory, DaoConfig daoConfig, ISearchParamRegistry searchParamRegistry, IValidationSupport theValidationSupport, DatabaseBackedPagingProvider databaseBackedPagingProvider, LoggingInterceptor loggingInterceptor, Optional<TerminologyUploaderProvider> terminologyUploaderProvider, Optional<SubscriptionTriggeringProvider> subscriptionTriggeringProvider, Optional<CorsInterceptor> corsInterceptor, IInterceptorBroadcaster interceptorBroadcaster, Optional<BinaryAccessProvider> binaryAccessProvider, BinaryStorageInterceptor binaryStorageInterceptor, IValidatorModule validatorModule, Optional<GraphQLProvider> graphQLProvider, BulkDataExportProvider bulkDataExportProvider, BulkDataImportProvider bulkDataImportProvider, ValueSetOperationProvider theValueSetOperationProvider, ReindexProvider reindexProvider, PartitionManagementProvider partitionManagementProvider, Optional<RepositoryValidatingInterceptor> repositoryValidatingInterceptor, IPackageInstallerSvc packageInstallerSvc, ThreadSafeResourceDeleterSvc theThreadSafeResourceDeleterSvc) {
|
||||||
RestfulServer fhirServer = new RestfulServer(fhirSystemDao.getContext());
|
RestfulServer fhirServer = new RestfulServer(fhirSystemDao.getContext());
|
||||||
|
|
||||||
|
|
||||||
@@ -352,7 +350,7 @@ public class StarterJpaConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (appProperties.getAllow_cascading_deletes()) {
|
if (appProperties.getAllow_cascading_deletes()) {
|
||||||
CascadingDeleteInterceptor cascadingDeleteInterceptor = new CascadingDeleteInterceptor(fhirSystemDao.getContext(), daoRegistry, interceptorBroadcaster);
|
CascadingDeleteInterceptor cascadingDeleteInterceptor = new CascadingDeleteInterceptor(fhirSystemDao.getContext(), daoRegistry, interceptorBroadcaster, theThreadSafeResourceDeleterSvc);
|
||||||
fhirServer.registerInterceptor(cascadingDeleteInterceptor);
|
fhirServer.registerInterceptor(cascadingDeleteInterceptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,16 +39,17 @@ spring:
|
|||||||
# hibernate.cache.use_second_level_cache: false
|
# hibernate.cache.use_second_level_cache: false
|
||||||
# hibernate.cache.use_structured_entries: false
|
# hibernate.cache.use_structured_entries: false
|
||||||
# hibernate.cache.use_minimal_puts: false
|
# hibernate.cache.use_minimal_puts: false
|
||||||
### These settings will enable fulltext search with lucene
|
### These settings will enable fulltext search with lucene or elastic
|
||||||
hibernate.search.enabled: false
|
hibernate.search.enabled: true
|
||||||
# hibernate.search.backend.type: lucene
|
### lucene parameters
|
||||||
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiLuceneAnalysisConfigurer
|
# hibernate.search.backend.type: lucene
|
||||||
# hibernate.search.backend.directory.type: local-filesystem
|
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiLuceneAnalysisConfigurer
|
||||||
# hibernate.search.backend.directory.root: target/lucenefiles
|
# hibernate.search.backend.directory.type: local-filesystem
|
||||||
# hibernate.search.backend.lucene_version: lucene_current
|
# hibernate.search.backend.directory.root: target/lucenefiles
|
||||||
batch:
|
# hibernate.search.backend.lucene_version: lucene_current
|
||||||
job:
|
### elastic parameters ===> see also elasticsearch section below <===
|
||||||
enabled: false
|
hibernate.search.backend.type: elasticsearch
|
||||||
|
hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiElasticAnalysisConfigurer
|
||||||
hapi:
|
hapi:
|
||||||
fhir:
|
fhir:
|
||||||
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import org.testcontainers.elasticsearch.ElasticsearchContainer;
|
|||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
||||||
{
|
{
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
||||||
"hapi.fhir.fhir_version=r4",
|
"hapi.fhir.fhir_version=r4",
|
||||||
"hapi.fhir.lastn_enabled=true",
|
"hapi.fhir.lastn_enabled=true",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
||||||
{
|
{
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"hapi.fhir.fhir_version=dstu2",
|
"hapi.fhir.fhir_version=dstu2",
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr2",
|
"spring.datasource.url=jdbc:h2:mem:dbr2",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
||||||
{
|
{
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr3",
|
"spring.datasource.url=jdbc:h2:mem:dbr3",
|
||||||
"hapi.fhir.cql_enabled=true",
|
"hapi.fhir.cql_enabled=true",
|
||||||
"hapi.fhir.fhir_version=dstu3",
|
"hapi.fhir.fhir_version=dstu3",
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties = {
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties = {
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
"spring.datasource.url=jdbc:h2:mem:dbr4",
|
||||||
"hapi.fhir.enable_repository_validating_interceptor=true",
|
"hapi.fhir.enable_repository_validating_interceptor=true",
|
||||||
"hapi.fhir.fhir_version=r4",
|
"hapi.fhir.fhir_version=r4",
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
|||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
||||||
{
|
{
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr5",
|
"spring.datasource.url=jdbc:h2:mem:dbr5",
|
||||||
"hapi.fhir.fhir_version=r5",
|
"hapi.fhir.fhir_version=r5",
|
||||||
"hapi.fhir.subscription.websocket_enabled=true",
|
"hapi.fhir.subscription.websocket_enabled=true",
|
||||||
@@ -80,7 +79,7 @@ public class ExampleServerR5IT {
|
|||||||
subscription.getContained().add(topic);
|
subscription.getContained().add(topic);
|
||||||
subscription.setTopic("#1");
|
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.SubscriptionStatusCodes.REQUESTED);
|
||||||
subscription.getChannelType()
|
subscription.getChannelType()
|
||||||
.setSystem("http://terminology.hl7.org/CodeSystem/subscription-channel-type")
|
.setSystem("http://terminology.hl7.org/CodeSystem/subscription-channel-type")
|
||||||
.setCode("websocket");
|
.setCode("websocket");
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class, properties =
|
||||||
{
|
{
|
||||||
"spring.batch.job.enabled=false",
|
|
||||||
"spring.datasource.url=jdbc:h2:mem:dbr4-mt",
|
"spring.datasource.url=jdbc:h2:mem:dbr4-mt",
|
||||||
"hapi.fhir.fhir_version=r4",
|
"hapi.fhir.fhir_version=r4",
|
||||||
"hapi.fhir.subscription.websocket_enabled=true",
|
"hapi.fhir.subscription.websocket_enabled=true",
|
||||||
|
|||||||
@@ -1,108 +0,0 @@
|
|||||||
spring:
|
|
||||||
datasource:
|
|
||||||
url: 'jdbc:h2:file:./target/database/h2'
|
|
||||||
username: sa
|
|
||||||
password: null
|
|
||||||
driverClassName: org.h2.Driver
|
|
||||||
max-active: 15
|
|
||||||
profiles:
|
|
||||||
### This is the FHIR version. Choose between, dstu2, dstu3, r4 or r5
|
|
||||||
active: r4
|
|
||||||
|
|
||||||
hapi:
|
|
||||||
fhir:
|
|
||||||
#supported_resource_types:
|
|
||||||
# - Patient
|
|
||||||
# - Observation
|
|
||||||
# allow_cascading_deletes: true
|
|
||||||
# allow_contains_searches: true
|
|
||||||
# allow_external_references: true
|
|
||||||
# allow_multiple_delete: true
|
|
||||||
# allow_override_default_search_params: true
|
|
||||||
# allow_placeholder_references: true
|
|
||||||
# auto_create_placeholder_reference_targets: false
|
|
||||||
# cql_enabled: false
|
|
||||||
# default_encoding: JSON
|
|
||||||
# default_pretty_print: true
|
|
||||||
# default_page_size: 20
|
|
||||||
# delete_expunge_enabled: true
|
|
||||||
# enable_index_missing_fields: false
|
|
||||||
# enforce_referential_integrity_on_delete: false
|
|
||||||
# enforce_referential_integrity_on_write: false
|
|
||||||
# etag_support_enabled: true
|
|
||||||
# expunge_enabled: true
|
|
||||||
# daoconfig_client_id_strategy: null
|
|
||||||
# fhirpath_interceptor_enabled: false
|
|
||||||
# filter_search_enabled: true
|
|
||||||
# graphql_enabled: true
|
|
||||||
# local_base_urls:
|
|
||||||
# - http://hapi.fhir.org/baseR4
|
|
||||||
#partitioning:
|
|
||||||
# cross_partition_reference_mode: true
|
|
||||||
# multitenancy_enabled: true
|
|
||||||
# partitioning_include_in_search_hashes: true
|
|
||||||
#cors:
|
|
||||||
# allow_Credentials: true
|
|
||||||
# Supports multiple, comma separated allowed origin entries
|
|
||||||
# cors.allowed_origin=http://localhost:8080,https://localhost:8080,https://fhirtest.uhn.ca
|
|
||||||
# allowed_origin:
|
|
||||||
# - '*'
|
|
||||||
|
|
||||||
# logger:
|
|
||||||
# error_format: 'ERROR - ${requestVerb} ${requestUrl}'
|
|
||||||
# format: >-
|
|
||||||
# Path[${servletPath}] Source[${requestHeader.x-forwarded-for}]
|
|
||||||
# Operation[${operationType} ${operationName} ${idOrResourceName}]
|
|
||||||
# UA[${requestHeader.user-agent}] Params[${requestParameters}]
|
|
||||||
# ResponseEncoding[${responseEncodingNoDefault}]
|
|
||||||
# log_exceptions: true
|
|
||||||
# name: fhirtest.access
|
|
||||||
# max_binary_size: 104857600
|
|
||||||
# max_page_size: 200
|
|
||||||
# retain_cached_searches_mins: 60
|
|
||||||
# reuse_cached_search_results_millis: 60000
|
|
||||||
tester:
|
|
||||||
-
|
|
||||||
id: home
|
|
||||||
name: Local Tester
|
|
||||||
server_address: 'http://localhost:8080/hapi-fhir-jpaserver/fhir'
|
|
||||||
refuse_to_fetch_third_party_urls: false
|
|
||||||
fhir_version: R4
|
|
||||||
-
|
|
||||||
id: global
|
|
||||||
name: Global Tester
|
|
||||||
server_address: "http://hapi.fhir.org/baseR4"
|
|
||||||
refuse_to_fetch_third_party_urls: false
|
|
||||||
fhir_version: R4
|
|
||||||
# validation:
|
|
||||||
# requests_enabled: true
|
|
||||||
# responses_enabled: true
|
|
||||||
# binary_storage_enabled: true
|
|
||||||
# bulk_export_enabled: true
|
|
||||||
# partitioning_multitenancy_enabled:
|
|
||||||
# subscription:
|
|
||||||
# resthook_enabled: false
|
|
||||||
# websocket_enabled: false
|
|
||||||
# email:
|
|
||||||
# from: some@test.com
|
|
||||||
# host: google.com
|
|
||||||
# port:
|
|
||||||
# username:
|
|
||||||
# password:
|
|
||||||
# auth:
|
|
||||||
# startTlsEnable:
|
|
||||||
# startTlsRequired:
|
|
||||||
# quitWait:
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
#elasticsearch:
|
|
||||||
# debug:
|
|
||||||
# pretty_print_json_log: false
|
|
||||||
# refresh_after_write: false
|
|
||||||
# enabled: false
|
|
||||||
# password: SomePassword
|
|
||||||
# required_index_status: YELLOW
|
|
||||||
# rest_url: 'http://localhost:9200'
|
|
||||||
# schema_management_strategy: CREATE
|
|
||||||
# username: SomeUsername
|
|
||||||
186
src/test/resources/application.yaml
Normal file
186
src/test/resources/application.yaml
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
spring:
|
||||||
|
main:
|
||||||
|
allow-circular-references: true
|
||||||
|
#allow-bean-definition-overriding: true
|
||||||
|
flyway:
|
||||||
|
enabled: false
|
||||||
|
check-location: false
|
||||||
|
baselineOnMigrate: true
|
||||||
|
datasource:
|
||||||
|
url: jdbc:h2:mem:test_mem
|
||||||
|
username: sa
|
||||||
|
password: null
|
||||||
|
driverClassName: org.h2.Driver
|
||||||
|
max-active: 15
|
||||||
|
|
||||||
|
# database connection pool size
|
||||||
|
hikari:
|
||||||
|
maximum-pool-size: 10
|
||||||
|
jpa:
|
||||||
|
properties:
|
||||||
|
hibernate.format_sql: false
|
||||||
|
hibernate.show_sql: false
|
||||||
|
#Hibernate dialect is automatically detected except Postgres and H2.
|
||||||
|
#If using H2, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect
|
||||||
|
#If using postgres, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect
|
||||||
|
|
||||||
|
hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect
|
||||||
|
# hibernate.hbm2ddl.auto: update
|
||||||
|
# hibernate.jdbc.batch_size: 20
|
||||||
|
# hibernate.cache.use_query_cache: false
|
||||||
|
# hibernate.cache.use_second_level_cache: false
|
||||||
|
# hibernate.cache.use_structured_entries: false
|
||||||
|
# hibernate.cache.use_minimal_puts: false
|
||||||
|
### These settings will enable fulltext search with lucene or elastic
|
||||||
|
hibernate.search.enabled: false
|
||||||
|
### lucene parameters
|
||||||
|
# hibernate.search.backend.type: lucene
|
||||||
|
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiLuceneAnalysisConfigurer
|
||||||
|
# hibernate.search.backend.directory.type: local-filesystem
|
||||||
|
# hibernate.search.backend.directory.root: target/lucenefiles
|
||||||
|
# hibernate.search.backend.lucene_version: lucene_current
|
||||||
|
### elastic parameters ===> see also elasticsearch section below <===
|
||||||
|
# hibernate.search.backend.type: elasticsearch
|
||||||
|
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiElasticAnalysisConfigurer
|
||||||
|
|
||||||
|
hapi:
|
||||||
|
fhir:
|
||||||
|
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
||||||
|
openapi_enabled: true
|
||||||
|
### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
|
||||||
|
fhir_version: R4
|
||||||
|
### enable to use the ApacheProxyAddressStrategy which uses X-Forwarded-* headers
|
||||||
|
### to determine the FHIR server address
|
||||||
|
# use_apache_address_strategy: false
|
||||||
|
### forces the use of the https:// protocol for the returned server address.
|
||||||
|
### alternatively, it may be set using the X-Forwarded-Proto header.
|
||||||
|
# use_apache_address_strategy_https: false
|
||||||
|
### enable to set the Server URL
|
||||||
|
# server_address: http://hapi.fhir.org/baseR4
|
||||||
|
# defer_indexing_for_codesystems_of_size: 101
|
||||||
|
# install_transitive_ig_dependencies: true
|
||||||
|
# implementationguides:
|
||||||
|
### example from registry (packages.fhir.org)
|
||||||
|
# swiss:
|
||||||
|
# name: swiss.mednet.fhir
|
||||||
|
# version: 0.8.0
|
||||||
|
# example not from registry
|
||||||
|
# ips_1_0_0:
|
||||||
|
# url: https://build.fhir.org/ig/HL7/fhir-ips/package.tgz
|
||||||
|
# name: hl7.fhir.uv.ips
|
||||||
|
# version: 1.0.0
|
||||||
|
# supported_resource_types:
|
||||||
|
# - Patient
|
||||||
|
# - Observation
|
||||||
|
# allow_cascading_deletes: true
|
||||||
|
# allow_contains_searches: true
|
||||||
|
# allow_external_references: true
|
||||||
|
# allow_multiple_delete: true
|
||||||
|
# allow_override_default_search_params: true
|
||||||
|
# auto_create_placeholder_reference_targets: false
|
||||||
|
# cql_enabled: true
|
||||||
|
# default_encoding: JSON
|
||||||
|
# default_pretty_print: true
|
||||||
|
# default_page_size: 20
|
||||||
|
# delete_expunge_enabled: true
|
||||||
|
# enable_repository_validating_interceptor: false
|
||||||
|
# enable_index_missing_fields: false
|
||||||
|
# enable_index_of_type: true
|
||||||
|
# enable_index_contained_resource: false
|
||||||
|
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
|
||||||
|
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
|
||||||
|
advanced_lucene_indexing: false
|
||||||
|
# enforce_referential_integrity_on_delete: false
|
||||||
|
# This is an experimental feature, and does not fully support _total and other FHIR features.
|
||||||
|
# enforce_referential_integrity_on_delete: false
|
||||||
|
# enforce_referential_integrity_on_write: false
|
||||||
|
# etag_support_enabled: true
|
||||||
|
# expunge_enabled: true
|
||||||
|
# daoconfig_client_id_strategy: null
|
||||||
|
# client_id_strategy: ALPHANUMERIC
|
||||||
|
# fhirpath_interceptor_enabled: false
|
||||||
|
# filter_search_enabled: true
|
||||||
|
# graphql_enabled: true
|
||||||
|
# narrative_enabled: true
|
||||||
|
# mdm_enabled: true
|
||||||
|
# local_base_urls:
|
||||||
|
# - https://hapi.fhir.org/baseR4
|
||||||
|
mdm_enabled: false
|
||||||
|
# partitioning:
|
||||||
|
# allow_references_across_partitions: false
|
||||||
|
# partitioning_include_in_search_hashes: false
|
||||||
|
#cors:
|
||||||
|
# allow_Credentials: true
|
||||||
|
# These are allowed_origin patterns, see: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/CorsConfiguration.html#setAllowedOriginPatterns-java.util.List-
|
||||||
|
# allowed_origin:
|
||||||
|
# - '*'
|
||||||
|
|
||||||
|
# Search coordinator thread pool sizes
|
||||||
|
search-coord-core-pool-size: 20
|
||||||
|
search-coord-max-pool-size: 100
|
||||||
|
search-coord-queue-capacity: 200
|
||||||
|
|
||||||
|
# Threadpool size for BATCH'ed GETs in a bundle.
|
||||||
|
# bundle_batch_pool_size: 10
|
||||||
|
# bundle_batch_pool_max_size: 50
|
||||||
|
|
||||||
|
# logger:
|
||||||
|
# error_format: 'ERROR - ${requestVerb} ${requestUrl}'
|
||||||
|
# format: >-
|
||||||
|
# Path[${servletPath}] Source[${requestHeader.x-forwarded-for}]
|
||||||
|
# Operation[${operationType} ${operationName} ${idOrResourceName}]
|
||||||
|
# UA[${requestHeader.user-agent}] Params[${requestParameters}]
|
||||||
|
# ResponseEncoding[${responseEncodingNoDefault}]
|
||||||
|
# log_exceptions: true
|
||||||
|
# name: fhirtest.access
|
||||||
|
# max_binary_size: 104857600
|
||||||
|
# max_page_size: 200
|
||||||
|
# retain_cached_searches_mins: 60
|
||||||
|
# reuse_cached_search_results_millis: 60000
|
||||||
|
tester:
|
||||||
|
home:
|
||||||
|
name: Local Tester
|
||||||
|
server_address: 'http://localhost:8080/fhir'
|
||||||
|
refuse_to_fetch_third_party_urls: false
|
||||||
|
fhir_version: R4
|
||||||
|
global:
|
||||||
|
name: Global Tester
|
||||||
|
server_address: "http://hapi.fhir.org/baseR4"
|
||||||
|
refuse_to_fetch_third_party_urls: false
|
||||||
|
fhir_version: R4
|
||||||
|
# validation:
|
||||||
|
# requests_enabled: true
|
||||||
|
# responses_enabled: true
|
||||||
|
# binary_storage_enabled: true
|
||||||
|
# bulk_export_enabled: true
|
||||||
|
# subscription:
|
||||||
|
# resthook_enabled: true
|
||||||
|
# websocket_enabled: false
|
||||||
|
# email:
|
||||||
|
# from: some@test.com
|
||||||
|
# host: google.com
|
||||||
|
# port:
|
||||||
|
# username:
|
||||||
|
# password:
|
||||||
|
# auth:
|
||||||
|
# startTlsEnable:
|
||||||
|
# startTlsRequired:
|
||||||
|
# quitWait:
|
||||||
|
# lastn_enabled: true
|
||||||
|
# store_resource_in_lucene_index_enabled: true
|
||||||
|
### This is configuration for normalized quantity serach level default is 0
|
||||||
|
### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default
|
||||||
|
### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED
|
||||||
|
### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED
|
||||||
|
# normalized_quantity_search_level: 2
|
||||||
|
#elasticsearch:
|
||||||
|
# debug:
|
||||||
|
# pretty_print_json_log: false
|
||||||
|
# refresh_after_write: false
|
||||||
|
# enabled: false
|
||||||
|
# password: SomePassword
|
||||||
|
# required_index_status: YELLOW
|
||||||
|
# rest_url: 'localhost:9200'
|
||||||
|
# protocol: 'http'
|
||||||
|
# schema_management_strategy: CREATE
|
||||||
|
# username: SomeUsername
|
||||||
Reference in New Issue
Block a user