On this page:
   35.19    Cross-Origin Resource Sharing (CORS) 35.21    ETL Import: CSV Properties   

35.20Database

 

The Database configuration category includes the following configurable options:

  • Default Query Timeout (Seconds)

  • Max Idle Connections

  • Connection Max Lifetime (millis)

  • Max Total Connections

  • Max Wait (Seconds)

  • Min Idle Connections

  • Pool Prepared Statements

  • Test Connections on Return

  • Database Type

  • Expect database to be writable

  • Database Password

  • Database Update Mode

  • DB Secrets Manager

  • SQL Parameter Bind Mode

  • Database Connection URL

  • Database Username

  • Default Page Size

  • FHIR Version

  • Maximum Page Size

  • Use ordinal date values for day precision searches.

35.20.1Property: Default Query Timeout (Seconds)

 
Property Name Default Query Timeout (Seconds)
Property Key
Property Type NON_NEGATIVE_INTEGER
Description This setting is the maximum number of seconds that a query may run before being automatically aborted by the database. This setting is a failsafe to prevent overly taxing searches from dominating the database.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 60
Example Property
module.[MODULE_ID].config.db.connectionpool.default_query_timeout_seconds = 60

35.20.2Property: Max Idle Connections

 
Property Name Max Idle Connections
Property Key
Property Type NON_NEGATIVE_INTEGER
Description The maximum number of idle connections to keep in the database connection pool at any given time.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 8
Example Property
module.[MODULE_ID].config.db.connectionpool.maxidle = 8

35.20.3Property: Connection Max Lifetime (millis)

 
Property Name Connection Max Lifetime (millis)
Property Key
Property Type POSITIVE_INTEGER
Description If set, provides the maximum total number of milliseconds that a connection is allowed to live. Any connections that are open for longer will be closed instead of being reused. Note that this setting applies only to idle connections in the pool, it does not affect active database operations even if the timeout is exceeded. Minimum recommended value: 120000
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.connectionpool.maxlifetime.millis = 

35.20.4Property: Max Total Connections

 
Property Name Max Total Connections
Property Key
Property Type POSITIVE_INTEGER
Description The maximum total number of connections to allow the database connection pool to hold at any given time. Set this value carefully as it may negatively impact database performance when set too low or too high.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 8
Example Property
module.[MODULE_ID].config.db.connectionpool.maxtotal = 8

35.20.5Property: Max Wait (Seconds)

 
Property Name Max Wait (Seconds)
Property Key
Property Type POSITIVE_INTEGER
Description The maximum number of seconds that a request should wait for a database connection before timing out and aborting.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 30
Example Property
module.[MODULE_ID].config.db.connectionpool.maxwait_seconds = 30

35.20.6Property: Min Idle Connections

 
Property Name Min Idle Connections
Property Key
Property Type NON_NEGATIVE_INTEGER
Description The minimum number of idle connections to keep in the database connection pool at any given time.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 0
Example Property
module.[MODULE_ID].config.db.connectionpool.minidle = 0

35.20.7Property: Pool Prepared Statements

 
Property Name Pool Prepared Statements
Property Key
Property Type BOOLEAN
Description If enabled, prepared statements will be pooled by the connection pool. Note that when using schema-based multitenancy, Smile CDR may choose to ignore this setting.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value false
Example Property
module.[MODULE_ID].config.db.connectionpool.pool_prepared_statements = false

35.20.8Property: Test Connections on Return

 
Property Name Test Connections on Return
Property Key
Property Type BOOLEAN
Description If enabled, connections will be tested for validity when they are being returned to the pool. This adds a small amount of additional overhead, but can be helpful in order to speed up recovery from network and database issues.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value false
Example Property
module.[MODULE_ID].config.db.connectionpool.test_on_return = false

35.20.9Property: Database Type

 
Property Name Database Type
Property Key
Property Type ENUM
Values
  • H2_EMBEDDED
  • DERBY_EMBEDDED
  • MARIADB_10_1
  • MYSQL_5_7
  • POSTGRES_9_4
  • ORACLE_12C
  • MSSQL_2012
Description The database platform being used. Smile CDR supports several relational database platforms for persistence so this setting selects the dialect that is specific to the platform being used.

