Skip to content

Commit c10e84e

Browse files
committed
issue-5884-Add-Config-Resource-History : Adding configuration for Disabling Resource History.
1 parent 9a9cc8b commit c10e84e

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ public class AppProperties {
9696
private Integer bundle_batch_pool_max_size = 100;
9797
private final Set<String> local_base_urls = new HashSet<>();
9898
private final Set<String> logical_urls = new HashSet<>();
99+
100+
private Boolean resource_dbhistory_enabled = true;
99101

100102
private final List<String> custom_interceptor_classes = new ArrayList<>();
101103

@@ -903,4 +905,12 @@ public boolean getEnable_index_of_type() {
903905
public void setEnable_index_of_type(boolean enable_index_of_type) {
904906
this.enable_index_of_type = enable_index_of_type;
905907
}
908+
909+
public Boolean getResource_dbhistory_enabled() {
910+
return resource_dbhistory_enabled;
911+
}
912+
913+
public void setResource_dbhistory_enabled(Boolean resource_dbhistory_enabled) {
914+
this.resource_dbhistory_enabled = resource_dbhistory_enabled;
915+
}
906916
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
194194
jpaStorageSettings.setResourceServerIdStrategy(appProperties.getServer_id_strategy());
195195
ourLog.info("Server configured to use '" + appProperties.getServer_id_strategy() + "' Server ID Strategy");
196196
}
197+
198+
//to Disable the Resource History
199+
jpaStorageSettings.setResourceDbHistoryEnabled(appProperties.getResource_dbhistory_enabled());
197200

198201
// Parallel Batch GET execution settings
199202
jpaStorageSettings.setBundleBatchPoolSize(appProperties.getBundle_batch_pool_size());

src/main/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ hapi:
127127
# enable_index_missing_fields: false
128128
# enable_index_of_type: true
129129
# enable_index_contained_resource: false
130+
# resource_dbhistory_enabled: false
130131
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
131132
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
132133
advanced_lucene_indexing: false

0 commit comments

Comments
 (0)