Skip to content

Commit

Permalink
Update to HAPI 7.6.0 (hapifhir#731)
Browse files Browse the repository at this point in the history
* Bump to HAPI 7.5.0-SNAPSHOT

* Bump to latest HAPI version + fix config

* Bump to latest HAPI version + fix CR config + spotless

* Bump parent version to 7.5.4-SNAPSHOT

* Update to HAPI Release 7.6.0

---------

Co-authored-by: Brenin Rhodes <[email protected]>
  • Loading branch information
dotasek and barhodes authored Nov 22, 2024
1 parent 69fede9 commit 103fd01
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 113 deletions.
2 changes: 1 addition & 1 deletion 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
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 @@ -46,7 +47,6 @@
import ca.uhn.fhir.jpa.starter.common.validation.IRepositoryValidationInterceptorFactory;
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 @@ -66,6 +66,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 @@ -89,7 +91,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 @@ -191,11 +193,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
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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class CqlRuntimeProperties {

private Boolean debug_logging_enabled = false;
private Boolean debug_logging_enabled = false;
private Boolean enable_validation = false;
private Boolean enable_expression_caching = true;

Expand All @@ -14,7 +14,6 @@ public void setDebugLoggingEnabled(boolean debug_logging_enabled) {
this.debug_logging_enabled = debug_logging_enabled;
}


public boolean isEnableExpressionCaching() {
return enable_expression_caching;
}
Expand All @@ -30,6 +29,4 @@ public boolean isEnableValidation() {
public void EnableValidation(boolean enable_validation) {
this.enable_validation = enable_validation;
}


}
43 changes: 23 additions & 20 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CrCommonConfig.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package ca.uhn.fhir.jpa.starter.cr;

import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import ca.uhn.fhir.cr.common.CodeCacheResourceChangeListener;
import ca.uhn.fhir.cr.common.CqlThreadFactory;
import ca.uhn.fhir.cr.common.ElmCacheResourceChangeListener;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryInterceptor;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
import org.cqframework.cql.cql2elm.CqlCompilerOptions;
import org.cqframework.cql.cql2elm.model.CompiledLibrary;
import org.cqframework.cql.cql2elm.model.Model;
Expand All @@ -28,15 +29,13 @@
import org.springframework.context.annotation.Primary;
import org.springframework.security.concurrent.DelegatingSecurityContextExecutorService;

import ca.uhn.fhir.cr.common.CodeCacheResourceChangeListener;
import ca.uhn.fhir.cr.common.CqlThreadFactory;
import ca.uhn.fhir.cr.common.ElmCacheResourceChangeListener;
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryInterceptor;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.rest.server.RestfulServer;
import ca.uhn.fhir.rest.server.provider.ResourceProviderFactory;
import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Configuration
@Conditional({CrConfigCondition.class})
Expand Down Expand Up @@ -157,8 +156,12 @@ public ExecutorService cqlExecutor() {
@Bean
CareGapsProperties careGapsProperties(CrProperties theCrProperties) {
var careGapsProperties = new CareGapsProperties();
careGapsProperties.setCareGapsReporter(theCrProperties.getCareGaps().getReporter());
careGapsProperties.setCareGapsCompositionSectionAuthor(theCrProperties.getCareGaps().getSection_author());
// This check for the resource type really should be happening down in CR where the setting is actually used but
// that will have to wait for a future CR release
careGapsProperties.setCareGapsReporter(
theCrProperties.getCareGaps().getReporter().replace("Organization/", ""));
careGapsProperties.setCareGapsCompositionSectionAuthor(
theCrProperties.getCareGaps().getSection_author().replace("Organization/", ""));
return careGapsProperties;
}

Expand Down Expand Up @@ -224,5 +227,5 @@ public CodeCacheResourceChangeListener codeCacheResourceChangeListener(
@Bean
public ResourceChangeListenerRegistryInterceptor resourceChangeListenerRegistryInterceptor() {
return new ResourceChangeListenerRegistryInterceptor();
}
}
}
4 changes: 0 additions & 4 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/CrProperties.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package ca.uhn.fhir.jpa.starter.cr;

import org.cqframework.cql.cql2elm.CqlCompilerException;
import org.cqframework.cql.cql2elm.CqlTranslator;
import org.cqframework.cql.cql2elm.LibraryBuilder;

public class CrProperties {
private Boolean enabled;

Expand Down
16 changes: 6 additions & 10 deletions src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import ca.uhn.fhir.cr.config.dstu3.ApplyOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.CrDstu3Config;
import ca.uhn.fhir.cr.config.dstu3.ExtractOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.DataRequirementsOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.EvaluateOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.PackageOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.PopulateOperationConfig;
import ca.uhn.fhir.cr.config.dstu3.QuestionnaireOperationConfig;
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU3Condition;
import org.springframework.context.annotation.*;

Expand All @@ -15,11 +14,8 @@
CrCommonConfig.class,
CrDstu3Config.class,
ApplyOperationConfig.class,
ExtractOperationConfig.class,
PackageOperationConfig.class,
PopulateOperationConfig.class,
QuestionnaireOperationConfig.class
DataRequirementsOperationConfig.class,
EvaluateOperationConfig.class,
PackageOperationConfig.class
})
public class StarterCrDstu3Config {

}
public class StarterCrDstu3Config {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import ca.uhn.fhir.cr.config.r4.ApplyOperationConfig;
import ca.uhn.fhir.cr.config.r4.CrR4Config;
import ca.uhn.fhir.cr.config.r4.DataRequirementsOperationConfig;
import ca.uhn.fhir.cr.config.r4.EvaluateOperationConfig;
import ca.uhn.fhir.cr.config.r4.ExtractOperationConfig;
import ca.uhn.fhir.cr.config.r4.PackageOperationConfig;
import ca.uhn.fhir.cr.config.r4.PopulateOperationConfig;
Expand All @@ -17,11 +19,11 @@
CrCommonConfig.class,
CrR4Config.class,
ApplyOperationConfig.class,
DataRequirementsOperationConfig.class,
EvaluateOperationConfig.class,
ExtractOperationConfig.class,
PackageOperationConfig.class,
PopulateOperationConfig.class,
QuestionnaireOperationConfig.class
})
public class StarterCrR4Config {

}
public class StarterCrR4Config {}
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ hapi:
valueset_membership_mode: USE_EXPANSION # AUTO, USE_VALIDATE_CODE_OPERATION, USE_EXPANSION
code_lookup_mode: USE_VALIDATE_CODE_OPERATION # AUTO, USE_VALIDATE_CODE_OPERATION, USE_CODESYSTEM_URL
data:
search_parameter_mode: FILTER_IN_MEMORY # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY
search_parameter_mode: USE_SEARCH_PARAMETERS # AUTO, USE_SEARCH_PARAMETERS, FILTER_IN_MEMORY
terminology_parameter_mode: FILTER_IN_MEMORY # AUTO, USE_VALUE_SET_URL, USE_INLINE_CODES, FILTER_IN_MEMORY
profile_mode: DECLARED # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/cds.application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ hapi:
# allowed_bundle_types: COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET
# allow_cascading_deletes: true
# allow_contains_searches: true
# allow_external_references: true
allow_external_references: true
# allow_multiple_delete: true
# allow_override_default_search_params: true
# auto_create_placeholder_reference_targets: false
Expand Down
Loading

0 comments on commit 103fd01

Please sign in to comment.