Skip to content

Commit 92485be

Browse files
authored
Merge branch 'master' into ja_20250502_improve_dialect_handling
2 parents d972a2a + 89ff121 commit 92485be

File tree

9 files changed

+38
-9
lines changed

9 files changed

+38
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<properties>
77
<java.version>17</java.version>
88
<hapi.fhir.jpa.server.starter.revision>1</hapi.fhir.jpa.server.starter.revision>
9-
<clinical-reasoning.version>3.21.0</clinical-reasoning.version>
9+
<clinical-reasoning.version>3.22.0</clinical-reasoning.version>
1010
</properties>
1111

1212
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->

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

Lines changed: 21 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;
@@ -36,6 +37,7 @@ public class AppProperties {
3637
private Boolean mdm_enabled = false;
3738
private String mdm_rules_json_location = "mdm-rules.json";
3839
private boolean advanced_lucene_indexing = false;
40+
private boolean search_index_full_text_enabled = false;
3941
private boolean enable_index_of_type = false;
4042
private Boolean allow_cascading_deletes = false;
4143
private Boolean allow_contains_searches = true;
@@ -108,6 +110,8 @@ public class AppProperties {
108110
private Integer pre_expand_value_sets_default_count = 1000;
109111
private Integer pre_expand_value_sets_max_count = 1000;
110112
private Integer maximum_expansion_size = 1000;
113+
private JpaStorageSettings.StoreMetaSourceInformationEnum store_meta_source_information =
114+
JpaStorageSettings.StoreMetaSourceInformationEnum.NONE;
111115

112116
private Map<String, RemoteSystem> remote_terminology_service = null;
113117
private Boolean match_url_cache_enabled = false;
@@ -289,6 +293,14 @@ public void setAdvanced_lucene_indexing(boolean theAdvanced_lucene_indexing) {
289293
advanced_lucene_indexing = theAdvanced_lucene_indexing;
290294
}
291295

296+
public boolean getSearch_index_full_text_enabled() {
297+
return this.search_index_full_text_enabled;
298+
}
299+
300+
public void setSearch_index_full_text_enabled(boolean theSearch_index_full_text_enabled) {
301+
search_index_full_text_enabled = theSearch_index_full_text_enabled;
302+
}
303+
292304
public Boolean getAllow_cascading_deletes() {
293305
return allow_cascading_deletes;
294306
}
@@ -760,6 +772,15 @@ public boolean getIndex_storage_optimized() {
760772

761773
public void setIndex_storage_optimized(boolean theIndex_storage_optimized) {
762774
index_storage_optimized = theIndex_storage_optimized;
775+
}
776+
777+
public JpaStorageSettings.StoreMetaSourceInformationEnum getStore_meta_source_information() {
778+
return store_meta_source_information;
779+
}
780+
781+
public void setStore_meta_source_information(
782+
JpaStorageSettings.StoreMetaSourceInformationEnum store_meta_source_information) {
783+
this.store_meta_source_information = store_meta_source_information;
763784
}
764785

765786
public static class Cors {

src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrService.java

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

33
import ca.uhn.fhir.context.FhirVersionEnum;
4+
import ca.uhn.fhir.repository.IRepository;
45
import ca.uhn.fhir.rest.api.server.RequestDetails;
56
import ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson;
6-
import ca.uhn.hapi.fhir.cdshooks.api.ICdsConfigService;
77
import org.hl7.fhir.instance.model.api.IBaseParameters;
88
import org.hl7.fhir.instance.model.api.IPrimitiveType;
9-
import org.opencds.cqf.fhir.api.Repository;
109
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrService;
1110
import org.opencds.cqf.fhir.utility.adapter.IAdapterFactory;
1211

@@ -15,9 +14,8 @@
1514
public class UpdatedCdsCrService extends CdsCrService {
1615
private final IAdapterFactory adapterFactory;
1716

18-
public UpdatedCdsCrService(
19-
RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) {
20-
super(theRequestDetails, theRepository, theCdsConfigService);
17+
public UpdatedCdsCrService(RequestDetails theRequestDetails, IRepository theRepository) {
18+
super(theRequestDetails, theRepository);
2119
adapterFactory = IAdapterFactory.forFhirContext(theRepository.fhirContext());
2220
}
2321

src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryService.java

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

3+
import ca.uhn.fhir.repository.IRepository;
34
import org.hl7.fhir.instance.model.api.IIdType;
4-
import org.opencds.cqf.fhir.api.Repository;
55
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.CrDiscoveryService;
66

77
public class UpdatedCrDiscoveryService extends CrDiscoveryService {
8-
public UpdatedCrDiscoveryService(IIdType thePlanDefinitionId, Repository theRepository) {
8+
public UpdatedCrDiscoveryService(IIdType thePlanDefinitionId, IRepository theRepository) {
99
super(thePlanDefinitionId, theRepository);
1010
maxUriLength = 6000;
1111
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
206206

207207
jpaStorageSettings.setFilterParameterEnabled(appProperties.getFilter_search_enabled());
208208
jpaStorageSettings.setHibernateSearchIndexSearchParams(appProperties.getAdvanced_lucene_indexing());
209+
jpaStorageSettings.setHibernateSearchIndexFullText(appProperties.getSearch_index_full_text_enabled());
209210
jpaStorageSettings.setTreatBaseUrlsAsLocal(new HashSet<>(appProperties.getLocal_base_urls()));
210211
jpaStorageSettings.setTreatReferencesAsLogical(new HashSet<>(appProperties.getLogical_urls()));
211212

@@ -258,6 +259,10 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
258259
jpaStorageSettings.setBundleBatchPoolSize(appProperties.getBundle_batch_pool_size());
259260
jpaStorageSettings.setBundleBatchPoolSize(appProperties.getBundle_batch_pool_max_size());
260261

262+
// Set store meta source information
263+
ourLog.debug("Server configured to Store Meta Source: {}", appProperties.getStore_meta_source_information());
264+
jpaStorageSettings.setStoreMetaSourceInformation(appProperties.getStore_meta_source_information());
265+
261266
storageSettings(appProperties, jpaStorageSettings);
262267
return jpaStorageSettings;
263268
}

src/main/resources/application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ hapi:
204204
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
205205
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
206206
advanced_lucene_indexing: false
207+
search_index_full_text_enabled: false
207208
bulk_export_enabled: false
208209
bulk_import_enabled: false
209210
# language_search_parameter_enabled: true
@@ -294,7 +295,8 @@ hapi:
294295
# classes listed here will be fetched from the Spring context when combined with 'custom-bean-packages',
295296
# or will be instantiated via reflection using an no-arg contructor; then registered with the server
296297
#custom-provider-classes:
297-
298+
# specify what should be stored in meta.source based on StoreMetaSourceInformationEnum defaults to NONE
299+
# store_meta_source_information: NONE
298300
# Threadpool size for BATCH'ed GETs in a bundle.
299301
# bundle_batch_pool_size: 10
300302
# bundle_batch_pool_max_size: 50

src/main/resources/cds.application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ hapi:
196196
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
197197
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
198198
advanced_lucene_indexing: false
199+
search_index_full_text_enabled: false
199200
bulk_export_enabled: false
200201
bulk_import_enabled: false
201202
# language_search_parameter_enabled: true

src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"hapi.fhir.lastn_enabled=true",
5353
"hapi.fhir.store_resource_in_lucene_index_enabled=true",
5454
"hapi.fhir.advanced_lucene_indexing=true",
55+
"hapi.fhir.search_index_full_text_enabled=true",
5556

5657
"elasticsearch.enabled=true",
5758
"hapi.fhir.cr_enabled=false",

src/test/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ hapi:
129129
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
130130
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
131131
advanced_lucene_indexing: false
132+
search_index_full_text_enabled: false
132133
# enforce_referential_integrity_on_delete: false
133134
# This is an experimental feature, and does not fully support _total and other FHIR features.
134135
# enforce_referential_integrity_on_delete: false

0 commit comments

Comments
 (0)