You're reading the documentation for a development version. For the latest released version, please have a look at 1.1.1.

State configuration

Note

FHIR Connect State comprises of 2 main files: context and model mappers. Read more on the official FHIR Connect specification.

State required by the engine are mapping files according to FHIR Connect specification and are split to context.yaml files and model.yaml files. Additionally, state required by the engine are also openEHR Operational Templates (.opt), which can either be part of the openFHIR Engine’s state or it can come from an integrated openEHR repository (see more: Integrations).

As an example, for a mapping of a blood pressure template, you’d need the following files (state) configured:

  • Blood Pressure.opt

  • simple-blood-pressure.context.yaml

  • blood-pressure.model.yaml

Bootstrapping

State configuration can be achieved by POSTing OPT and YAML files to the designated /opt and /fc/(context, model) endpoints. Alternatively, these files can be placed in a bootstrapping directory where they are picked from during the engine’s startup. This approach minimizes the need for repetitive API calls, allowing for faster and more efficient configuration of pre-existing mappings.

Bootstrapping location is configured with environment variable BOOTSTRAP_DIR, default being /app/bootstrap/.

For example, setting -e BOOTSTRAP_DIR=/etc/bootstrapping-dir and placing files in this folder (/etc/bootstrapping-dir) will make the engine pick them up at startup and process them.

If you have files to be bootstrapped separated in sub-folders, you may also add RECURSIVELY-OPEN-DIRECTORIES=true, which will make openFHIR Bootstrapper open all sub-folders as well and look inside for any matching files to be bootstrapped.

Files are picked according to their suffixes:

  • model files need to be suffixed with *.yaml or *.yml, i.e. blood.pressure.model.yaml

  • context files need to be suffixed with *.context.yaml or *.context.yml, i.e. simple-blood-pressure.context.yaml

  • operation template files need to be suffixed with *.opt, i.e. BloodPressure.opt

  • terminology concept maps (read more in Terminology) need to be suffixed with *.json, i.e. concept-map.json

Files are picked up and processed only once. If you want them to be picked up and processed again, you need to remove references of those files from bootstrap collection.

Through REST

State configuration can be achieved by POSTing OPT and YAML files to the designated /opt and /fc/(context, model) endpoints. See RESTful APIs for more information.