Skip to content

Commit 7cd0637

Browse files
Enable configuration of store_meta_source_information (hapifhir#825)
* Enable configuration of store_meta_source_information * Update src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java Co-authored-by: James Agnew <[email protected]> * Apply spotless style checks --------- Co-authored-by: James Agnew <[email protected]>
1 parent e29dc54 commit 7cd0637

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package ca.uhn.fhir.jpa.starter;
22

33
import ca.uhn.fhir.context.FhirVersionEnum;
4+
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
45
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings.ClientIdStrategyEnum;
56
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings.IdStrategyEnum;
67
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
@@ -106,6 +107,8 @@ public class AppProperties {
106107
private Integer pre_expand_value_sets_default_count = 1000;
107108
private Integer pre_expand_value_sets_max_count = 1000;
108109
private Integer maximum_expansion_size = 1000;
110+
private JpaStorageSettings.StoreMetaSourceInformationEnum store_meta_source_information =
111+
JpaStorageSettings.StoreMetaSourceInformationEnum.NONE;
109112

110113
private Map<String, RemoteSystem> remote_terminology_service = null;
111114

@@ -742,6 +745,15 @@ public void setRemote_terminology_service(Map<String, RemoteSystem> remote_termi
742745
this.remote_terminology_service = remote_terminology_service;
743746
}
744747

748+
public JpaStorageSettings.StoreMetaSourceInformationEnum getStore_meta_source_information() {
749+
return store_meta_source_information;
750+
}
751+
752+
public void setStore_meta_source_information(
753+
JpaStorageSettings.StoreMetaSourceInformationEnum store_meta_source_information) {
754+
this.store_meta_source_information = store_meta_source_information;
755+
}
756+
745757
public static class Cors {
746758
private Boolean allow_Credentials = true;
747759
private List<String> allowed_origin = List.of("*");

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
254254
jpaStorageSettings.setBundleBatchPoolSize(appProperties.getBundle_batch_pool_size());
255255
jpaStorageSettings.setBundleBatchPoolSize(appProperties.getBundle_batch_pool_max_size());
256256

257+
// Set store meta source information
258+
ourLog.debug("Server configured to Store Meta Source: {}", appProperties.getStore_meta_source_information());
259+
jpaStorageSettings.setStoreMetaSourceInformation(appProperties.getStore_meta_source_information());
260+
257261
storageSettings(appProperties, jpaStorageSettings);
258262
return jpaStorageSettings;
259263
}

src/main/resources/application.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ hapi:
276276
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
277277
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
278278
#custom-provider-classes:
279-
279+
# specify what should be stored in meta.source based on StoreMetaSourceInformationEnum defaults to NONE
280+
# store_meta_source_information: NONE
280281
# Threadpool size for BATCH'ed GETs in a bundle.
281282
# bundle_batch_pool_size: 10
282283
# bundle_batch_pool_max_size: 50

0 commit comments

Comments
 (0)