FHIR Database Configuration

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

To use an MS SQL database, follow the steps below:

  1. Initialize the database.

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

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

  2. Specify the database connection settings.

    Once the database is ready, specify the database connection settings in the file ${XESModuleForFHIR}\tomcat\conf\fhir.properties. 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 ${XESModuleForFHIR}\config\sql\connection-properties\ contains sample configuration files that you can use as templates.

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