Merged Branch rel_5_3_0 into this Branch.
This commit is contained in:
@@ -3,20 +3,19 @@ package ca.uhn.fhir.jpa.starter;
|
|||||||
|
|
||||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig.ClientIdStrategyEnum;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig.ClientIdStrategyEnum;
|
||||||
|
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
|
||||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import org.hl7.fhir.r4.model.Bundle;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import org.hl7.fhir.r4.model.Bundle;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@ConfigurationProperties(prefix = "hapi.fhir")
|
@ConfigurationProperties(prefix = "hapi.fhir")
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
@@ -66,6 +65,7 @@ public class AppProperties {
|
|||||||
private Map<String, ImplementationGuide> implementationGuides = null;
|
private Map<String, ImplementationGuide> implementationGuides = null;
|
||||||
|
|
||||||
private Boolean lastn_enabled = false;
|
private Boolean lastn_enabled = false;
|
||||||
|
private NormalizedQuantitySearchLevel normalized_quantity_search_level = NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED;
|
||||||
|
|
||||||
public Integer getDefer_indexing_for_codesystems_of_size() {
|
public Integer getDefer_indexing_for_codesystems_of_size() {
|
||||||
return defer_indexing_for_codesystems_of_size;
|
return defer_indexing_for_codesystems_of_size;
|
||||||
@@ -414,7 +414,16 @@ public class AppProperties {
|
|||||||
this.lastn_enabled = lastn_enabled;
|
this.lastn_enabled = lastn_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Cors {
|
public NormalizedQuantitySearchLevel getNormalized_quantity_search_level() {
|
||||||
|
return this.normalized_quantity_search_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNormalized_quantity_search_level(NormalizedQuantitySearchLevel normalized_quantity_search_level) {
|
||||||
|
this.normalized_quantity_search_level = normalized_quantity_search_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class Cors {
|
||||||
private Boolean allow_Credentials = true;
|
private Boolean allow_Credentials = true;
|
||||||
private List<String> allowed_origin = ImmutableList.of("*");
|
private List<String> allowed_origin = ImmutableList.of("*");
|
||||||
|
|
||||||
|
|||||||
@@ -366,6 +366,8 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
|||||||
daoConfig.setLastNEnabled(true);
|
daoConfig.setLastNEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||||
|
|
||||||
// Repository Validating Interceptor
|
// Repository Validating Interceptor
|
||||||
if (Boolean.TRUE.equals(appProperties.getEnable_repository_validating_interceptor())) {
|
if (Boolean.TRUE.equals(appProperties.getEnable_repository_validating_interceptor())) {
|
||||||
RepositoryValidationInterceptorFactory repositoryValidationInterceptorFactory = myApplicationContext.getBean(RepositoryValidationInterceptorFactory.class);
|
RepositoryValidationInterceptorFactory repositoryValidationInterceptorFactory = myApplicationContext.getBean(RepositoryValidationInterceptorFactory.class);
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ public class FhirServerConfigCommon {
|
|||||||
modelConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
|
modelConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modelConfig.setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||||
return modelConfig;
|
return modelConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ hapi:
|
|||||||
# startTlsRequired:
|
# startTlsRequired:
|
||||||
# quitWait:
|
# quitWait:
|
||||||
# lastn_enabled: true
|
# lastn_enabled: true
|
||||||
|
### This is configuration for normalized quantity serach level default is 0
|
||||||
|
### 0: NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED - default
|
||||||
|
### 1: NORMALIZED_QUANTITY_STORAGE_SUPPORTED
|
||||||
|
### 2: NORMALIZED_QUANTITY_SEARCH_SUPPORTED
|
||||||
|
# normalized_quantity_search_level: 2
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,8 +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.jpa.api.dao.DaoRegistry;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
|
||||||
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
||||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||||
@@ -22,12 +20,10 @@ import org.junit.jupiter.api.BeforeEach;
|
|||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
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.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.web.server.LocalServerPort;
|
import org.springframework.boot.web.server.LocalServerPort;
|
||||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
@@ -78,6 +74,7 @@ public class ExampleServerR4IT {
|
|||||||
Patient pt2 = ourClient.read().resource(Patient.class).withId(id).execute();
|
Patient pt2 = ourClient.read().resource(Patient.class).withId(id).execute();
|
||||||
assertEquals(methodName, pt2.getName().get(0).getFamily());
|
assertEquals(methodName, pt2.getName().get(0).getFamily());
|
||||||
|
|
||||||
|
|
||||||
// Test MDM
|
// Test MDM
|
||||||
|
|
||||||
// Wait until the MDM message has been processed
|
// Wait until the MDM message has been processed
|
||||||
|
|||||||
Reference in New Issue
Block a user