Skip to content

Commit

Permalink
Merge tag 'image/v7.6.0' into update-to-v7.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hankwallace committed Jan 5, 2025
2 parents 25d0fda + 103fd01 commit e27bc75
Show file tree
Hide file tree
Showing 20 changed files with 499 additions and 157 deletions.
20 changes: 10 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>7.4.0</version>
<version>7.6.0</version>
</parent>

<artifactId>hapi-fhir-jpaserver-starter</artifactId>
Expand Down Expand Up @@ -44,15 +44,7 @@
<dependencyManagement>
<dependencies>

<!-- Temporarily override CR depedencies for debugging -->
<!-- <dependency>-->
<!-- <groupId>org.opencds.cqf.fhir</groupId>-->
<!-- <artifactId>cqf-fhir-bom</artifactId>-->
<!-- <version>3.4.0</version>-->
<!-- <type>pom</type>-->
<!-- <scope>import</scope>-->
<!-- </dependency>-->
<dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.8</version>
Expand Down Expand Up @@ -381,6 +373,14 @@
<version>1.13.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus-simpleclient -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
<version>1.13.3</version>
</dependency>


<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
Expand Down
48 changes: 46 additions & 2 deletions src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class AppProperties {
private Subscription subscription = new Subscription();
private Cors cors = null;
private Partitioning partitioning = null;
private Boolean validate_resource_status_for_package_upload = true;
private Boolean install_transitive_ig_dependencies = true;
private Map<String, PackageInstallationSpec> implementationGuides = null;

Expand All @@ -106,7 +107,11 @@ public class AppProperties {
private final List<String> custom_interceptor_classes = new ArrayList<>();

private final List<String> custom_provider_classes = new ArrayList<>();
private Boolean upliftedRefchains_enabled = false;

private boolean userRequestRetryVersionConflictsInterceptorEnabled = false;

private List<Integer> search_prefetch_thresholds = new ArrayList<>();

public List<String> getCustomInterceptorClasses() {
return custom_interceptor_classes;
Expand Down Expand Up @@ -613,6 +618,14 @@ public void setInstall_transitive_ig_dependencies(boolean install_transitive_ig_
this.install_transitive_ig_dependencies = install_transitive_ig_dependencies;
}

public Boolean getValidate_resource_status_for_package_upload() {
return validate_resource_status_for_package_upload;
}

public void setValidate_resource_status_for_package_upload(Boolean validate_resource_status_for_package_upload) {
this.validate_resource_status_for_package_upload = validate_resource_status_for_package_upload;
}

public Integer getBundle_batch_pool_size() {
return this.bundle_batch_pool_size;
}
Expand Down Expand Up @@ -670,6 +683,30 @@ public void setLanguage_search_parameter_enabled(Boolean language_search_paramet
this.language_search_parameter_enabled = language_search_parameter_enabled;
}

public List<Integer> getSearch_prefetch_thresholds() {
return this.search_prefetch_thresholds;
}

public void setSearch_prefetch_thresholds(List<Integer> thePrefetchThresholds) {
this.search_prefetch_thresholds = thePrefetchThresholds;
}

public boolean getUpliftedRefchains_enabled() {
return upliftedRefchains_enabled;
}

public void setUpliftedRefchains_enabled(boolean upliftedRefchains_enabled) {
this.upliftedRefchains_enabled = upliftedRefchains_enabled;
}

public Boolean getUserRequestRetryVersionConflictsInterceptorEnabled() {
return userRequestRetryVersionConflictsInterceptorEnabled;
}

public void setUserRequestRetryVersionConflictsInterceptorEnabled(Boolean userRequestRetryVersionConflictsInterceptorEnabled) {
this.userRequestRetryVersionConflictsInterceptorEnabled = userRequestRetryVersionConflictsInterceptorEnabled;
}

public static class Cors {
private Boolean allow_Credentials = true;
private List<String> allowed_origin = List.of("*");
Expand All @@ -689,8 +726,6 @@ public Boolean getAllow_Credentials() {
public void setAllow_Credentials(Boolean allow_Credentials) {
this.allow_Credentials = allow_Credentials;
}


}

public static class Oauth {
Expand Down Expand Up @@ -951,6 +986,7 @@ public static class Partitioning {

private Boolean partitioning_include_in_search_hashes = false;
private Boolean allow_references_across_partitions = false;
private Boolean conditional_create_duplicate_identifiers_enabled = false;

public Boolean getPartitioning_include_in_search_hashes() {
return partitioning_include_in_search_hashes;
Expand All @@ -966,6 +1002,14 @@ public Boolean getAllow_references_across_partitions() {
public void setAllow_references_across_partitions(Boolean allow_references_across_partitions) {
this.allow_references_across_partitions = allow_references_across_partitions;
}

public Boolean getConditional_create_duplicate_identifiers_enabled() {
return conditional_create_duplicate_identifiers_enabled;
}

public void setConditional_create_duplicate_identifiers_enabled(Boolean conditional_create_duplicate_identifiers_enabled) {
this.conditional_create_duplicate_identifiers_enabled = conditional_create_duplicate_identifiers_enabled;
}
}

public static class Subscription {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled());
jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled());
jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled());
jpaStorageSettings.setValidateResourceStatusForPackageUpload(appProperties.getValidate_resource_status_for_package_upload());
jpaStorageSettings.setIndexOnUpliftedRefchains(appProperties.getUpliftedRefchains_enabled());

if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) {
jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds());
}

Integer maxFetchSize = appProperties.getMax_page_size();
jpaStorageSettings.setFetchSizeDefaultMaximum(maxFetchSize);
Expand Down Expand Up @@ -244,6 +249,8 @@ public PartitionSettings partitionSettings(AppProperties appProperties) {
} else {
retVal.setAllowReferencesAcrossPartitions(CrossPartitionReferenceMode.NOT_ALLOWED);
}
retVal.setConditionalCreateDuplicateIdentifiersEnabled(
appProperties.getPartitioning().getConditional_create_duplicate_identifiers_enabled());
}

return retVal;
Expand Down
21 changes: 14 additions & 7 deletions src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ca.uhn.fhir.jpa.starter.common;

import ca.uhn.fhir.batch2.config.Batch2JobRegisterer;
import ca.uhn.fhir.batch2.coordinator.JobDefinitionRegistry;
import ca.uhn.fhir.batch2.jobs.export.BulkDataExportProvider;
import ca.uhn.fhir.batch2.jobs.imprt.BulkDataImportProvider;
Expand Down Expand Up @@ -28,6 +29,7 @@
import ca.uhn.fhir.jpa.delete.ThreadSafeResourceDeleterSvc;
import ca.uhn.fhir.jpa.graphql.GraphQLProvider;
import ca.uhn.fhir.jpa.interceptor.CascadingDeleteInterceptor;
import ca.uhn.fhir.jpa.interceptor.UserRequestRetryVersionConflictsInterceptor;
import ca.uhn.fhir.jpa.interceptor.validation.RepositoryValidatingInterceptor;
import ca.uhn.fhir.jpa.ips.provider.IpsOperationProvider;
import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
Expand All @@ -50,7 +52,6 @@
import ca.uhn.fhir.jpa.starter.interceptor.SmartWellKnownInterceptor;
import ca.uhn.fhir.jpa.starter.ig.IImplementationGuideOperationProvider;
import ca.uhn.fhir.jpa.starter.util.EnvironmentHelper;
import ca.uhn.fhir.jpa.starter.ig.IImplementationGuideOperationProvider;
import ca.uhn.fhir.jpa.subscription.util.SubscriptionDebugLogInterceptor;
import ca.uhn.fhir.jpa.util.ResourceCountCache;
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain;
Expand All @@ -71,6 +72,8 @@
import com.google.common.base.Strings;
import jakarta.persistence.EntityManagerFactory;
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
Expand All @@ -94,7 +97,7 @@
@Import(ThreadPoolFactoryConfig.class)
public class StarterJpaConfig {

private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(StarterJpaConfig.class);
private static final Logger ourLog = LoggerFactory.getLogger(StarterJpaConfig.class);

@Bean
public IFulltextSearchSvc fullTextSearchSvc() {
Expand Down Expand Up @@ -196,11 +199,11 @@ public LoggingInterceptor loggingInterceptor(AppProperties appProperties) {
@Primary
@Conditional(OnImplementationGuidesPresent.class)
public IPackageInstallerSvc packageInstaller(
AppProperties appProperties,
JobDefinition<ReindexJobParameters> reindexJobParametersJobDefinition,
JobDefinitionRegistry jobDefinitionRegistry,
IPackageInstallerSvc packageInstallerSvc) {
jobDefinitionRegistry.addJobDefinitionIfNotRegistered(reindexJobParametersJobDefinition);
AppProperties appProperties,
IPackageInstallerSvc packageInstallerSvc,
Batch2JobRegisterer batch2JobRegisterer) {

batch2JobRegisterer.start();

if (appProperties.getImplementationGuides() != null) {
Map<String, PackageInstallationSpec> guides = appProperties.getImplementationGuides();
Expand Down Expand Up @@ -481,6 +484,10 @@ public RestfulServer restfulServer(
fhirServer.registerProvider(theIpsOperationProvider.get());
}

if (appProperties.getUserRequestRetryVersionConflictsInterceptorEnabled() ) {
fhirServer.registerInterceptor(new UserRequestRetryVersionConflictsInterceptor());
}

// register custom providers
registerCustomProviders(fhirServer, appContext, appProperties.getCustomProviderClasses());

Expand Down
26 changes: 13 additions & 13 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CareGapsProperties.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package ca.uhn.fhir.jpa.starter.cr;

public class CareGapsProperties {
private String reporter = "default";
private String reporter = "default";
private String section_author = "default";

public String getReporter() {
return reporter;
}
public String getReporter() {
return reporter;
}

public void setReporter(String reporter) {
this.reporter = reporter;
}
public void setReporter(String reporter) {
this.reporter = reporter;
}

public String getSection_author() {
return section_author;
}
public String getSection_author() {
return section_author;
}

public void setSection_author(String section_author) {
this.section_author = section_author;
}
public void setSection_author(String section_author) {
this.section_author = section_author;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.cqframework.cql.cql2elm.LibraryBuilder;

public class CqlCompilerProperties {
private Boolean validate_units = true;
private Boolean validate_units = true;
private Boolean verify_only = false;
private String compatibility_level = "1.5";
private CqlCompilerException.ErrorSeverity error_level = CqlCompilerException.ErrorSeverity.Info;
Expand All @@ -27,7 +27,6 @@ public class CqlCompilerProperties {
private Boolean require_from_keyword = false;
private Boolean disable_default_model_info_load = false;


public boolean isValidateUnits() {
return validate_units;
}
Expand Down Expand Up @@ -194,5 +193,5 @@ public CqlTranslator.Format getTranslatorFormat() {

public void setTranslatorFormat(CqlTranslator.Format translatorFormat) {
this.translator_format = translatorFormat;
}
}
}
90 changes: 45 additions & 45 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CqlProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,49 @@

public class CqlProperties {

private Boolean use_embedded_libraries = true;
private CqlCompilerProperties compiler = new CqlCompilerProperties();
private CqlRuntimeProperties runtime = new CqlRuntimeProperties();
private TerminologySettings terminology = new TerminologySettings();
private RetrieveSettings data = new RetrieveSettings();
public Boolean getUse_embedded_libraries() {
return use_embedded_libraries;
}

public void setUse_embedded_libraries(Boolean use_embedded_libraries) {
this.use_embedded_libraries = use_embedded_libraries;
}

public CqlCompilerProperties getCompiler() {
return compiler;
}

public void setCompiler(CqlCompilerProperties compiler) {
this.compiler = compiler;
}

public CqlRuntimeProperties getRuntime() {
return runtime;
}
public void setRuntime(CqlRuntimeProperties runtime) {
this.runtime = runtime;
}

public TerminologySettings getTerminology() {
return terminology;
}

public void setTerminology(TerminologySettings terminology) {
this.terminology = terminology;
}

public RetrieveSettings getData() {
return data;
}

public void setData(RetrieveSettings data) {
this.data = data;
}
private Boolean use_embedded_libraries = true;
private CqlCompilerProperties compiler = new CqlCompilerProperties();
private CqlRuntimeProperties runtime = new CqlRuntimeProperties();
private TerminologySettings terminology = new TerminologySettings();
private RetrieveSettings data = new RetrieveSettings();

public Boolean getUse_embedded_libraries() {
return use_embedded_libraries;
}

public void setUse_embedded_libraries(Boolean use_embedded_libraries) {
this.use_embedded_libraries = use_embedded_libraries;
}

public CqlCompilerProperties getCompiler() {
return compiler;
}

public void setCompiler(CqlCompilerProperties compiler) {
this.compiler = compiler;
}

public CqlRuntimeProperties getRuntime() {
return runtime;
}

public void setRuntime(CqlRuntimeProperties runtime) {
this.runtime = runtime;
}

public TerminologySettings getTerminology() {
return terminology;
}

public void setTerminology(TerminologySettings terminology) {
this.terminology = terminology;
}

public RetrieveSettings getData() {
return data;
}

public void setData(RetrieveSettings data) {
this.data = data;
}
}
Loading

0 comments on commit e27bc75

Please sign in to comment.