Added IG options
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -487,6 +487,8 @@
|
|||||||
|
|
||||||
<!-- example of how to start the server using spring boot-->
|
<!-- example of how to start the server using spring boot-->
|
||||||
<!-- mvn clean package spring-boot:repackage -Pboot && java -jar target/hapi-fhir-jpaserver.war -->
|
<!-- mvn clean package spring-boot:repackage -Pboot && java -jar target/hapi-fhir-jpaserver.war -->
|
||||||
|
|
||||||
|
<!-- Use the boot profile for development and debugging options when using your IDE -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>boot</id>
|
<id>boot</id>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import org.hl7.fhir.r4.model.Bundle;
|
import org.hl7.fhir.r4.model.Bundle;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@@ -42,6 +43,7 @@ public class AppProperties {
|
|||||||
private Integer default_page_size = 20;
|
private Integer default_page_size = 20;
|
||||||
private Integer max_binary_size = null;
|
private Integer max_binary_size = null;
|
||||||
private Integer max_page_size = Integer.MAX_VALUE;
|
private Integer max_page_size = Integer.MAX_VALUE;
|
||||||
|
private Integer defer_indexing_for_codesystems_of_size = 100;
|
||||||
private Long retain_cached_searches_mins = 60L;
|
private Long retain_cached_searches_mins = 60L;
|
||||||
private Long reuse_cached_search_results_millis = 60000L;
|
private Long reuse_cached_search_results_millis = 60000L;
|
||||||
private String server_address = null;
|
private String server_address = null;
|
||||||
@@ -57,6 +59,23 @@ public class AppProperties {
|
|||||||
private Subscription subscription = new Subscription();
|
private Subscription subscription = new Subscription();
|
||||||
private Cors cors = null;
|
private Cors cors = null;
|
||||||
private Partitioning partitioning = null;
|
private Partitioning partitioning = null;
|
||||||
|
private List<ImplementationGuide> implementationGuides = null;
|
||||||
|
|
||||||
|
public Integer getDefer_indexing_for_codesystems_of_size() {
|
||||||
|
return defer_indexing_for_codesystems_of_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefer_indexing_for_codesystems_of_size(Integer defer_indexing_for_codesystems_of_size) {
|
||||||
|
this.defer_indexing_for_codesystems_of_size = defer_indexing_for_codesystems_of_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ImplementationGuide> getImplementationGuides() {
|
||||||
|
return implementationGuides;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImplementationGuides(List<ImplementationGuide> implementationGuides) {
|
||||||
|
this.implementationGuides = implementationGuides;
|
||||||
|
}
|
||||||
|
|
||||||
public Partitioning getPartitioning() {
|
public Partitioning getPartitioning() {
|
||||||
return partitioning;
|
return partitioning;
|
||||||
@@ -465,6 +484,37 @@ public class AppProperties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class ImplementationGuide
|
||||||
|
{
|
||||||
|
private String url;
|
||||||
|
private String name;
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(String version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static class Validation {
|
public static class Validation {
|
||||||
|
|
||||||
private Boolean requests_enabled = false;
|
private Boolean requests_enabled = false;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ 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.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.PackageInstallationSpec;
|
||||||
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
|
import ca.uhn.fhir.jpa.partition.PartitionManagementProvider;
|
||||||
import ca.uhn.fhir.jpa.provider.GraphQLProvider;
|
import ca.uhn.fhir.jpa.provider.GraphQLProvider;
|
||||||
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
|
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
|
||||||
@@ -87,6 +89,9 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
@Autowired
|
@Autowired
|
||||||
BinaryStorageInterceptor binaryStorageInterceptor;
|
BinaryStorageInterceptor binaryStorageInterceptor;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IPackageInstallerSvc packageInstallerSvc;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AppProperties appProperties;
|
AppProperties appProperties;
|
||||||
|
|
||||||
@@ -320,6 +325,8 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
daoConfig.setBundleTypesAllowedForStorage(appProperties.getAllowed_bundle_types().stream().map(BundleType::toCode).collect(Collectors.toSet()));
|
daoConfig.setBundleTypesAllowedForStorage(appProperties.getAllowed_bundle_types().stream().map(BundleType::toCode).collect(Collectors.toSet()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
daoConfig.setDeferIndexingForCodesystemsOfSize(appProperties.getDefer_indexing_for_codesystems_of_size());
|
||||||
|
|
||||||
// Bulk Export
|
// Bulk Export
|
||||||
if (appProperties.getBulk_export_enabled()) {
|
if (appProperties.getBulk_export_enabled()) {
|
||||||
registerProvider(bulkDataExportProvider);
|
registerProvider(bulkDataExportProvider);
|
||||||
@@ -336,6 +343,17 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
daoConfig.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID);
|
daoConfig.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID);
|
||||||
daoConfig.setResourceClientIdStrategy(appProperties.getClient_id_strategy());
|
daoConfig.setResourceClientIdStrategy(appProperties.getClient_id_strategy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (appProperties.getImplementationGuides() != null) {
|
||||||
|
List<AppProperties.ImplementationGuide> guides = appProperties.getImplementationGuides();
|
||||||
|
for (AppProperties.ImplementationGuide guide : guides) {
|
||||||
|
packageInstallerSvc.install(new PackageInstallationSpec()
|
||||||
|
.setPackageUrl(guide.getUrl())
|
||||||
|
.setName(guide.getName())
|
||||||
|
.setVersion(guide.getVersion())
|
||||||
|
.setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ spring:
|
|||||||
max-active: 15
|
max-active: 15
|
||||||
profiles:
|
profiles:
|
||||||
### This is the FHIR version. Choose between, dstu2, dstu3, r4 or r5
|
### This is the FHIR version. Choose between, dstu2, dstu3, r4 or r5
|
||||||
active: dstu2
|
active: r4
|
||||||
jpa:
|
jpa:
|
||||||
properties:
|
properties:
|
||||||
hibernate.dialect: org.hibernate.dialect.H2Dialect
|
hibernate.dialect: org.hibernate.dialect.H2Dialect
|
||||||
@@ -26,6 +26,16 @@ spring:
|
|||||||
|
|
||||||
hapi:
|
hapi:
|
||||||
fhir:
|
fhir:
|
||||||
|
defer_indexing_for_codesystems_of_size: 101
|
||||||
|
implementationguides:
|
||||||
|
-
|
||||||
|
url: https://build.fhir.org/ig/hl7dk/dk-medcom/branches/corrections/package.tgz
|
||||||
|
name: dk.fhir.ig.medcom-core
|
||||||
|
version: 0.8.0
|
||||||
|
-
|
||||||
|
name: hl7.fhir.uv.ips
|
||||||
|
version: 0.3.0
|
||||||
|
|
||||||
#supported_resource_types:
|
#supported_resource_types:
|
||||||
# - Patient
|
# - Patient
|
||||||
# - Observation
|
# - Observation
|
||||||
|
|||||||
Reference in New Issue
Block a user