Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.96 KB

DEPLOYMENT.md

File metadata and controls

58 lines (42 loc) · 3.96 KB

Deployment

The application is meant to be deployed to a clean VM running Linux OS, recommended flavor is Ubuntu, specifically version 22.04. The main chosen method of deployment is a docker container due to its robustness. In theory, it is possible to run it as a standalone python package.

List of supported Linux flavors:

  • Ubuntu 22.04

Prerequisites:

List of prerequisites for running the application on one of the supported operating systems:

Docker deployment

Inside the container, the application runs under a non-root user as an additional security measure. For deploying to production, configure the application using environment variables (documentation bellow), mount the directory containing patient records/data and run the following command:

docker compose --profile prod up -d

This will pull the latest image and start the application. To check the logs run:

docker logs fhir-module -f

if connection to the Blaze was successful, you should see the following line:

Starting sync with Blaze 🔥!

Environment variables

The FHIR module is configured via environment variables, all of which can be found below. To override the default value, simply specify them in compose.yaml in the environment section.

Variable name Default value Description
BLAZE_URL http://localhost:8080/fhir Base url of the FHIR server for sync. No trailing slash.
BLAZE_USER empty Basic auth username for accessing the blaze store via HTTP.
BLAZE_PASS empty Basic auth password for accessing the blaze store via HTTP.
PARSING_MAP_PATH /opt/fhir-module/default_map.json Path to a JSON file containing object parsing mappings. Example here.
MATERIAL_TYPE_MAP_PATH /opt/fhir-module/default_material_type_map.json Path to a JSON file containing mappings between organizational and FHIR material types. Example here.
SAMPLE_COLLECTIONS_PATH /opt/fhir-module/default_sample_collection.json Path to a JSON file containing information about Sample collections. Example here.
DIR_PATH /mock_dir/ Path to a folder containing file(s) with records.
RECORDS_FILE_TYPE xml Type of files containing the records.
CSV_SEPARATOR ; Separator used inside csv file, if the records are in a csv format.

Object mapping

The FHIR module uses dynamically configurable maps currently stored as json files to parse XML or CSV into Python objects.