Merge branch 'master' into rel_6_0_0_mergeback

This commit is contained in:
Tadgh
2022-05-19 10:43:51 -07:00
18 changed files with 223 additions and 95 deletions

View File

@@ -25,12 +25,14 @@ public class AppProperties {
private Boolean openapi_enabled = false;
private Boolean mdm_enabled = false;
private boolean advanced_lucene_indexing = false;
private boolean enable_index_of_type = false;
private Boolean allow_cascading_deletes = false;
private Boolean allow_contains_searches = true;
private Boolean allow_external_references = false;
private Boolean allow_multiple_delete = false;
private Boolean allow_override_default_search_params = true;
private Boolean auto_create_placeholder_reference_targets = false;
private Boolean dao_scheduling_enabled = true;
private Boolean delete_expunge_enabled = false;
private Boolean enable_index_missing_fields = false;
private Boolean enable_index_contained_resource = false;
@@ -286,6 +288,14 @@ public class AppProperties {
this.default_page_size = default_page_size;
}
public Boolean getDao_scheduling_enabled() {
return dao_scheduling_enabled;
}
public void setDao_scheduling_enabled(Boolean dao_scheduling_enabled) {
this.dao_scheduling_enabled = dao_scheduling_enabled;
}
public Boolean getDelete_expunge_enabled() {
return delete_expunge_enabled;
}
@@ -807,4 +817,12 @@ public class AppProperties {
private Boolean quitWait = false;
}
}
public boolean getEnable_index_of_type() {
return enable_index_of_type;
}
public void setEnable_index_of_type(boolean enable_index_of_type) {
this.enable_index_of_type = enable_index_of_type;
}
}

View File

@@ -28,6 +28,7 @@ import ca.uhn.fhir.rest.openapi.OpenApiInterceptor;
import ca.uhn.fhir.rest.server.*;
import ca.uhn.fhir.rest.server.interceptor.*;
import ca.uhn.fhir.rest.server.interceptor.partition.RequestTenantPartitionInterceptor;
import ca.uhn.fhir.rest.server.provider.ReindexProvider;
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
import ca.uhn.fhir.rest.server.tenant.UrlBaseTenantIdentificationStrategy;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
@@ -80,6 +81,8 @@ public class BaseJpaRestfulServer extends RestfulServer {
@Autowired
ValueSetOperationProvider valueSetOperationProvider;
@Autowired
ReindexProvider reindexProvider;
@Autowired
BinaryStorageInterceptor binaryStorageInterceptor;
@Autowired
IPackageInstallerSvc packageInstallerSvc;
@@ -113,8 +116,10 @@ public class BaseJpaRestfulServer extends RestfulServer {
// Customize supported resource types
List<String> supportedResourceTypes = appProperties.getSupported_resource_types();
if (!supportedResourceTypes.isEmpty() && !supportedResourceTypes.contains("SearchParameter")) {
supportedResourceTypes.add("SearchParameter");
if (!supportedResourceTypes.isEmpty()) {
if (!supportedResourceTypes.contains("SearchParameter")) {
supportedResourceTypes.add("SearchParameter");
}
daoRegistry.setSupportedResourceTypes(supportedResourceTypes);
}
@@ -358,6 +363,9 @@ public class BaseJpaRestfulServer extends RestfulServer {
// valueSet Operations i.e $expand
registerProvider(valueSetOperationProvider);
//reindex Provider $reindex
registerProvider(reindexProvider);
// Partitioning
if (appProperties.getPartitioning() != null) {
registerInterceptor(new RequestTenantPartitionInterceptor());

View File

@@ -40,6 +40,7 @@ public class FhirServerConfigCommon {
ourLog.info("Server configured to " + (appProperties.getAllow_contains_searches() ? "allow" : "deny") + " contains searches");
ourLog.info("Server configured to " + (appProperties.getAllow_multiple_delete() ? "allow" : "deny") + " multiple deletes");
ourLog.info("Server configured to " + (appProperties.getAllow_external_references() ? "allow" : "deny") + " external references");
ourLog.info("Server configured to " + (appProperties.getDao_scheduling_enabled() ? "enable" : "disable") + " DAO scheduling");
ourLog.info("Server configured to " + (appProperties.getDelete_expunge_enabled() ? "enable" : "disable") + " delete expunges");
ourLog.info("Server configured to " + (appProperties.getExpunge_enabled() ? "enable" : "disable") + " expunges");
ourLog.info("Server configured to " + (appProperties.getAllow_override_default_search_params() ? "allow" : "deny") + " overriding default search params");
@@ -86,6 +87,7 @@ public class FhirServerConfigCommon {
retVal.setAllowContainsSearches(appProperties.getAllow_contains_searches());
retVal.setAllowMultipleDelete(appProperties.getAllow_multiple_delete());
retVal.setAllowExternalReferences(appProperties.getAllow_external_references());
retVal.setSchedulingDisabled(!appProperties.getDao_scheduling_enabled());
retVal.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled());
retVal.setExpungeEnabled(appProperties.getExpunge_enabled());
if(appProperties.getSubscription() != null && appProperties.getSubscription().getEmail() != null)
@@ -177,6 +179,7 @@ public class FhirServerConfigCommon {
modelConfig.setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
modelConfig.setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
modelConfig.setIndexIdentifierOfType(appProperties.getEnable_index_of_type());
return modelConfig;
}

View File

@@ -1,6 +1,14 @@
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
management:
endpoints:
web:
exposure:
include: "health,prometheus"
spring:
main:
allow-circular-references: true
#allow-bean-definition-overriding: true
flyway:
enabled: false
check-location: false
@@ -83,9 +91,13 @@ hapi:
# delete_expunge_enabled: true
# enable_repository_validating_interceptor: false
# enable_index_missing_fields: false
# enable_index_of_type: true
# enable_index_contained_resource: false
# This is an experimental feature, and does not fully support _total and other FHIR features.
### !!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

View File

@@ -15,6 +15,6 @@ public class Demo {
System.setProperty("spring.batch.job.enabled", "false");
SpringApplication.run(Demo.class, args);
//Server is now accessible at eg. http://localhost:8080/metadata
//Server is now accessible at eg. http://localhost:8080/fhir/metadata
}
}