Skip to content

Commit 5d84d9f

Browse files
Config property for validate resource status (#746)
* Added configuration property for validate_resource_status_for_package_upload * Added new parameter to test config file * Fixed merge issue
1 parent 5df8e03 commit 5d84d9f

File tree

5 files changed

+16
-1
lines changed

5 files changed

+16
-1
lines changed

src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public class AppProperties {
8080
private Subscription subscription = new Subscription();
8181
private Cors cors = null;
8282
private Partitioning partitioning = null;
83+
private Boolean validate_resource_status_for_package_upload = true;
8384
private Boolean install_transitive_ig_dependencies = true;
8485
private Map<String, PackageInstallationSpec> implementationGuides = null;
8586

@@ -589,6 +590,14 @@ public void setInstall_transitive_ig_dependencies(boolean install_transitive_ig_
589590
this.install_transitive_ig_dependencies = install_transitive_ig_dependencies;
590591
}
591592

593+
public Boolean getValidate_resource_status_for_package_upload() {
594+
return validate_resource_status_for_package_upload;
595+
}
596+
597+
public void setValidate_resource_status_for_package_upload(Boolean validate_resource_status_for_package_upload) {
598+
this.validate_resource_status_for_package_upload = validate_resource_status_for_package_upload;
599+
}
600+
592601
public Integer getBundle_batch_pool_size() {
593602
return this.bundle_batch_pool_size;
594603
}

src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
149149
jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled());
150150
jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled());
151151
jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled());
152+
jpaStorageSettings.setValidateResourceStatusForPackageUpload(appProperties.getValidate_resource_status_for_package_upload());
152153
jpaStorageSettings.setIndexOnUpliftedRefchains(appProperties.getUpliftedRefchains_enabled());
153154

154-
155155
if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) {
156156
jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds());
157157
}

src/main/resources/application.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ hapi:
152152
### enable to set the Server URL
153153
# server_address: http://hapi.fhir.org/baseR4
154154
# defer_indexing_for_codesystems_of_size: 101
155+
### 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.
156+
# validate_resource_status_for_package_upload: false
155157
# install_transitive_ig_dependencies: true
156158
#implementationguides:
157159
### example from registry (packages.fhir.org)

src/main/resources/cds.application.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ hapi:
153153
### enable to set the Server URL
154154
# server_address: http://hapi.fhir.org/baseR4
155155
# defer_indexing_for_codesystems_of_size: 101
156+
### 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.
157+
# validate_resource_status_for_package_upload: false
156158
# install_transitive_ig_dependencies: true
157159
#implementationguides:
158160
### example from registry (packages.fhir.org)

src/test/resources/application.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ hapi:
9494
### enable to set the Server URL
9595
# server_address: http://hapi.fhir.org/baseR4
9696
# defer_indexing_for_codesystems_of_size: 101
97+
### 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.
98+
# validate_resource_status_for_package_upload: false
9799
# install_transitive_ig_dependencies: true
98100
# implementationguides:
99101
### example from registry (packages.fhir.org)

0 commit comments

Comments
 (0)