A home for FHIR.
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. Currently, Hearth supports the DSTU2 version of FHIR, however, in the future multiple version support is planned. Resources with a high maturity and that don't have breaking changes between version will still work just fine with STU3.
Our high level plan for the project can be found here.
- Supports basic FHIR interactions for every resource
- 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 basic resource matching using the $match operation on a query, see
config/matching.json
for configuration options. - Supports query parameters for a susbset of FHIR resources, see below for details.
- Supports basic 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
Now start the server in dev mode (which uses a dev namespaced database)
npm run dev:start
otherwise for production just run:
npm start
To run the tests:
npm test
All resources are supported with the default FHIR interactions and default search parameters, however, specific resources have been implement with support for particular search paramater in the FHIR spec.
Supported Resources | Supported Query Parameters | Maturity Level |
---|---|---|
Allergy Intolerance | patient | 1 |
Audit Event | _id | 2 |
Basic | code, subject, author | 1 |
Binary | contenttype | 1 |
Composition | entry, patient, status, subject, type | 2 |
Document Manifest | patient, patient.identifier, created, author.given, author.family, type, status | 1 |
Document Reference | patient, patient.identifier, indexed, author.given, author.family, status, class, type, setting, period, facility, event, securityLabel, format, related-id | 2 |
Encounter | patient, practitioner, practitioner.organization, participant, location, status | 1 |
Immunization | encounter | 1 |
Location | organization, type | 1 |
Observation | encounter | 3 |
Organization | identifier | 1 |
Patient | _id, active, identifier, given, family, gender, birthdate, address, address-city, address-country, address-postalcode, address-state, mothersMaidenName.given, mothersMaidenName.family, telecom, multipleBirthInteger | 3 |
Practitioner | identifier, given, family, role, organization, telecom | 1 |
Procedure Request | encounter, patient | 1 |
Procedure | encounter, patient | 1 |
Questionnaire Response | encounter, patient, questionnaire | 2 |
Questionnaire | identifier | 2 |
ValueSet | url, system | 3 |
link to FHIR list (https://www.hl7.org/fhir/resourcelist.html)
- 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
npm run test:these-files -- test/pdqm.js
. Note the--
is important! - Run
npm run cov
to show coverage details in your browser. - To overwrite json config variables with environment variables it is possible to level down the object with
__
(double underscore). For example{ mongodb: { url: 'localhost' } }
can be overwritten withmongodb__url=foreignhost