FHIR Database Configuration

By default, XES Module for FHIR uses an embedded Apache Derby database engine to store resource data. The default XES Module for FHIR installation deploys a ready-to-use Apache Derby database and requires no additional actions. However, for the production environment Edifecs recommends that you use an MS SQL database for data storage.

MS SQL Database

To connect to MS SQL database, you should perform the following steps:

  1. Initialize the database.

    You need to create a database schema in MS SQL Server that XES Module for FHIR must use. The name of this database must be used in the ${XESModuleForFHIRRoot}\tomcat\conf\fhir.properties file (specified in the fhir.db.url property).

    If the database user with credentials you specified in the fhir.db.username and fhir.db.password properties has permissions to create tables and database structures, the database structure will be created automatically. Otherwise, you need to run the sqlserver-create-tables-only.sql script from the directory ${XESModuleForFHIRRoot}\config\sql\db-creation\ as a database administrator. This script populates an existing MS SQL database with required tables.

  2. Specify database connection settings.

    Once the database is ready, specify the database connection settings in the ${XESModuleForFHIRRoot}\tomcat\conf\fhir.properties file. An example of the fhir.properties file configured to work with an MS SQL database below:

    Note The user specified in the fhir.db.username property must have at least the following permissions: db_datawriter, db_datareader.

    Tip The directory ${XESModuleForFHIRRoot}\config\sql\connection-properties\ contains sample configuration files that you can use as templates.

  3. Drop the MS SQL jdbc driver into the directory ${XESModuleForFHIRRoot}\tomcat\lib.
  4. Restart the XES Module for FHIR service.

Oracle Database

You can also use XES Module for FHIR with Oracle Database 19c directly as regression tests have been performed using real production data to ensure that the XES Module for FHIR is certified and compatible with Oracle Database 19c Release 19.2.

If you use an Oracle database for data storage, you have to specify values for the properties: fhir.db.driver, fhir.db.url, hibernate.dialect as follows:

fhir.db.driver=oracle.jdbc.OracleDriver

fhir.db.url=jdbc:oracle:thin:@${HOST}:${PORT}:${DB}

hibernate.dialect=org.hibernate.dialect.Oracle12cDialect