Added Normalized Quantity Search Support
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig.ClientIdStrategyEnum;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
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 com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import ca.uhn.fhir.context.FhirVersionEnum;
|
||||
import ca.uhn.fhir.jpa.api.config.DaoConfig.ClientIdStrategyEnum;
|
||||
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
|
||||
|
||||
@ConfigurationProperties(prefix = "hapi.fhir")
|
||||
@Configuration
|
||||
@@ -66,6 +67,7 @@ public class AppProperties {
|
||||
private Map<String, ImplementationGuide> implementationGuides = null;
|
||||
|
||||
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() {
|
||||
return defer_indexing_for_codesystems_of_size;
|
||||
@@ -403,7 +405,16 @@ public class AppProperties {
|
||||
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 List<String> allowed_origin = ImmutableList.of("*");
|
||||
|
||||
|
||||
@@ -363,6 +363,8 @@ public class BaseJpaRestfulServer extends RestfulServer {
|
||||
daoConfig.setLastNEnabled(true);
|
||||
}
|
||||
|
||||
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||
|
||||
// Repository Validating Interceptor
|
||||
if (Boolean.TRUE.equals(appProperties.getEnable_repository_validating_interceptor())) {
|
||||
RepositoryValidationInterceptorFactory repositoryValidationInterceptorFactory = myApplicationContext.getBean(RepositoryValidationInterceptorFactory.class);
|
||||
|
||||
@@ -163,6 +163,7 @@ public class FhirServerConfigCommon {
|
||||
modelConfig.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
|
||||
}
|
||||
|
||||
modelConfig.setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
|
||||
return modelConfig;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user