HEARTH (noun) : the floor of a 'FHIR'place. A fast FHIR-compliant server focused on longitudinal data stores.
This project aims to provide a fast and lightweight FHIR server that also supports some of the FHIR-based IHE profiles. It is still in the early stages of development, follow the project to stay informed. Any contibutions are welcomed!
Our high level plan for the project can be found here.
- Supports both DSTU2 and STU3 - the current version can be set in config, see here
- Supports both JSON and XML with conversion between the two using the FHIR.js module. Supports using both the
Accepts:
header and the_format
parameter for defining the response format. - Supports read, vread, search, create, update, delete and batch/transaction FHIR interactions for ALL resources
- Supports ALL query parameters defined for ALL resources with the exception of parameters of type number or quantity - this is done by reading and processing the downloadable FHIR definitions files
- Supports chained parameter queries to the nth degree
- Supports query parameter modifiers for string types, including
exact
andcontains
- Supports query paramater prefixes for dates, including
eq
,ne
,lt
,le
,gt
andge
- Supports query parameters for choice-of-type resource properties
- Supports basic resource matching using the
$match
operation on a query, seeconfig/matching.json
for configuration options. - Supports basic (cardinality only) resource validation using the FHIR.js module, this is not enabled by default allowing you to store any extensions or profiles by default - toggle this in the config
To run in development mode use the following commands. First Mongo needs to be available on your system. The easiest way to do this is through docker:
docker run --name hearth-mongo -d -p 27017:27017 mongo
Install dependencies
yarn
Now start the server in dev mode (which uses a dev namespaced database)
yarn dev:start
otherwise for production just run:
yarn start
The default FHIR version is DSTU2 as set in the config files, to change this either change the config files or make use of overriding config variable via environment variables:
server__fhirVersion=stu3 yarn start
To run the tests:
yarn test
To configure Hearth you may either edit the config files directly in the config/
folder or you may use environment variables. There is a default config file and config files for production and or testing environments that override the default config file. Environment variables override the values set in any of the config files. To overwrite json config variables with environment variables you can level down the object with __
(double underscore). For example { mongodb: { url: 'localhost' } }
can be overwritten with mongodb__url=foreignhost
View the possible config fields here.
- Mobile access to Health Documents - (MHD)
- Patient Identity Cross-Reference for mobile - (PIXm)
- Patient Demographics Query for mobile - (PDQm)
- Terminology Service
$lookup
operation - ($lookup)
- To run only specific test files use
yarn test:these-files test/pdqm.js
. - Run
yarn cov
to show coverage details in your browser.