Firely.Fhir.Packages 6.1.0

Introduction

This is Firely's support library for anyone who wants to work with FHIR packages.

We use this library in our own software including:

What's in the box?

This library provides:

  • An NPM/FHIR-package client for resolving and publishing FHIR packages.
  • Functionalities to create FHIR packages from files on disk.
  • Installation of FHIR packages on your machine
  • Helper classes to create the correct manifest and index files for FHIR packages

Authenticating against a private package feed

Package servers that require authentication, such as private Simplifier.net package feeds, can be accessed by constructing a PackageClient with your own HttpClient and passing it to FhirPackageSource. Because you control the HttpClient, any authentication scheme is possible: a Bearer token (for Simplifier, a JWT access token), basic authentication, an API key header, or a custom DelegatingHandler.

A private Simplifier feed is addressed as https://packages.simplifier.net/feeds/{feedname}, and packages within it live at /{package}/{version}.

var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", myJwtToken);

var client = new PackageClient(new FhirPackageUrlProvider("https://packages.simplifier.net/feeds/myfeed"), httpClient);

var resolver = new FhirPackageSource(ModelInfo.ModelInspector, client, ["mypackage@1.0.0"]);

A few things to be aware of:

  • Lifetime: FhirPackageSource downloads its packages lazily, on first use. Do not dispose the PackageClient (or the HttpClient it wraps) before the source has resolved its packages.
  • Token expiry: a token set as a default request header is frozen at the moment you set it. That is fine for short-lived processes, but in a long-running application a JWT will expire. In that case, attach your own DelegatingHandler to the HttpClient that supplies (and refreshes) the token per request.
  • Caching: downloaded packages are stored in the machine-wide FHIR package cache (~/.fhir/packages), keyed by package name and version only — the package server is not part of the key. This means a package that is already present in the cache (for example, downloaded earlier from the public registry) is used as-is without contacting your private feed, and conversely, packages downloaded from a private feed become available from the cache to other tools and users on the same machine, without authentication. Keep this in mind when working with private packages on shared machines.
  • Obtaining and refreshing the token itself (for Simplifier: the /token and /token/refresh endpoints) is the caller's responsibility; this library only sends the credentials you configured with its requests.

Nuget

You can use the library by downloading the nuget package

Support

You are welcome to register your bugs and feature suggestions at https://github.com/FirelyTeam/Firely.Fhir.Packages/issues. For questions and broader discussions, we use the .NET FHIR Tooling chat on Zulip.

Contributing

We are welcoming contributors!

If you want to participate in this project, we're using Git Flow for our branch management, so please submit your commits using pull requests on the develop branch!

GIT branching strategy

Showing the top 20 packages that depend on Firely.Fhir.Packages.

Packages Downloads
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
129
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
130
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
138
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
152
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
164
Hl7.Fhir.Support.Poco
This is the support library for working with the POCO representation of HL7's FHIR model data
167

Version Downloads Last updated
6.1.0 5 09/17/2026
6.0.0 15 08/07/2026
5.0.2 45 04/14/2026
5.0.1 46 01/15/2026
5.0.0 94 10/15/2025
4.9.1 120 04/06/2025
4.9.0 127 12/04/2024
4.8.0 113 10/25/2024
4.7.0 143 08/13/2024
4.6.0 142 07/23/2024
4.5.0 137 07/23/2024
4.4.0 122 07/23/2024
4.3.0 127 07/23/2024
4.2.0 133 07/23/2024
4.1.0 126 07/23/2024
4.0.0 144 07/23/2024
4.0.0-beta1 129 07/23/2024
3.0.2 129 07/23/2024
3.0.1 140 07/23/2024
3.0.0 141 07/23/2024
3.0.0-beta2 133 07/23/2024
3.0.0-beta1 137 07/23/2024