From 5312f78b956d4ad4863580035972263586d616c3 Mon Sep 17 00:00:00 2001 From: Jaison B Date: Mon, 24 Jan 2022 16:21:50 -0700 Subject: [PATCH 1/5] Add ES native aggregation builder for lastN --- pom.xml | 2 +- src/main/resources/application.yaml | 35 ++++++++++++++++------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 7731908..e8e5d48 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.7.0-PRE8-SNAPSHOT + 5.7.0-PRE9-SNAPSHOT hapi-fhir-jpaserver-starter diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 17b1dfb..9313f4f 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -5,7 +5,7 @@ spring: baselineOnMigrate: true datasource: url: 'jdbc:h2:file:./target/database/h2' - #url: jdbc:h2:mem:test_mem +# url: jdbc:h2:mem:test_mem username: sa password: null driverClassName: org.h2.Driver @@ -18,6 +18,7 @@ spring: properties: hibernate.format_sql: false hibernate.show_sql: false + hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect # hibernate.dialect: org.hibernate.dialect.h2dialect # hibernate.hbm2ddl.auto: update # hibernate.jdbc.batch_size: 20 @@ -26,8 +27,12 @@ spring: # hibernate.cache.use_structured_entries: false # hibernate.cache.use_minimal_puts: false ### These settings will enable fulltext search with lucene -# hibernate.search.enabled: true + hibernate.search.enabled: true +# hibernate.search.automatic_indexing.strategy: session +# hibernate.search.automatic_indexing.synchronization.strategy: sync + hibernate.search.backend.type: elasticsearch # hibernate.search.backend.type: lucene + hibernate.search.backedn.analysis.configurer: ca.uhn.fhir.jpa.search.elastic.HapiElasticsearchAnalysisConfigurer # hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer # hibernate.search.backend.directory.type: local-filesystem # hibernate.search.backend.directory.root: target/lucenefiles @@ -153,21 +158,21 @@ hapi: # startTlsEnable: # startTlsRequired: # quitWait: -# lastn_enabled: true -# store_resource_in_lucene_index_enabled: true + lastn_enabled: true + store_resource_in_lucene_index_enabled: true ### This is configuration for normalized quantity serach level default is 0 ### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default ### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED ### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED # normalized_quantity_search_level: 2 -#elasticsearch: -# debug: -# pretty_print_json_log: false -# refresh_after_write: false -# enabled: false -# password: SomePassword -# required_index_status: YELLOW -# rest_url: 'localhost:9200' -# protocol: 'http' -# schema_management_strategy: CREATE -# username: SomeUsername +elasticsearch: + debug: + pretty_print_json_log: true + refresh_after_write: false + enabled: true + password: smilecdr + required_index_status: YELLOW + rest_url: 'localhost:19200' + protocol: 'http' + schema_management_strategy: CREATE + username: elastic From d2984d2c0c1a0744624a60bc083035890040897b Mon Sep 17 00:00:00 2001 From: Jaison B Date: Mon, 24 Jan 2022 16:25:24 -0700 Subject: [PATCH 2/5] Revert "Add ES native aggregation builder for lastN" This reverts commit 5312f78b956d4ad4863580035972263586d616c3. --- pom.xml | 2 +- src/main/resources/application.yaml | 35 +++++++++++++---------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index e8e5d48..7731908 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.7.0-PRE9-SNAPSHOT + 5.7.0-PRE8-SNAPSHOT hapi-fhir-jpaserver-starter diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 9313f4f..17b1dfb 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -5,7 +5,7 @@ spring: baselineOnMigrate: true datasource: url: 'jdbc:h2:file:./target/database/h2' -# url: jdbc:h2:mem:test_mem + #url: jdbc:h2:mem:test_mem username: sa password: null driverClassName: org.h2.Driver @@ -18,7 +18,6 @@ spring: properties: hibernate.format_sql: false hibernate.show_sql: false - hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect # hibernate.dialect: org.hibernate.dialect.h2dialect # hibernate.hbm2ddl.auto: update # hibernate.jdbc.batch_size: 20 @@ -27,12 +26,8 @@ spring: # hibernate.cache.use_structured_entries: false # hibernate.cache.use_minimal_puts: false ### These settings will enable fulltext search with lucene - hibernate.search.enabled: true -# hibernate.search.automatic_indexing.strategy: session -# hibernate.search.automatic_indexing.synchronization.strategy: sync - hibernate.search.backend.type: elasticsearch +# hibernate.search.enabled: true # hibernate.search.backend.type: lucene - hibernate.search.backedn.analysis.configurer: ca.uhn.fhir.jpa.search.elastic.HapiElasticsearchAnalysisConfigurer # hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer # hibernate.search.backend.directory.type: local-filesystem # hibernate.search.backend.directory.root: target/lucenefiles @@ -158,21 +153,21 @@ hapi: # startTlsEnable: # startTlsRequired: # quitWait: - lastn_enabled: true - store_resource_in_lucene_index_enabled: true +# lastn_enabled: true +# store_resource_in_lucene_index_enabled: true ### This is configuration for normalized quantity serach level default is 0 ### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default ### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED ### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED # normalized_quantity_search_level: 2 -elasticsearch: - debug: - pretty_print_json_log: true - refresh_after_write: false - enabled: true - password: smilecdr - required_index_status: YELLOW - rest_url: 'localhost:19200' - protocol: 'http' - schema_management_strategy: CREATE - username: elastic +#elasticsearch: +# debug: +# pretty_print_json_log: false +# refresh_after_write: false +# enabled: false +# password: SomePassword +# required_index_status: YELLOW +# rest_url: 'localhost:9200' +# protocol: 'http' +# schema_management_strategy: CREATE +# username: SomeUsername From eac87fca9b1864bfcbd315bc5b25d1fdd1f24972 Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Wed, 2 Feb 2022 10:35:41 -0500 Subject: [PATCH 3/5] bump Hapi PRE version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7731908..62cb823 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.7.0-PRE8-SNAPSHOT + 5.7.0-PRE10-SNAPSHOT hapi-fhir-jpaserver-starter From 56f43324fd816df95610c9ffb60b4cc2b52f1c0a Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Thu, 3 Feb 2022 13:25:22 -0500 Subject: [PATCH 4/5] Bump to Hapi 6.0-SNAPSHOT and register the ValueSet provider. --- pom.xml | 2 +- .../ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 62cb823..7a12c76 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.7.0-PRE10-SNAPSHOT + 6.0.0-PRE1-SNAPSHOT hapi-fhir-jpaserver-starter diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java b/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java index 36ef8ef..ca6a362 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/BaseJpaRestfulServer.java @@ -16,11 +16,7 @@ import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor; import ca.uhn.fhir.jpa.packages.IPackageInstallerSvc; import ca.uhn.fhir.jpa.packages.PackageInstallationSpec; import ca.uhn.fhir.jpa.partition.PartitionManagementProvider; -import ca.uhn.fhir.jpa.provider.IJpaSystemProvider; -import ca.uhn.fhir.jpa.provider.JpaCapabilityStatementProvider; -import ca.uhn.fhir.jpa.provider.JpaConformanceProviderDstu2; -import ca.uhn.fhir.jpa.provider.SubscriptionTriggeringProvider; -import ca.uhn.fhir.jpa.provider.TerminologyUploaderProvider; +import ca.uhn.fhir.jpa.provider.*; import ca.uhn.fhir.jpa.provider.dstu3.JpaConformanceProviderDstu3; import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider; import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor; @@ -78,6 +74,8 @@ public class BaseJpaRestfulServer extends RestfulServer { @Autowired IJpaSystemProvider jpaSystemProvider; @Autowired + ValueSetOperationProvider myValueSetOperationProvider; + @Autowired IInterceptorBroadcaster interceptorBroadcaster; @Autowired DatabaseBackedPagingProvider databaseBackedPagingProvider; @@ -141,7 +139,7 @@ public class BaseJpaRestfulServer extends RestfulServer { registerProviders(resourceProviderFactory.createProviders()); registerProvider(jpaSystemProvider); - + registerProvider(myValueSetOperationProvider); /* * The conformance provider exports the supported resources, search parameters, etc for * this server. The JPA version adds resourceProviders counts to the exported statement, so it From 28e86bdb8ddb10fb0cb3d906a6b8a25cb8c12d47 Mon Sep 17 00:00:00 2001 From: Jaison Baskaran Date: Wed, 23 Feb 2022 09:38:42 -0700 Subject: [PATCH 5/5] Bump HAPI-FHIR version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7a12c76..0ee8f08 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ ca.uhn.hapi.fhir hapi-fhir - 6.0.0-PRE1-SNAPSHOT + 6.0.0-PRE2-SNAPSHOT hapi-fhir-jpaserver-starter