Skip to content

Commit

Permalink
Merge branch 'master' into cr-6.9.6-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Capt-Mac authored Nov 22, 2023
2 parents c0b8980 + b0ae4f2 commit 23ef1d3
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.web.server.LocalServerPort;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -39,8 +40,14 @@
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.profiles.include=storageSettingsTest",
"spring.datasource.url=jdbc:h2:mem:dbr3",
"hapi.fhir.fhir_version=dstu3",
"hapi.fhir.cr_enabled=true",
Expand Down
10 changes: 9 additions & 1 deletion src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.primitive.IdDt;
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.rest.api.CacheControlDirective;
Expand Down Expand Up @@ -37,7 +38,14 @@
import static org.opencds.cqf.fhir.utility.r4.Parameters.parameters;
import static org.opencds.cqf.fhir.utility.r4.Parameters.stringPart;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = {Application.class, JpaStarterWebsocketDispatcherConfig.class, NicknameServiceConfig.class}, properties = {
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = {
Application.class,
JpaStarterWebsocketDispatcherConfig.class,
NicknameServiceConfig.class,
RepositoryConfig.class
}, properties = {
"spring.profiles.include=storageSettingsTest",
"spring.datasource.url=jdbc:h2:mem:dbr4",
"hapi.fhir.enable_repository_validating_interceptor=true",
"hapi.fhir.fhir_version=r4",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ca.uhn.fhir.jpa.starter;

import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import org.hl7.fhir.dstu2.model.Subscription;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;

@Profile("storageSettingsTest")
@Configuration
public class JpaStorageSettingsConfig {
@Primary
@Bean
public JpaStorageSettings storageSettings() {
JpaStorageSettings retVal = new JpaStorageSettings();

retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.MESSAGE);
return retVal;
}
}
18 changes: 18 additions & 0 deletions src/test/java/ca/uhn/fhir/jpa/starter/MeasureEvaluationConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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();
}
}

0 comments on commit 23ef1d3

Please sign in to comment.