diff --git a/.github/workflows/spotless-check.yml b/.github/workflows/spotless-check.yml index 3980a7b..f4e616f 100644 --- a/.github/workflows/spotless-check.yml +++ b/.github/workflows/spotless-check.yml @@ -22,6 +22,7 @@ jobs: - uses: mshick/add-pr-comment@v2 if: always() with: + proxy-url: https://slack-bots.azure.smilecdr.com/robogary/github message-success: | Formatting check succeeded! message-failure: | diff --git a/charts/hapi-fhir-jpaserver/Chart.lock b/charts/hapi-fhir-jpaserver/Chart.lock index d92caa6..5f47846 100644 --- a/charts/hapi-fhir-jpaserver/Chart.lock +++ b/charts/hapi-fhir-jpaserver/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 16.3.2 + version: 16.5.5 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.28.0 -digest: sha256:99587bb3481cd94c1679d9dd23cb8c816701a1c6f0d458c77c71e7e541dd2f55 -generated: "2024-12-17T12:51:15.601470579+01:00" + version: 2.30.0 +digest: sha256:c114b296b53007a7973260de8bad61917fe741c0ad9de15fdbeea5743c8f4910 +generated: "2025-03-21T21:44:22.334197366+01:00" diff --git a/charts/hapi-fhir-jpaserver/Chart.yaml b/charts/hapi-fhir-jpaserver/Chart.yaml index 57d9637..e1193c0 100644 --- a/charts/hapi-fhir-jpaserver/Chart.yaml +++ b/charts/hapi-fhir-jpaserver/Chart.yaml @@ -7,14 +7,14 @@ sources: - https://github.com/hapifhir/hapi-fhir-jpaserver-starter dependencies: - name: postgresql - version: 16.3.2 + version: 16.5.5 repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.28.0 -appVersion: 7.6.0 -version: 0.18.0 + version: 2.30.0 +appVersion: 8.0.0 +version: 0.19.0 annotations: artifacthub.io/license: Apache-2.0 artifacthub.io/containsSecurityUpdates: "false" @@ -27,14 +27,8 @@ annotations: # When using the list of objects option the valid supported kinds are # added, changed, deprecated, removed, fixed, and security. - kind: changed - description: "updated postgresql sub-chart to 16.3.2" + description: "updated postgresql sub-chart to 16.5.5" - kind: changed - description: "updated curlimages/curl to 8.11.1" + description: "updated curlimages/curl to 8.12.1" - kind: changed - description: "updated hapiproject/hapi to 7.6.0" - - kind: added - description: "support for setting resource limits and requests from presets. With a default set for all containers" - - kind: added - description: "support for setting extra volumes and volume mounts" - - kind: changed - description: "set default pod security context for main and test pods" + description: "updated hapiproject/hapi to v8.0.0-1" diff --git a/charts/hapi-fhir-jpaserver/README.md b/charts/hapi-fhir-jpaserver/README.md index 62fd0a2..c896d05 100644 --- a/charts/hapi-fhir-jpaserver/README.md +++ b/charts/hapi-fhir-jpaserver/README.md @@ -1,6 +1,6 @@ # HAPI FHIR JPA Server Starter Helm Chart -![Version: 0.18.0](https://img.shields.io/badge/Version-0.18.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 7.6.0](https://img.shields.io/badge/AppVersion-7.6.0-informational?style=flat-square) +![Version: 0.19.0](https://img.shields.io/badge/Version-0.19.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.0.0](https://img.shields.io/badge/AppVersion-8.0.0-informational?style=flat-square) This helm chart will help you install the HAPI FHIR JPA Server in a Kubernetes environment. @@ -15,8 +15,8 @@ helm install hapi-fhir-jpaserver hapifhir/hapi-fhir-jpaserver | Repository | Name | Version | |------------|------|---------| -| oci://registry-1.docker.io/bitnamicharts | common | 2.28.0 | -| oci://registry-1.docker.io/bitnamicharts | postgresql | 16.3.2 | +| oci://registry-1.docker.io/bitnamicharts | common | 2.30.0 | +| oci://registry-1.docker.io/bitnamicharts | postgresql | 16.5.5 | ## Values @@ -39,7 +39,7 @@ helm install hapi-fhir-jpaserver hapifhir/hapi-fhir-jpaserver | image.pullPolicy | string | `"IfNotPresent"` | image pullPolicy to use | | image.registry | string | `"docker.io"` | registry where the HAPI FHIR server image is hosted | | image.repository | string | `"hapiproject/hapi"` | the path inside the repository | -| image.tag | string | `"v7.6.0@sha256:4771a178e764896c83881c1b3a52bd487e53d06e1acc3653ea0db0c6f6b2b8a1"` | the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image. | +| image.tag | string | `"v8.0.0-1@sha256:9fbac7b012b4be91ba481e7008f1353ede4598bc99a36f3902b8abf873e70ed8"` | the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image. | | imagePullSecrets | list | `[]` | image pull secrets to use when pulling the image | | ingress.annotations | object | `{}` | provide any additional annotations which may be required. Evaluated as a template. | | ingress.enabled | bool | `false` | whether to create an Ingress to expose the FHIR server HTTP endpoint | diff --git a/charts/hapi-fhir-jpaserver/templates/deployment.yaml b/charts/hapi-fhir-jpaserver/templates/deployment.yaml index a402f6b..f079c85 100644 --- a/charts/hapi-fhir-jpaserver/templates/deployment.yaml +++ b/charts/hapi-fhir-jpaserver/templates/deployment.yaml @@ -31,7 +31,7 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: wait-for-db-to-be-ready - image: docker.io/bitnami/postgresql:17.2.0-debian-12-r3@sha256:4de5c47eb98dd8fe09abdcbc2264984486ee8196e90902fb354f5d2ab97e8921 + image: docker.io/bitnami/postgresql:17.4.0-debian-12-r10@sha256:7b9af9dd759055265998bbf12368e6d7d6326e6fd23f8157be841fad0915c1a1 imagePullPolicy: IfNotPresent {{- with .Values.restrictedContainerSecurityContext }} securityContext: diff --git a/charts/hapi-fhir-jpaserver/values.yaml b/charts/hapi-fhir-jpaserver/values.yaml index dff8624..422b693 100644 --- a/charts/hapi-fhir-jpaserver/values.yaml +++ b/charts/hapi-fhir-jpaserver/values.yaml @@ -7,7 +7,7 @@ image: # -- the path inside the repository repository: hapiproject/hapi # -- the image tag. As of v5.7.0, this is the `distroless` flavor by default, add `-tomcat` to use the Tomcat-based image. - tag: "v7.6.0@sha256:4771a178e764896c83881c1b3a52bd487e53d06e1acc3653ea0db0c6f6b2b8a1" + tag: "v8.0.0-1@sha256:9fbac7b012b4be91ba481e7008f1353ede4598bc99a36f3902b8abf873e70ed8" # -- image pullPolicy to use pullPolicy: IfNotPresent @@ -241,7 +241,7 @@ curl: image: registry: docker.io repository: curlimages/curl - tag: 8.11.1@sha256:c1fe1679c34d9784c1b0d1e5f62ac0a79fca01fb6377cdd33e90473c6f9f9a69 + tag: 8.12.1@sha256:94e9e444bcba979c2ea12e27ae39bee4cd10bc7041a472c4727a558e213744e6 tests: # -- whether the service account token should be auto-mounted for the test pods diff --git a/pom.xml b/pom.xml index 31b184b..b68bc22 100644 --- a/pom.xml +++ b/pom.xml @@ -6,6 +6,7 @@ 17 1 + 3.19.0 @@ -113,9 +114,9 @@ - ca.uhn.hapi.fhir - hapi-fhir-storage-cr - ${project.parent.version} + org.opencds.cqf.fhir + cqf-fhir-cr-hapi + ${clinical-reasoning.version} diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index cfbf8b6..25ad070 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -695,7 +695,7 @@ public class AppProperties { return this.enable_task_pre_expand_value_sets; } - public void setEnable_task_pre_expand_value_setss(Boolean enable_task_pre_expand_value_sets) { + public void setEnable_task_pre_expand_value_sets(Boolean enable_task_pre_expand_value_sets) { this.enable_task_pre_expand_value_sets = enable_task_pre_expand_value_sets; } diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/CdsHooksServlet.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/CdsHooksServlet.java index 62a6b65..034d5cf 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/CdsHooksServlet.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/CdsHooksServlet.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Qualifier; import java.io.IOException; 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 public class CdsHooksServlet extends HttpServlet { diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/StarterCdsHooksConfig.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/StarterCdsHooksConfig.java index a27d4b8..5da4dae 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/StarterCdsHooksConfig.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/StarterCdsHooksConfig.java @@ -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.CrProperties; 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.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.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.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -22,27 +24,14 @@ import org.springframework.context.annotation.Import; @Configuration @Conditional({CdsHooksConfigCondition.class, CrConfigCondition.class}) -@Import({CdsHooksConfig.class, CrCommonConfig.class}) +@Import({RepositoryConfig.class, TestCdsHooksConfig.class, CrCdsHooksConfig.class, CrCommonConfig.class}) public class StarterCdsHooksConfig { - // @Bean - // CdsPrefetchSvc cdsPrefetchSvc( - // CdsResolutionStrategySvc theCdsResolutionStrategySvc, - // CdsPrefetchDaoSvc theResourcePrefetchDao, - // CdsPrefetchFhirClientSvc theResourcePrefetchFhirClient, - // ICdsHooksDaoAuthorizationSvc theCdsHooksDaoAuthorizationSvc) { - // return new ModuleConfigurationPrefetchSvc( - // theCdsResolutionStrategySvc, - // theResourcePrefetchDao, - // theResourcePrefetchFhirClient, - // theCdsHooksDaoAuthorizationSvc); - // } - @Bean public ICdsCrDiscoveryServiceRegistry cdsCrDiscoveryServiceRegistry() { CdsCrDiscoveryServiceRegistry registry = new CdsCrDiscoveryServiceRegistry(); registry.unregister(FhirVersionEnum.R4); - registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryServiceR4.class); + registry.register(FhirVersionEnum.R4, UpdatedCrDiscoveryService.class); return registry; } @@ -50,7 +39,7 @@ public class StarterCdsHooksConfig { public ICdsCrServiceRegistry cdsCrServiceRegistry() { CdsCrServiceRegistry registry = new CdsCrServiceRegistry(); registry.unregister(FhirVersionEnum.R4); - registry.register(FhirVersionEnum.R4, UpdatedCdsCrServiceR4.class); + registry.register(FhirVersionEnum.R4, UpdatedCdsCrService.class); return registry; } diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrService.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrService.java new file mode 100644 index 0000000..414993c --- /dev/null +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrService.java @@ -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 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"); + }; + } +} diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrServiceR4.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrServiceR4.java deleted file mode 100644 index 249d477..0000000 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCdsCrServiceR4.java +++ /dev/null @@ -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; - } -} diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryService.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryService.java new file mode 100644 index 0000000..f01873e --- /dev/null +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryService.java @@ -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; + } +} diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryServiceR4.java b/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryServiceR4.java deleted file mode 100644 index ba194eb..0000000 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cdshooks/UpdatedCrDiscoveryServiceR4.java +++ /dev/null @@ -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; - } -} diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index 3abbed5..53bb3a0 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -97,9 +97,9 @@ public class FhirServerConfigCommon { ourLog.info("Server configured for pre-expand value set default count of " + (appProperties.getPre_expand_value_sets_default_count().toString())); ourLog.info("Server configured for pre-expand value set max count of " - + (appProperties.getPre_expand_value_sets_default_count().toString())); + + (appProperties.getPre_expand_value_sets_max_count().toString())); ourLog.info("Server configured for maximum expansion size of " - + (appProperties.getPre_expand_value_sets_default_count().toString())); + + (appProperties.getMaximum_expansion_size().toString())); } @Bean diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cr/CrCommonConfig.java b/src/main/java/ca/uhn/fhir/jpa/starter/cr/CrCommonConfig.java index 26d7f5f..1822340 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cr/CrCommonConfig.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cr/CrCommonConfig.java @@ -1,8 +1,5 @@ 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.cache.IResourceChangeListenerRegistry; 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.engine.retrieve.RetrieveSettings; 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.MeasureEvaluationOptions; import org.opencds.cqf.fhir.utility.ValidationProfile; diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java index 44f7d42..b418077 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrDstu3Config.java @@ -1,11 +1,11 @@ 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 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.*; @Configuration diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java index 28c10cf..69c0a36 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/cr/StarterCrR4Config.java @@ -1,14 +1,14 @@ 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 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.Configuration; import org.springframework.context.annotation.Import; diff --git a/src/main/resources/cds.application.yaml b/src/main/resources/cds.application.yaml index 90d4da7..8a734ae 100644 --- a/src/main/resources/cds.application.yaml +++ b/src/main/resources/cds.application.yaml @@ -124,7 +124,7 @@ hapi: data: 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: OFF # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF + profile_mode: DECLARED # ENFORCED, DECLARED, OPTIONAL, TRUST, OFF cdshooks: enabled: true @@ -217,7 +217,7 @@ hapi: # - https://hapi.fhir.org/baseR4 # pre_expand_value_sets: true - # enable_task_pre_expand_value_sets: true + # enable_task_pre_expand_value_sets: true # pre_expand_value_sets_default_count: 1000 # pre_expand_value_sets_max_count: 1000 # maximum_expansion_size: 1000 diff --git a/src/test/java/ca/uhn/fhir/jpa/starter/CdsHooksServletIT.java b/src/test/java/ca/uhn/fhir/jpa/starter/CdsHooksServletIT.java index 6571487..2745ce0 100644 --- a/src/test/java/ca/uhn/fhir/jpa/starter/CdsHooksServletIT.java +++ b/src/test/java/ca/uhn/fhir/jpa/starter/CdsHooksServletIT.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.starter; 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.searchparam.config.NicknameServiceConfig; 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.ServerValidationModeEnum; 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.JsonArray; import com.google.gson.JsonObject; @@ -22,6 +20,9 @@ import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; import org.junit.jupiter.api.BeforeEach; 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.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort; @@ -39,7 +40,8 @@ import static org.junit.jupiter.api.Assertions.fail; Application.class, NicknameServiceConfig.class, RepositoryConfig.class, - CdsHooksConfig.class, + TestCdsHooksConfig.class, + CrCdsHooksConfig.class, StarterCdsHooksConfig.class }, properties = { "spring.profiles.include=storageSettingsTest", @@ -116,7 +118,7 @@ class CdsHooksServletIT implements IServerSupport { } @Test - void testCdsHooks() throws IOException, InterruptedException { + void testCdsHooks() throws IOException { loadBundle("r4/HelloWorld-Bundle.json", ourCtx, ourClient); await().atMost(10000, TimeUnit.MILLISECONDS).until(() -> hasCdsServices()); var cdsRequest = "{\n" + diff --git a/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java b/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java index 32fabbc..7dfb1ed 100644 --- a/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java +++ b/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.starter; 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.model.primitive.IdDt; 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.Test; 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.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort; diff --git a/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java b/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java index d8044d8..3a15b96 100644 --- a/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java +++ b/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java @@ -1,7 +1,6 @@ package ca.uhn.fhir.jpa.starter; 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.starter.cr.CrProperties; import ca.uhn.fhir.model.primitive.IdDt; @@ -35,6 +34,7 @@ import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; 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.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort;