Merge branch 'hapifhir:master' into feat/remote-terminology-support
This commit is contained in:
1
.github/workflows/spotless-check.yml
vendored
1
.github/workflows/spotless-check.yml
vendored
@@ -22,6 +22,7 @@ jobs:
|
|||||||
- uses: mshick/add-pr-comment@v2
|
- uses: mshick/add-pr-comment@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
proxy-url: https://slack-bots.azure.smilecdr.com/robogary/github
|
||||||
message-success: |
|
message-success: |
|
||||||
Formatting check succeeded!
|
Formatting check succeeded!
|
||||||
message-failure: |
|
message-failure: |
|
||||||
|
|||||||
7
pom.xml
7
pom.xml
@@ -6,6 +6,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<hapi.fhir.jpa.server.starter.revision>1</hapi.fhir.jpa.server.starter.revision>
|
<hapi.fhir.jpa.server.starter.revision>1</hapi.fhir.jpa.server.starter.revision>
|
||||||
|
<clinical-reasoning.version>3.20.0</clinical-reasoning.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
|
<!-- one-liner to take you to the cloud with settings form the application.yaml file: -->
|
||||||
@@ -113,9 +114,9 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- This dependency includes the JPA CQL Server -->
|
<!-- This dependency includes the JPA CQL Server -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>org.opencds.cqf.fhir</groupId>
|
||||||
<artifactId>hapi-fhir-storage-cr</artifactId>
|
<artifactId>cqf-fhir-cr-hapi</artifactId>
|
||||||
<version>${project.parent.version}</version>
|
<version>${clinical-reasoning.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- This dependency includes the JPA MDM Server -->
|
<!-- This dependency includes the JPA MDM Server -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static ca.uhn.hapi.fhir.cdshooks.config.CdsHooksConfig.CDS_HOOKS_OBJECT_MAPPER_FACTORY;
|
import static org.opencds.cqf.fhir.cr.hapi.config.test.TestCdsHooksConfig.CDS_HOOKS_OBJECT_MAPPER_FACTORY;
|
||||||
|
|
||||||
@Configurable
|
@Configurable
|
||||||
public class CdsHooksServlet extends HttpServlet {
|
public class CdsHooksServlet extends HttpServlet {
|
||||||
|
|||||||
@@ -5,14 +5,16 @@ import ca.uhn.fhir.jpa.starter.cr.CrCommonConfig;
|
|||||||
import ca.uhn.fhir.jpa.starter.cr.CrConfigCondition;
|
import ca.uhn.fhir.jpa.starter.cr.CrConfigCondition;
|
||||||
import ca.uhn.fhir.jpa.starter.cr.CrProperties;
|
import ca.uhn.fhir.jpa.starter.cr.CrProperties;
|
||||||
import ca.uhn.hapi.fhir.cdshooks.api.ICdsHooksDaoAuthorizationSvc;
|
import ca.uhn.hapi.fhir.cdshooks.api.ICdsHooksDaoAuthorizationSvc;
|
||||||
import ca.uhn.hapi.fhir.cdshooks.config.CdsHooksConfig;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.CdsHooksContextBooter;
|
import ca.uhn.hapi.fhir.cdshooks.svc.CdsHooksContextBooter;
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.CdsCrServiceRegistry;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.CdsCrSettings;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.ICdsCrServiceRegistry;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.discovery.CdsCrDiscoveryServiceRegistry;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.discovery.ICdsCrDiscoveryServiceRegistry;
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrServiceRegistry;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrSettings;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.ICdsCrServiceRegistry;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.CdsCrDiscoveryServiceRegistry;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.ICdsCrDiscoveryServiceRegistry;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.CrCdsHooksConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.RepositoryConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.test.TestCdsHooksConfig;
|
||||||
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
||||||
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
@@ -22,27 +24,14 @@ import org.springframework.context.annotation.Import;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Conditional({CdsHooksConfigCondition.class, CrConfigCondition.class})
|
@Conditional({CdsHooksConfigCondition.class, CrConfigCondition.class})
|
||||||
@Import({CdsHooksConfig.class, CrCommonConfig.class})
|
@Import({RepositoryConfig.class, TestCdsHooksConfig.class, CrCdsHooksConfig.class, CrCommonConfig.class})
|
||||||
public class StarterCdsHooksConfig {
|
public class StarterCdsHooksConfig {
|
||||||
|
|
||||||
// @Bean
|
|
||||||
// CdsPrefetchSvc cdsPrefetchSvc(
|
|
||||||
// CdsResolutionStrategySvc theCdsResolutionStrategySvc,
|
|
||||||
// CdsPrefetchDaoSvc theResourcePrefetchDao,
|
|
||||||
// CdsPrefetchFhirClientSvc theResourcePrefetchFhirClient,
|
|
||||||
// ICdsHooksDaoAuthorizationSvc theCdsHooksDaoAuthorizationSvc) {
|
|
||||||
// return new ModuleConfigurationPrefetchSvc(
|
|
||||||
// theCdsResolutionStrategySvc,
|
|
||||||
// theResourcePrefetchDao,
|
|
||||||
// theResourcePrefetchFhirClient,
|
|
||||||
// theCdsHooksDaoAuthorizationSvc);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() {
|
public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() {
|
||||||
CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry();
|
CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry();
|
||||||
registry.unregister(FhirVersionEnum.R4);
|
registry.unregister(FhirVersionEnum.R4);
|
||||||
registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryServiceR4.class);
|
registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryService.class);
|
||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +39,7 @@ public class StarterCdsHooksConfig {
|
|||||||
public ICdsCrServiceRegistry cdsCrServiceRegistry() {
|
public ICdsCrServiceRegistry cdsCrServiceRegistry() {
|
||||||
CdsCrServiceRegistry registry = new CdsCrServiceRegistry();
|
CdsCrServiceRegistry registry = new CdsCrServiceRegistry();
|
||||||
registry.unregister(FhirVersionEnum.R4);
|
registry.unregister(FhirVersionEnum.R4);
|
||||||
registry.register(FhirVersionEnum.R4, UpdatedCdsCrServiceR4.class);
|
registry.register(FhirVersionEnum.R4, UpdatedCdsCrService.class);
|
||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package ca.uhn.fhir.jpa.starter.cdshooks;
|
||||||
|
|
||||||
|
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||||
|
import ca.uhn.fhir.rest.api.server.RequestDetails;
|
||||||
|
import ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson;
|
||||||
|
import ca.uhn.hapi.fhir.cdshooks.api.ICdsConfigService;
|
||||||
|
import org.hl7.fhir.instance.model.api.IBaseParameters;
|
||||||
|
import org.hl7.fhir.instance.model.api.IPrimitiveType;
|
||||||
|
import org.opencds.cqf.fhir.api.Repository;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.CdsCrService;
|
||||||
|
import org.opencds.cqf.fhir.utility.adapter.IAdapterFactory;
|
||||||
|
|
||||||
|
import static org.opencds.cqf.fhir.utility.Constants.APPLY_PARAMETER_DATA;
|
||||||
|
|
||||||
|
public class UpdatedCdsCrService extends CdsCrService {
|
||||||
|
private final IAdapterFactory adapterFactory;
|
||||||
|
|
||||||
|
public UpdatedCdsCrService(
|
||||||
|
RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) {
|
||||||
|
super(theRequestDetails, theRepository, theCdsConfigService);
|
||||||
|
adapterFactory = IAdapterFactory.forFhirContext(theRepository.fhirContext());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IBaseParameters encodeParams(CdsServiceRequestJson theJson) {
|
||||||
|
var parameters = adapterFactory.createParameters(super.encodeParams(theJson));
|
||||||
|
if (parameters.hasParameter(APPLY_PARAMETER_DATA)) {
|
||||||
|
parameters.addParameter(
|
||||||
|
"useServerData",
|
||||||
|
booleanTypeForVersion(parameters.fhirContext().getVersion().getVersion(), false));
|
||||||
|
}
|
||||||
|
return (IBaseParameters) parameters.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
private IPrimitiveType<Boolean> booleanTypeForVersion(FhirVersionEnum fhirVersion, boolean value) {
|
||||||
|
return switch (fhirVersion) {
|
||||||
|
case DSTU2 -> new org.hl7.fhir.dstu2.model.BooleanType(value);
|
||||||
|
case DSTU3 -> new org.hl7.fhir.dstu3.model.BooleanType(value);
|
||||||
|
case R4 -> new org.hl7.fhir.r4.model.BooleanType(value);
|
||||||
|
case R5 -> new org.hl7.fhir.r5.model.BooleanType(value);
|
||||||
|
default -> throw new IllegalArgumentException("unknown or unsupported FHIR version");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package ca.uhn.fhir.jpa.starter.cdshooks;
|
|
||||||
|
|
||||||
import ca.uhn.fhir.rest.api.server.RequestDetails;
|
|
||||||
import ca.uhn.fhir.rest.api.server.cdshooks.CdsServiceRequestJson;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.api.ICdsConfigService;
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.CdsCrServiceR4;
|
|
||||||
import org.hl7.fhir.r4.model.BooleanType;
|
|
||||||
import org.hl7.fhir.r4.model.Parameters;
|
|
||||||
import org.opencds.cqf.fhir.api.Repository;
|
|
||||||
|
|
||||||
import static ca.uhn.hapi.fhir.cdshooks.svc.cr.CdsCrConstants.APPLY_PARAMETER_DATA;
|
|
||||||
import static org.opencds.cqf.fhir.utility.r4.Parameters.part;
|
|
||||||
|
|
||||||
public class UpdatedCdsCrServiceR4 extends CdsCrServiceR4 {
|
|
||||||
public UpdatedCdsCrServiceR4(
|
|
||||||
RequestDetails theRequestDetails, Repository theRepository, ICdsConfigService theCdsConfigService) {
|
|
||||||
super(theRequestDetails, theRepository, theCdsConfigService);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Parameters encodeParams(CdsServiceRequestJson theJson) {
|
|
||||||
Parameters parameters = super.encodeParams(theJson);
|
|
||||||
if (parameters.hasParameter(APPLY_PARAMETER_DATA)) {
|
|
||||||
parameters.addParameter(part("useServerData", new BooleanType(false)));
|
|
||||||
}
|
|
||||||
return parameters;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package ca.uhn.fhir.jpa.starter.cdshooks;
|
||||||
|
|
||||||
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
|
import org.opencds.cqf.fhir.api.Repository;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.cdshooks.discovery.CrDiscoveryService;
|
||||||
|
|
||||||
|
public class UpdatedCrDiscoveryService extends CrDiscoveryService {
|
||||||
|
public UpdatedCrDiscoveryService(IIdType thePlanDefinitionId, Repository theRepository) {
|
||||||
|
super(thePlanDefinitionId, theRepository);
|
||||||
|
maxUriLength = 6000;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package ca.uhn.fhir.jpa.starter.cdshooks;
|
|
||||||
|
|
||||||
import ca.uhn.hapi.fhir.cdshooks.svc.cr.discovery.CrDiscoveryServiceR4;
|
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
|
||||||
import org.opencds.cqf.fhir.api.Repository;
|
|
||||||
|
|
||||||
public class UpdatedCrDiscoveryServiceR4 extends CrDiscoveryServiceR4 {
|
|
||||||
public UpdatedCrDiscoveryServiceR4(IIdType thePlanDefinitionId, Repository theRepository) {
|
|
||||||
super(thePlanDefinitionId, theRepository);
|
|
||||||
myMaxUriLength = 6000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -156,8 +156,8 @@ public class FhirServerConfigCommon {
|
|||||||
|
|
||||||
jpaStorageSettings.setPreExpandValueSets(appProperties.getPre_expand_value_sets());
|
jpaStorageSettings.setPreExpandValueSets(appProperties.getPre_expand_value_sets());
|
||||||
jpaStorageSettings.setEnableTaskPreExpandValueSets(appProperties.getEnable_task_pre_expand_value_sets());
|
jpaStorageSettings.setEnableTaskPreExpandValueSets(appProperties.getEnable_task_pre_expand_value_sets());
|
||||||
jpaStorageSettings.setPreExpandValueSetsDefaultCount(appProperties.getPre_expand_value_sets_default_count());
|
|
||||||
jpaStorageSettings.setPreExpandValueSetsMaxCount(appProperties.getPre_expand_value_sets_max_count());
|
jpaStorageSettings.setPreExpandValueSetsMaxCount(appProperties.getPre_expand_value_sets_max_count());
|
||||||
|
jpaStorageSettings.setPreExpandValueSetsDefaultCount(appProperties.getPre_expand_value_sets_default_count());
|
||||||
jpaStorageSettings.setMaximumExpansionSize(appProperties.getMaximum_expansion_size());
|
jpaStorageSettings.setMaximumExpansionSize(appProperties.getMaximum_expansion_size());
|
||||||
|
|
||||||
jpaStorageSettings.setIndexMissingFields(
|
jpaStorageSettings.setIndexMissingFields(
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package ca.uhn.fhir.jpa.starter.cr;
|
package ca.uhn.fhir.jpa.starter.cr;
|
||||||
|
|
||||||
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.api.dao.DaoRegistry;
|
||||||
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
|
import ca.uhn.fhir.jpa.cache.IResourceChangeListenerRegistry;
|
||||||
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryInterceptor;
|
import ca.uhn.fhir.jpa.cache.ResourceChangeListenerRegistryInterceptor;
|
||||||
@@ -19,6 +16,9 @@ import org.opencds.cqf.cql.engine.runtime.Code;
|
|||||||
import org.opencds.cqf.fhir.cql.EvaluationSettings;
|
import org.opencds.cqf.fhir.cql.EvaluationSettings;
|
||||||
import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings;
|
import org.opencds.cqf.fhir.cql.engine.retrieve.RetrieveSettings;
|
||||||
import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings;
|
import org.opencds.cqf.fhir.cql.engine.terminology.TerminologySettings;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.common.CodeCacheResourceChangeListener;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.common.CqlThreadFactory;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.common.ElmCacheResourceChangeListener;
|
||||||
import org.opencds.cqf.fhir.cr.measure.CareGapsProperties;
|
import org.opencds.cqf.fhir.cr.measure.CareGapsProperties;
|
||||||
import org.opencds.cqf.fhir.cr.measure.MeasureEvaluationOptions;
|
import org.opencds.cqf.fhir.cr.measure.MeasureEvaluationOptions;
|
||||||
import org.opencds.cqf.fhir.utility.ValidationProfile;
|
import org.opencds.cqf.fhir.utility.ValidationProfile;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package ca.uhn.fhir.jpa.starter.cr;
|
package ca.uhn.fhir.jpa.starter.cr;
|
||||||
|
|
||||||
import ca.uhn.fhir.cr.config.dstu3.ApplyOperationConfig;
|
|
||||||
import ca.uhn.fhir.cr.config.dstu3.CrDstu3Config;
|
|
||||||
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.jpa.starter.annotations.OnDSTU3Condition;
|
import ca.uhn.fhir.jpa.starter.annotations.OnDSTU3Condition;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.dstu3.ApplyOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.dstu3.CrDstu3Config;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.dstu3.DataRequirementsOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.dstu3.EvaluateOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.dstu3.PackageOperationConfig;
|
||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.*;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package ca.uhn.fhir.jpa.starter.cr;
|
package ca.uhn.fhir.jpa.starter.cr;
|
||||||
|
|
||||||
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;
|
|
||||||
import ca.uhn.fhir.cr.config.r4.QuestionnaireOperationConfig;
|
|
||||||
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
import ca.uhn.fhir.jpa.starter.annotations.OnR4Condition;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.ApplyOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.CrR4Config;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.DataRequirementsOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.EvaluateOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.ExtractOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.PackageOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.PopulateOperationConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.r4.QuestionnaireOperationConfig;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ hapi:
|
|||||||
data:
|
data:
|
||||||
search_parameter_mode: USE_SEARCH_PARAMETERS # 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
|
terminology_parameter_mode: FILTER_IN_MEMORY # AUTO, USE_VALUE_SET_URL, USE_INLINE_CODES, FILTER_IN_MEMORY
|
||||||
profile_mode: OFF # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
profile_mode: DECLARED # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF
|
||||||
|
|
||||||
cdshooks:
|
cdshooks:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package ca.uhn.fhir.jpa.starter;
|
package ca.uhn.fhir.jpa.starter;
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.cr.config.RepositoryConfig;
|
|
||||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||||
import ca.uhn.fhir.jpa.searchparam.config.NicknameServiceConfig;
|
import ca.uhn.fhir.jpa.searchparam.config.NicknameServiceConfig;
|
||||||
import ca.uhn.fhir.jpa.starter.cdshooks.StarterCdsHooksConfig;
|
import ca.uhn.fhir.jpa.starter.cdshooks.StarterCdsHooksConfig;
|
||||||
@@ -9,7 +8,6 @@ import ca.uhn.fhir.parser.IParser;
|
|||||||
import ca.uhn.fhir.rest.client.api.IGenericClient;
|
import ca.uhn.fhir.rest.client.api.IGenericClient;
|
||||||
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
||||||
import ca.uhn.hapi.fhir.cdshooks.api.ICdsServiceRegistry;
|
import ca.uhn.hapi.fhir.cdshooks.api.ICdsServiceRegistry;
|
||||||
import ca.uhn.hapi.fhir.cdshooks.config.CdsHooksConfig;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
@@ -22,6 +20,9 @@ import org.apache.http.impl.client.HttpClients;
|
|||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.CrCdsHooksConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.RepositoryConfig;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.test.TestCdsHooksConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
@@ -39,7 +40,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||||||
Application.class,
|
Application.class,
|
||||||
NicknameServiceConfig.class,
|
NicknameServiceConfig.class,
|
||||||
RepositoryConfig.class,
|
RepositoryConfig.class,
|
||||||
CdsHooksConfig.class,
|
TestCdsHooksConfig.class,
|
||||||
|
CrCdsHooksConfig.class,
|
||||||
StarterCdsHooksConfig.class
|
StarterCdsHooksConfig.class
|
||||||
}, properties = {
|
}, properties = {
|
||||||
"spring.profiles.include=storageSettingsTest",
|
"spring.profiles.include=storageSettingsTest",
|
||||||
@@ -116,7 +118,7 @@ class CdsHooksServletIT implements IServerSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testCdsHooks() throws IOException, InterruptedException {
|
void testCdsHooks() throws IOException {
|
||||||
loadBundle("r4/HelloWorld-Bundle.json", ourCtx, ourClient);
|
loadBundle("r4/HelloWorld-Bundle.json", ourCtx, ourClient);
|
||||||
await().atMost(10000, TimeUnit.MILLISECONDS).until(() -> hasCdsServices());
|
await().atMost(10000, TimeUnit.MILLISECONDS).until(() -> hasCdsServices());
|
||||||
var cdsRequest = "{\n" +
|
var cdsRequest = "{\n" +
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package ca.uhn.fhir.jpa.starter;
|
package ca.uhn.fhir.jpa.starter;
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.cr.config.RepositoryConfig;
|
|
||||||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
||||||
@@ -19,6 +18,7 @@ import org.hl7.fhir.instance.model.api.IIdType;
|
|||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.RepositoryConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package ca.uhn.fhir.jpa.starter;
|
package ca.uhn.fhir.jpa.starter;
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.cr.config.RepositoryConfig;
|
|
||||||
import ca.uhn.fhir.jpa.searchparam.config.NicknameServiceConfig;
|
import ca.uhn.fhir.jpa.searchparam.config.NicknameServiceConfig;
|
||||||
import ca.uhn.fhir.jpa.starter.cr.CrProperties;
|
import ca.uhn.fhir.jpa.starter.cr.CrProperties;
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
@@ -25,6 +24,7 @@ import org.junit.jupiter.api.Order;
|
|||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.ValueSource;
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
|
import org.opencds.cqf.fhir.cr.hapi.config.RepositoryConfig;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
|
|||||||
Reference in New Issue
Block a user