Welcome to Node on FHIR. This code repository contains a reference FHIR server and web application stack written in modern ES6/Typescript/Javascript/Node that can compile to mobile devices. We have gone through the NPM repository, and tried to pull in as many FHIR related libraries as we could in order to find the 'center' of the Javascript FHIR community.
This project is an offshoot of the Meteor on FHIR project, which developed a Javascript/Node based FHIR application stack about 4 years ago. A the time, we chose Meteor.js, a full-stack application framework that used websockets as it's transportation mechanism with pub/sub functionality, because it had good support for clinician worklists use cases with a document oriented database and good support for data visualizations. Over time, we saw some limitations with the default Meteor tech stack, particularly with the data distribution protocol and the Blaze rendering layer. However, we've been quite pleased with the Meteor compiler and its support for mobile applications.
Eventually, we decided to do a soft fork of the Meteor project, and set up our own release track, which involved publishing 100+ packages, and began replacing the websocket/data-distribution-protocol with HL7 compliant OAuth/REST interfaces. We also were tracking many of the latest developments in the Javascript community, such as the release of React and EcmaScript 6, and began migrating our codebase forward. With the help of the Meteor Development Group, we were able to upgrade the default reference build to include best practices from across the Javascript ecosystem.
This repository is set up as a GitHub template, so you can simply fork it and adjust the settings file. Included is an example plugin which can be compiled and published to NPM itself. Importantly, this repository uses isomorphic code, meaning its the same modern ES6 code pattners on the client, server, and in the plugin packages.
The following FHIR libraries from the NPM repository have been validated to work with NodeOnFHIR.
Library | Vendor | Description |
---|---|---|
fhirclient | smarthealthit | The official SMART on FHIR javascript client |
fhir-kit-client | Vermonster | Modern FHIR client with ES6, SMART, cross-version support, etc |
fhir-starter | symptomatic | FhirUtilities, FhirDehydrator, and template FHIR UI components. |
fhir-react | 1uphealth | Multi use react component |
json-schema-resource-validation | VictorGus | FHIR validator for R4 |
sof-scope-checker | Asymmetrik | Utility to check SMART on FHIR scope access |
fhirpath | HL7 | The official FHIRPath parser |
is-fhir-date | HenrikJoreteg | Checks if a date is FHIR compliant |
ts-fhir-types | Ahryman40k | Typescript definitions |
fhir-list-addresses | careMESH | Utility function for extracting addresses |
hl7v2 | panates | HL7 v2 parser, serializer, validator and TCP client/server. |
redox-hl7-v2 | Redox | This is Redox's battle-tested in-house HL7v2 parser/generator. |
The FHIR appplication server in this repository is the result of 7 years of work; 100+ prototypes and pilots, the result of a million+ quality control tests, and the contributions of dozens of different organizations, ranging from big tech companies (Google Chrome, Facebook React) and javascript specific projects (Meteor, Material UI) to healthcare specific companies (HL7, Vermonster, Asymmetrik, SmartHealthIT, etc). It represents a rich combination of functionality that is difficult to be found anywhere else. It has been used to build personal health records, a longitudinal timeline that was published to the Apple App Store, patient charting software, clinical worklists, pharmacogenomics pipelines, medical imaging software, medical home hubs, and many more systems.
# install the meteor compiler; this will take care of node, nvm, npm, yarn, etc.
# it will also set up debugging tools, a compiler build tool, etc
npm install -g meteor
# download the node-on-fhir application
git clone https://github.com/clinical-meteor/node-on-fhir
cd node-on-fhir
# install dependencies
meteor npm install
# alternative, use yarn if you'd like a more modern package manager
meteor yarn install
# run the application in local development mode
# this will automatically launch a mongo instance
meteor run --settings configs/settings.nodeonfhir.json
# stop the application with Ctrl-C
# add custom packages (the FHIR server)
cd packages
git clone https://github.com/clinical-meteor/vault-server
meteor add clinical:vault-server
cd ..
# now run it with a custom settings file
# does it compile?
meteor run --settings configs/settings.nodeonfhir.localhost.json
# can we get to the FHIR server yet?
open http://localhost:3000/metadata
# does it run? can we get to the FHIR server? To the Patient route?
open http://localhost:3000/baseR4/metadata
open http://localhost:3000/baseR4/Patient
# stop the application with Ctrl-C
# download custom packages
cd packages
git clone https://github.com/clinical-meteor/example-plugin
cd ..
# alternatively, run the config from a plugin
meteor run --settings packages/example-plugin/configs/settings.example.json --extra-packages clinical:example-plugin
# when you're ready to deploy, you'll need to add the package to the app (meteor deploy won't accept --extra-packages)
meteor add clinical:example-plugin
# after adding the plugin, you can simply run the following
meteor run --settings packages/example-plugin/configs/settings.example.json