Added IG options
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.hl7.fhir.r4.model.Bundle;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -42,6 +43,7 @@ public class AppProperties {
|
||||
private Integer default_page_size = 20;
|
||||
private Integer max_binary_size = null;
|
||||
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 reuse_cached_search_results_millis = 60000L;
|
||||
private String server_address = null;
|
||||
@@ -57,6 +59,23 @@ public class AppProperties {
|
||||
private Subscription subscription = new Subscription();
|
||||
private Cors cors = 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() {
|
||||
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 {
|
||||
|
||||
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.bulk.provider.BulkDataExportProvider;
|
||||
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.provider.GraphQLProvider;
|
||||
import ca.uhn.fhir.jpa.provider.IJpaSystemProvider;
|
||||
@@ -87,6 +89,9 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
@Autowired
|
||||
BinaryStorageInterceptor binaryStorageInterceptor;
|
||||
|
||||
@Autowired
|
||||
IPackageInstallerSvc packageInstallerSvc;
|
||||
|
||||
@Autowired
|
||||
AppProperties appProperties;
|
||||
|
||||
@@ -162,7 +167,7 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
* ETag Support
|
||||
*/
|
||||
|
||||
if(appProperties.getEtag_support_enabled() == false)
|
||||
if (appProperties.getEtag_support_enabled() == false)
|
||||
setETagSupport(ETagSupportEnum.DISABLED);
|
||||
|
||||
|
||||
@@ -320,6 +325,8 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
daoConfig.setBundleTypesAllowedForStorage(appProperties.getAllowed_bundle_types().stream().map(BundleType::toCode).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
daoConfig.setDeferIndexingForCodesystemsOfSize(appProperties.getDefer_indexing_for_codesystems_of_size());
|
||||
|
||||
// Bulk Export
|
||||
if (appProperties.getBulk_export_enabled()) {
|
||||
registerProvider(bulkDataExportProvider);
|
||||
@@ -336,6 +343,17 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
daoConfig.setResourceServerIdStrategy(DaoConfig.IdStrategyEnum.UUID);
|
||||
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
|
||||
profiles:
|
||||
### This is the FHIR version. Choose between, dstu2, dstu3, r4 or r5
|
||||
active: dstu2
|
||||
active: r4
|
||||
jpa:
|
||||
properties:
|
||||
hibernate.dialect: org.hibernate.dialect.H2Dialect
|
||||
@@ -26,6 +26,16 @@ spring:
|
||||
|
||||
hapi:
|
||||
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:
|
||||
# - Patient
|
||||
# - Observation
|
||||
|
||||
Reference in New Issue
Block a user