This commit is contained in:
James Agnew
2025-02-12 13:58:42 -05:00
parent ac5dbb975e
commit 3cdd23368a
2 changed files with 702 additions and 705 deletions

View File

@@ -24,6 +24,11 @@ import java.util.Set;
@EnableConfigurationProperties
public class AppProperties {
private final Set<String> auto_version_reference_at_paths = new HashSet<>();
private final Set<String> local_base_urls = new HashSet<>();
private final Set<String> logical_urls = new HashSet<>();
private final List<String> custom_interceptor_classes = new ArrayList<>();
private final List<String> custom_provider_classes = new ArrayList<>();
private Boolean cr_enabled = false;
private Boolean ips_enabled = false;
private Boolean openapi_enabled = false;
@@ -38,7 +43,6 @@ public class AppProperties {
private Boolean allow_override_default_search_params = true;
private Boolean auto_create_placeholder_reference_targets = false;
private Boolean mass_ingestion_mode_enabled = false;
private final Set<String> auto_version_reference_at_paths = new HashSet<>();
private Boolean language_search_parameter_enabled = false;
private Boolean dao_scheduling_enabled = true;
private Boolean delete_expunge_enabled = false;
@@ -71,9 +75,7 @@ public class AppProperties {
private List<String> supported_resource_types = new ArrayList<>();
private List<Bundle.BundleType> allowed_bundle_types = null;
private Boolean narrative_enabled = true;
private Boolean ig_runtime_upload_enabled = false;
private Validation validation = new Validation();
private Map<String, Tester> tester = null;
private Logger logger = new Logger();
@@ -83,27 +85,16 @@ public class AppProperties {
private Boolean validate_resource_status_for_package_upload = true;
private Boolean install_transitive_ig_dependencies = true;
private Map<String, PackageInstallationSpec> implementationGuides = null;
private String custom_content_path = null;
private String app_content_path = null;
private Boolean lastn_enabled = false;
private boolean store_resource_in_lucene_index_enabled = false;
private NormalizedQuantitySearchLevel normalized_quantity_search_level = NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED;
private Boolean use_apache_address_strategy = false;
private Boolean use_apache_address_strategy_https = false;
private Integer bundle_batch_pool_size = 20;
private Integer bundle_batch_pool_max_size = 100;
private final Set<String> local_base_urls = new HashSet<>();
private final Set<String> logical_urls = new HashSet<>();
private Boolean resource_dbhistory_enabled = true;
private final List<String> custom_interceptor_classes = new ArrayList<>();
private final List<String> custom_provider_classes = new ArrayList<>();
private Boolean upliftedRefchains_enabled = false;
private boolean userRequestRetryVersionConflictsInterceptorEnabled = false;
@@ -194,13 +185,13 @@ public class AppProperties {
public String getMdm_rules_json_location() {
return mdm_rules_json_location;
}
}
public void setMdm_rules_json_location(String mdm_rules_json_location) {
public void setMdm_rules_json_location(String mdm_rules_json_location) {
this.mdm_rules_json_location = mdm_rules_json_location;
}
}
public Cors getCors() {
public Cors getCors() {
return cors;
}
@@ -228,6 +219,10 @@ public Cors getCors() {
return subscription;
}
public void setSubscription(Subscription subscription) {
this.subscription = subscription;
}
public Boolean getDefault_pretty_print() {
return default_pretty_print;
}
@@ -236,10 +231,6 @@ public Cors getCors() {
this.default_pretty_print = default_pretty_print;
}
public void setSubscription(Subscription subscription) {
this.subscription = subscription;
}
public Validation getValidation() {
return validation;
}
@@ -549,13 +540,11 @@ public Cors getCors() {
this.tester = tester;
}
public Boolean getNarrative_enabled()
{
public Boolean getNarrative_enabled() {
return narrative_enabled;
}
public void setNarrative_enabled(Boolean narrative_enabled)
{
public void setNarrative_enabled(Boolean narrative_enabled) {
this.narrative_enabled = narrative_enabled;
}
@@ -680,6 +669,22 @@ public Cors getCors() {
this.userRequestRetryVersionConflictsInterceptorEnabled = userRequestRetryVersionConflictsInterceptorEnabled;
}
public boolean getEnable_index_of_type() {
return enable_index_of_type;
}
public void setEnable_index_of_type(boolean enable_index_of_type) {
this.enable_index_of_type = enable_index_of_type;
}
public Boolean getResource_dbhistory_enabled() {
return resource_dbhistory_enabled;
}
public void setResource_dbhistory_enabled(Boolean resource_dbhistory_enabled) {
this.resource_dbhistory_enabled = resource_dbhistory_enabled;
}
public static class Cors {
private Boolean allow_Credentials = true;
private List<String> allowed_origin = List.of("*");
@@ -741,7 +746,6 @@ public Cors getCors() {
}
}
public static class Tester {
private String name;
@@ -782,7 +786,6 @@ public Cors getCors() {
}
}
public static class Validation {
private Boolean requests_enabled = false;
@@ -815,6 +818,10 @@ public Cors getCors() {
private Integer default_partition_id = 0;
private boolean request_tenant_partitioning_mode;
public boolean isRequest_tenant_partitioning_mode() {
return request_tenant_partitioning_mode;
}
public Integer getDefault_partition_id() {
return default_partition_id;
}
@@ -846,6 +853,7 @@ public Cors getCors() {
public void setPartitioning_include_in_search_hashes(Boolean partitioning_include_in_search_hashes) {
this.partitioning_include_in_search_hashes = partitioning_include_in_search_hashes;
}
public Boolean getAllow_references_across_partitions() {
return allow_references_across_partitions;
}
@@ -865,10 +873,18 @@ public Cors getCors() {
public boolean getRequest_tenant_partitioning_mode() {
return request_tenant_partitioning_mode;
}
public void setRequest_tenant_partitioning_mode(boolean theRequest_tenant_partitioning_mode) {
request_tenant_partitioning_mode = theRequest_tenant_partitioning_mode;
}
}
public static class Subscription {
private Boolean resthook_enabled = false;
private Boolean websocket_enabled = false;
private Email email = null;
public Boolean getResthook_enabled() {
return resthook_enabled;
}
@@ -885,10 +901,6 @@ public Cors getCors() {
this.websocket_enabled = websocket_enabled;
}
private Boolean resthook_enabled = false;
private Boolean websocket_enabled = false;
private Email email = null;
public Email getEmail() {
return email;
}
@@ -899,6 +911,16 @@ public Cors getCors() {
public static class Email {
private String from;
private String host;
private Integer port = 25;
private String username;
private String password;
private Boolean auth = false;
private Boolean startTlsEnable = false;
private Boolean startTlsRequired = false;
private Boolean quitWait = false;
public String getFrom() {
return from;
}
@@ -970,32 +992,6 @@ public Cors getCors() {
public void setQuitWait(Boolean quitWait) {
this.quitWait = quitWait;
}
private String from;
private String host;
private Integer port = 25;
private String username;
private String password;
private Boolean auth = false;
private Boolean startTlsEnable = false;
private Boolean startTlsRequired = false;
private Boolean quitWait = false;
}
}
public boolean getEnable_index_of_type() {
return enable_index_of_type;
}
public void setEnable_index_of_type(boolean enable_index_of_type) {
this.enable_index_of_type = enable_index_of_type;
}
public Boolean getResource_dbhistory_enabled() {
return resource_dbhistory_enabled;
}
public void setResource_dbhistory_enabled(Boolean resource_dbhistory_enabled) {
this.resource_dbhistory_enabled = resource_dbhistory_enabled;
}
}

View File

@@ -7,7 +7,11 @@ import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
import ca.uhn.fhir.rest.client.interceptor.UrlTenantSelectionInterceptor;
import ca.uhn.fhir.rest.server.provider.ProviderConstants;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.CodeType;
import org.hl7.fhir.r4.model.IntegerType;
import org.hl7.fhir.r4.model.Parameters;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -25,21 +29,18 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
"hapi.fhir.subscription.websocket_enabled=true",
"hapi.fhir.cr_enabled=false",
"hapi.fhir.partitioning.partitioning_include_in_search_hashes=false",
"hapi.fhir.partitioning.request_tenant_partitioning_mode=true",
})
class MultitenantServerR4IT {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerDstu2IT.class);
private static UrlTenantSelectionInterceptor ourClientTenantInterceptor;
private IGenericClient ourClient;
private FhirContext ourCtx;
@LocalServerPort
private int port;
private static UrlTenantSelectionInterceptor ourClientTenantInterceptor;
@Test
void testCreateAndReadInTenantA() {