avatar   mharthoorn  

Today we released Simplifier's public package server. The package functionality is in public beta and not yet in use in our official toolchain. It is, however, already build into our technical tool Torinox. A command line tool with a broad range of FHIR utilities. In this news post, I will explain how packages can be used and demonstrate this with Torinox.

Technical details

Since this week, Torinox is a FHIR package client. This means that it can download and install packages for you. That doesn't sound very complex, but behind the curtain a lot of stuff happens. Most of the complexity is hidden. But since you're interested, we'll go into a bit more detail!

Let's look at the use case where you are working on a FHIR profile project. You want to derive from a profile in your regional infrastructure. In the past, you would have to download each profile, extension, valueset and more separately, or you would get a zip and put them inside your project. That is already cumbersome, but it gets worse if a new version of those profiles is published. It is even more hassle if those regional profiles in turn are based on a national infrastructure that may be changed.

This is something tools should fix for you without you having to worry about the logistics. Just tell the tool to upgrade your package and everything is updated automatically. If there is an updated reference to the national infrastructure in that package, it will be resolved as well.


One of those tools can be Torinox: our command line tool. We implemented a package client in Torinox. Eventually, we will make sure that all our tools work with packages. We even expect that most, if not all, tooling in the FHIR ecosystem will work based on packages. For a start, a command line tool is a good way to prove the concept. To install Torinox, follow these instructions.

Step 1. Installing a package

Let's say you are working in a folder with FHIR profile files, which you can see as a FHIR profile project. If you need other profiles, you can install a package with Torinox. This will download and install a specific version, that you choose, on your computer. It will store the package in a global FHIR package cache.

It will also create a package.json file in your current folder that keeps track of all the dependencies of your project. If you already have a package.json, a new reference will be added. The name of this file was chosen carefully: it's also the file name of a package manifest. It means that your folder is ready to become a package itself.

Step 2. Restoring your dependencies.

Just installing a package is often not enough. Because an installed package might very well have dependencies on its own. Torinox will install these dependencies as well. There is an extra step: calculate all the direct and indirect dependencies in your project. This is what we call 'restoring'.

Restoring creates an extra file that holds a complete list of all dependencies. It makes sure that each reference is only there once, and it checks if each dependency is installed once. This is especially handy if you get a project from someone else. You just have this small 'package.json' file with the references you put in, and the restore will install everything and make sure all dependencies are accessible in your project. Now you are ready to use packages for snapshot generation and validation.


Watch this console demo to see how installing and restoring packages work. It makes it easier to try it out yourself! Perhaps we will even see a package that you created in Simplifier in the next few days. You can see the latest packages here: https://simplifier.net/packages.

Core Packages

Since the FHIR core packages are still work in progress, we created a temporary set of core packages:


And a meta package that contains them all, so you only need 1 reference in your project:


You can use this package to get a reference to the STU3 specification.

Try out

To give you something to try out for yourself, we created two demo projects with a package in Simplifier.

The first project is Demo.National.PatientCare. This package has a dependency on the FHIR core profiles. Here you can see the dependencies. We copied one Patient Profile in it from the German base profile set.

The second project is the Demo.Regional.PatientCare package. This one has one dependency on Demo.National.PatientCare. But you can see it has also inherited a bunch of indirect dependencies. In this project package, we put one Patient Profile from the nNGM project.

If you install this package on your computer and then do a restore,

  > fhir install demo.regional.patientcare
  > fhir restore

you will also have the Demo.National.PatientCare package installed and all core packages mentioned above.

If you would now try to validate a Patient from the Koeln project, you will see it resolves all the relevant Patient Profiles.

  > fhir get https://stu3.simplifier.net/open/Patient/484c4d0e-53f2-4e19-a5dd-09f9dcf74ae6
  > fhir validate

In the end, the validation will not be successful because we did not bring in all the other profiles, like for example the national regional humanname profile, into the demo project packages. Once the main projects on Simplifier have their own packages, you can try it more realistically with those packages!

Other news from Firely
Rob Langezaal
Forge now supports Quality Control (already available in Simplifier and Firely Terminal) to improve the quality of your FHIR projects. In addition, you can now see all the file types supported by Simplifier in the project list view.
Ward Weistra 🔥
Join us on June 6-9 in Cleveland or online. These are the talks that focus on Forge and Simplifier.net →
Rob Langezaal
This minor Forge release mostly fixes a bunch of bugs, but there are some feature improvements as well, like making it easier to get your FHIR Shorthand files on Simplifier and adding new elements to logical models.
Marco Visser
Read all about the breaking changes, code clean-up, and code improvements we implemented
Matthijs van der Wielen
Synchronize your Simplifier projects with your local folders in Forge with one click.
Matthijs van der Wielen
The Firely Team is happy to announce the latest update to Firely Server.
Matthijs van der Wielen
Canonical Claims warnings are added to Projects and Packages.
Matthijs van der Wielen
We have released new versions of Forge for STU3, R4, R4B and R5.
Matthijs van der Wielen
Today we released Simplifier 27.3, with the theme Guide Versioning!
Ward Weistra 🔥
An updated version of Forge has been released with a fresh look, better packages support and improved usability around font scaling on zooming in. Full release notes in this item.