Skip to content

Configuration

Sean McIlvenna edited this page Apr 22, 2021 · 14 revisions

Custom configurations during deployment can be setup by specifying environment variables, such as:

hapi.fhir.fhir_version=DSTU3

[email protected]

hapi.fhir.allowed_bundle_types=searchset,collection,message

Alternatively, customizations can be put in their own application.yml file, and you can tell HAPI (Spring Boot) to look for the customizations by specifying an environment variable:

SPRING_CONFIG_LOCATION=file:/some/directory/for/the/application.yml

Property Default Description
spring
  datasource
   url ex: jdbc:h2:file:./target/database/h2
   username sa
   password null
   driverClassName ex: org.h2.Driver
   max-active 15
  jpa
   properties
     hibernate.format_sql false
     hibernate.show_sql false
     hibernate.dialect ex: org.hibernate.dialect.h2dialect
     hibernate.hbm2ddl.auto update
     hibernate.jdbc.batch_size 20
     hibernate.cache.use_query_cache false
     hibernate.cache.use_second_level_cache false
     hibernate.cache.use_structured_entries false
     hibernate.cache.use_minimal_puts false
     hibernate.search.enabled true
     hibernate.search.backend.type lucene
     hibernate.search.backend.analysis.configurer ex: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer
     hibernate.search.backend.directory.type ex: local-filesystem
     hibernate.search.backend.directory.root ex: target/lucenefiles
     hibernate.search.backend.lucene_version ex: lucene_current
  batch
   job
    enabled false
hapi
  fhir
   fhir_version R4
   use_apache_address_strategy false
   use_apache_address_strategy_https false
   server_address This is the address of the REST FHIR API hosted by the server (typically at /fhir). When you make a request to /fhir/Patient (for example) HAPI will respond with urls that are based on this configuration property, i.e. <hapi.fhir.server_address>/Patient/Patient1.
   defer_indexing_for_codesystems_of_size 101
   implementationguides One or more implementation guides that should be loaded onto the FHIR server upon launching
     <ig-id> A unique ID for the implementation guide within the context of this config (can be anything).
       name
       version
   supported_resource_types Array of strings that represents a list of resource types supported by the HAPI installation
   allowed_bundle_types Array of strings that represent each bundle type that can be stored on the FHIR server. By default, POST /fhir/Bundle is not allowed. Add each Bundle.type to this configurable list to allow POST/PUT'ing Bundles on the FHIR REST API.
DaoConfig.setBundleTypesAllowedForStroage
   allow_cascading_deletes true
   allow_contains_searches true
   allow_external_references true
   allow_multiple_delete true
   allow_override_default_search_params true
   allow_placeholder_references true
   auto_create_placeholder_reference_targets false
   cql_enabled true
   default_encoding JSON
   default_pretty_print true
   default_page_size 20
   enable_repository_validating_interceptor false
   enable_index_missing_fields false
   enforce_referential_integrity_on_delete false
   enforce_referential_integrity_on_write false
   etag_support_enabled true
   expunge_enabled true
   daoconfig_client_id_strategy null
   client_id_strategy ALPHANUMERIC This influences what IDs are accepted by Create-as-Update requests. By default, only IDs that start with letters are allowed when calling a PUT that represents creating a new resource. This can be overridden with ANY and it will allow any format of resource IDs.
   fhirpath_interceptor_enabled false
   filter_search_enabled true
   graphql_enabled true
   narrative_enabled true
   partitioning The presence of this property object in the config enabled partitioning/multi-tenancy.
    allow_references_across_partitions false PartitionSettings.setAllowReferencesAcrossPartitions
    partitioning_include_in_search_hashes false PartitionSettings.setIncludePartitionInSearchHashes
   cors
    allow_Credentials true
    allowed_origin * Array of strings that can represent multiple origins allowed by CORS. This affects how the FHIR REST API responds with the Allowed-Origin header.
   logger
     error_format 'ERROR - ${requestVerb} ${requestUrl}'
     format The format of the log messages
     log_exceptions true
     name fhirtest.access
   max_binary_size 104857600
   max_page_size 200
   retain_cached_searches_mins 60
   reuse_cached_search_results_millis 60000
   tester One or more objects representing a tester configuration. This influences what FHIR servers are available in the UI for the user to test against using the UI.
     <tester-id> The ID of the FHIR server. This can be any unique id within this config.
       name The name of the FHIR Server to display in the UI in the drop-down.
       server_address The address of the FHIR server that should be used for testing when this FHIR server is selected in the UI.
       refuse_to_fetch_third_party_urls
       fhir_version The version that the FHIR server represents (i.e. r4)
   validation
    requests_enabled true
    responses_enabled true
   binary_storage_enabled true
   bulk_export_enabled true
   subscription
     resthook_enabled false
     websocket_enabled false
     email
       from The from address to use when sending subscription emails
       host The host name or IP of the email server to send the email with
       port The port of the email server (i.e. 25)
       username The username to authenticate with on the email server
       password The password to authenticate with on the email server
       auth Boolean (true or false). Indicates if authenticate is required by the email server.
       startTlsEnable Boolean (true or false). Indicates if connections to the email server initialize with STARTTLS
       startTlsRequired Boolean (true or false). Indicates that the email server requires STARTTLS.
       quitWait
   lastn_enabled true
   normalized_quantity_search_level 2
elasticsearch
   debug
     pretty_print_json_log false
     refresh_after_write false
   enabled false
   password SomePassword
   required_index_status
   rest_url
   protocol
   schema_management_strategy
   username
Clone this wiki locally