From c7f7682137b3ff605cd3accd30f0c6b73497da4e Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Wed, 2 Oct 2024 12:05:23 +1000 Subject: [PATCH 1/3] Added configuration property for validate_resource_status_for_package_upload --- src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java | 9 +++++++++ .../fhir/jpa/starter/common/FhirServerConfigCommon.java | 2 +- src/main/resources/application.yaml | 2 ++ src/main/resources/cds.application.yaml | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index 0f63df44ae5..bdc3d0eea9c 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -80,6 +80,7 @@ public class AppProperties { private Subscription subscription = new Subscription(); private Cors cors = null; private Partitioning partitioning = null; + private Boolean validate_resource_status_for_package_upload = true; private Boolean install_transitive_ig_dependencies = true; private Map implementationGuides = null; @@ -586,6 +587,14 @@ public void setInstall_transitive_ig_dependencies(boolean install_transitive_ig_ this.install_transitive_ig_dependencies = install_transitive_ig_dependencies; } + public Boolean getValidate_resource_status_for_package_upload() { + return validate_resource_status_for_package_upload; + } + + public void setValidate_resource_status_for_package_upload(Boolean validate_resource_status_for_package_upload) { + this.validate_resource_status_for_package_upload = validate_resource_status_for_package_upload; + } + public Integer getBundle_batch_pool_size() { return this.bundle_batch_pool_size; } diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index a312360723c..a74c40429a0 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -149,7 +149,7 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) { jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled()); jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled()); jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled()); - + jpaStorageSettings.setValidateResourceStatusForPackageUpload(appProperties.getValidate_resource_status_for_package_upload()); Integer maxFetchSize = appProperties.getMax_page_size(); jpaStorageSettings.setFetchSizeDefaultMaximum(maxFetchSize); diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 394c97b0382..3136c7e5046 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -146,6 +146,8 @@ hapi: ### enable to set the Server URL # server_address: http://hapi.fhir.org/baseR4 # defer_indexing_for_codesystems_of_size: 101 + ### Flag is true by default. This flag filters resources during package installation, allowing only those resources with a valid status (e.g. active) to be installed. + # validate_resource_status_for_package_upload: false # install_transitive_ig_dependencies: true #implementationguides: ### example from registry (packages.fhir.org) diff --git a/src/main/resources/cds.application.yaml b/src/main/resources/cds.application.yaml index b1703d86c4c..6114526587e 100644 --- a/src/main/resources/cds.application.yaml +++ b/src/main/resources/cds.application.yaml @@ -131,6 +131,8 @@ hapi: ### enable to set the Server URL # server_address: http://hapi.fhir.org/baseR4 # defer_indexing_for_codesystems_of_size: 101 + ### Flag is true by default. This flag filters resources during package installation, allowing only those resources with a valid status (e.g. active) to be installed. + # validate_resource_status_for_package_upload: false # install_transitive_ig_dependencies: true #implementationguides: ### example from registry (packages.fhir.org) From 4167cc537f868fe695741c597ea05c69544ca95c Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Thu, 3 Oct 2024 08:57:42 +1000 Subject: [PATCH 2/3] Added new parameter to test config file --- src/test/resources/application.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/resources/application.yaml b/src/test/resources/application.yaml index 911d9709034..ef80df3c0bd 100644 --- a/src/test/resources/application.yaml +++ b/src/test/resources/application.yaml @@ -67,6 +67,8 @@ hapi: ### enable to set the Server URL # server_address: http://hapi.fhir.org/baseR4 # defer_indexing_for_codesystems_of_size: 101 + ### Flag is true by default. This flag filters resources during package installation, allowing only those resources with a valid status (e.g. active) to be installed. + # validate_resource_status_for_package_upload: false # install_transitive_ig_dependencies: true # implementationguides: ### example from registry (packages.fhir.org) From be35eb925db654bb778eedf10e5fc0d8f3c2aaf3 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Fri, 8 Nov 2024 16:30:30 +1100 Subject: [PATCH 3/3] Fixed merge issue --- .../uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index 6fb4ec848be..f9fc1753d49 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -149,13 +149,9 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) { jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled()); jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled()); jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled()); -<<<<<<< HEAD jpaStorageSettings.setValidateResourceStatusForPackageUpload(appProperties.getValidate_resource_status_for_package_upload()); -======= jpaStorageSettings.setIndexOnUpliftedRefchains(appProperties.getUpliftedRefchains_enabled()); ->>>>>>> origin/master - if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) { jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds()); }