FHIR Packages?

Lots of people are working with FHIR, evident by the attendance at FHIR connectathons or the Zulip chat for FHIR. As part of the specification, FHIR can be profiled, or extended and constrained, to meet specific use-cases. Many people arrange their use-cases into projects (described by implementation guides). As more of these projects build upon (depend on) other projects, and needs to share and distribute projects are on the rise, a management system became necessary.

Enter FHIR Packages.

The FHIR representation model has its roots in REST, which has its roots in the development of HTTP. Like REST, the core building block of FHIR is called a resource. A FHIR Package is a collection of FHIR Resources (like a directory with a JSON file-per-resource). The FHIR community decided to base FHIR package management on the Node Package Manager (NPM) standard. The FHIR Package standard is currently a subset of the NPM standard.

This FHIR Package Registry allows you to search through the thousands of resources created by the community and gives you quick access to reference, download, and install.

On each package page you will see an installation widget on the right side. This has two easy options for you to install FHIR Packages, with a button to copy the install command to your computer clipboard.

Image of Install Widget

NPM

This is the package manager for node modules. Installing FHIR Packages is similar to installing from NPM, except you need to specify a different package registry (e.g. not npmjs.org). This can be done either by using the registry flag when installing a package:

> npm --registry https://packages.simplifier.net install fhir.package@version

Or by setting your default package server to use the official FHIR registry:

> npm config set registry https://packages.simplifier.net > npm install fhir.package@version

You can read more about using NPM to install FHIR Packages.


Torinox and other FHIR tools

Torinox is a cross-platform FHIR command line tool that helps you work with FHIR resources. This tool has lots of features, be sure to read the Torinox documentation.

Since Torinox is 100% FHIR, there is no need to specify the standard FHIR registry, it is simply:

> fhir install fhir.package version

Torinox and many other FHIR tools, such as the IG Publisher and Forge, install their packages in the same package cache. In this way so you only need to download each package once.





Happy FHIR'ing!