From 4f6f3162f18c2fb37ff8b9cff435482e77665895 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 12 Oct 2023 10:03:16 -0400 Subject: [PATCH] Fix ExampleServerDstu3IT --- .../jpa/starter/ExampleServerDstu3IT.java | 10 ++++++++-- .../jpa/starter/MeasureEvaluationConfig.java | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java 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 0d20bab..b5a69fc 100644 --- a/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java +++ b/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java @@ -1,6 +1,7 @@ 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; @@ -38,7 +39,12 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @ExtendWith(SpringExtension.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {Application.class, JpaStarterWebsocketDispatcherConfig.class}, properties = +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, + classes = { + Application.class, + JpaStarterWebsocketDispatcherConfig.class, + RepositoryConfig.class + }, properties = { "spring.datasource.url=jdbc:h2:mem:dbr3", "hapi.fhir.cr_enabled=true", @@ -61,7 +67,7 @@ class ExampleServerDstu3IT implements IServerSupport { @LocalServerPort private int port; - @BeforeEach + @BeforeEach void beforeEach() { ourCtx = FhirContext.forDstu3(); ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); diff --git a/src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java b/src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java new file mode 100644 index 0000000..fc98e1b --- /dev/null +++ b/src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java @@ -0,0 +1,19 @@ +package ca.uhn.fhir.jpa.starter; + +import org.opencds.cqf.fhir.cql.EvaluationSettings; +import org.opencds.cqf.fhir.cr.measure.MeasureEvaluationOptions; +import org.opencds.cqf.fhir.utility.ValidationProfile; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Map; + +@Configuration + +public class MeasureEvaluationConfig { + + @Bean + public MeasureEvaluationOptions measureEvaluationOptions(){ + return new MeasureEvaluationOptions(); + } +}