For example, if you are using Postgres 9.4, select the POSTGRES_9_4 dialect.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.driver = 

35.20.10Property: Expect database to be writable

 
Property Name Expect database to be writable
Property Key
Property Type BOOLEAN
Description Fail health-check if the database is read-only.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value false
Example Property
module.[MODULE_ID].config.db.expect_writable = false

35.20.11Property: Database Password

 
Property Name Database Password
Property Key
Property Type PASSWORD
Description Password for the database.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.password = 

35.20.12Property: Database Update Mode

 
Property Name Database Update Mode
Property Key
Property Type ENUM
Values
  • UPDATE
  • NONE
Description Controls whether Smile CDR should attempt to update the FHIR storage database schema on startup. If the database schema is out of date, Smile CDR automatically run migration on the FHIR storage schema at startup if the value is "UPDATE" If the value is "NONE", then Smile CDR will abort starting the FHIR storage module if its schema is out of date. When set to "NONE", you should use the "smileutil migrate" command to upgrade the database manually.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value UPDATE
Example Property
module.[MODULE_ID].config.db.schema_update_mode = UPDATE

35.20.13Property: DB Secrets Manager

 
Property Name DB Secrets Manager
Property Key
Property Type ENUM
Values
  • AWS
  • NONE
Description The configured DB connection Secrets Manager provider.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value NONE
Example Property
module.[MODULE_ID].config.db.secrets_manager = NONE

35.20.14Property: SQL Parameter Bind Mode

 
Property Name SQL Parameter Bind Mode
Property Key
Property Type ENUM
Values
  • ALWAYS_INLINE
  • INLINE_NUMERIC
  • NEVER_INLINE
Description Specifies whether parameters in SQL statements should be inlined or bound to parameters.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value NEVER_INLINE
Example Property
module.[MODULE_ID].config.db.sql_parameter_bind_mode = NEVER_INLINE

35.20.15Property: Database Connection URL

 
Property Name Database Connection URL
Property Key
Property Type STRING
Description JDBC Connection URL for the database.

The following examples show JDBC URLs for a few different database platforms:
  • Derby Filesystem: jdbc:derby:directory:target/testDatabase;create=true
  • Postgresql: jdbc:postgresql://localhost/cdr
  • MariaDB: jdbc:mariadb://localhost:3306/cdr
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.url = 

35.20.16Property: Database Username

 
Property Name Database Username
Property Key
Property Type STRING
Description Username for the database.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value (no default)
Example Property
module.[MODULE_ID].config.db.username = 

35.20.17Property: Default Page Size

 
Property Name Default Page Size
Property Key
Property Type POSITIVE_INTEGER
Description The default number of resources per page when querying mongo if _count is not provided. If not specified, will be set to 20.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 20
Example Property
module.[MODULE_ID].config.default_page_size = 20

35.20.18Property: FHIR Version

 
Property Name FHIR Version
Property Key
Property Type ENUM
Values
  • DSTU2
  • DSTU3
  • R4
Description The version of FHIR to support in this module
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value R4
Example Property
module.[MODULE_ID].config.fhir_version = R4

35.20.19Property: Maximum Page Size

 
Property Name Maximum Page Size
Property Key
Property Type POSITIVE_INTEGER
Description The maximum allowable value for _count. Higher values of _count will be reduced to this value. If not specified, will be set to 100.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value 100
Example Property
module.[MODULE_ID].config.maximum_page_size = 100

35.20.20Property: Use ordinal date values for day precision searches.

 
Property Name Use ordinal date values for day precision searches.
Property Key
Property Type BOOLEAN
Description If enabled, causes date search params with DAY precision to rely on the ordinal versions of the dates.
Applies to Modules
  • Cluster Manager
  • FHIR Storage (DSTU2 Relational)
  • FHIR Storage (MongoDB)
  • FHIR Storage (R3 Relational)
  • FHIR Storage (R4 Relational)
  • Realtime Export
Default Value true
Example Property
module.[MODULE_ID].config.use_ordinal_dates_for_day_precision_searches = true
   35.19    Cross-Origin Resource Sharing (CORS) 35.21    ETL Import: CSV Properties