brianpos.fhir-distillery
2026.7.1.4
dotnet tool install --global brianpos.fhir-distillery --version 2026.7.1.4
dotnet new tool-manifest
dotnet tool install --local brianpos.fhir-distillery --version 2026.7.1.4
#tool dotnet:?package=brianpos.fhir-distillery&version=2026.7.1.4
nuke :add-package brianpos.fhir-distillery --version 2026.7.1.4
FHIR-Distillery
A simple tool for extracting HL7® FHIR® StructureDefinitions based on examples provided.
Creating a FHIR Implementation Guide can seem like hard work, and often development and release timelines get in the way of good practice, so this tool comes in handy to help pad out the extensions that you forgot to define during the modeling phase, and also helps demonstrate which ones you've never used too...
Specifically it will:
- Deduce extensions (creates the SD, updates the usage context and datatypes in existing SDs)
- Highlight property usage (sets max=0 when properties are not seen in any examples, except mandatory fields of course)
The current project is a dotnet tool
that scans a folder of example resources, or a live FHIR server, and produces the StructureDefinitions.
All of its settings are provided as command line parameters (rather than an appsettings.json file).
In the future will probably adapt it to work on NDJSON files and live servers.
Installation
The package id is brianpos.fhir-distillery, and once installed the tool is run as fhir-distillery.
dotnet tool install --global brianpos.fhir-distillery
Usage
fhir-distillery --baseUrl http://fhir.example.org/ --publisher "My Organization" --scanFolder ./examples --outputPath ./OutputResources
| Parameter | Alias | Description |
|---|---|---|
--sourcePath |
-s |
The path containing any existing StructureDefinitions to use while scanning |
--outputPath |
-o |
The folder where the generated/updated StructureDefinitions are written (default OutputResources) |
--baseUrl |
-b |
The canonical base URL to use for the generated StructureDefinitions |
--publisher |
-p |
The publisher value to stamp onto the generated StructureDefinitions |
--scanFolder |
-sf |
A local folder of example resources (xml/json) to scan |
--serverUrl |
-su |
The base URL of a FHIR Server to scan |
--queries |
-q |
The queries to execute against the FHIR Server when scanning (repeatable) |
--verbose |
Provide verbose diagnostic output while processing |
One of --scanFolder or --serverUrl must be provided to indicate what to scan.
Licensing
HL7®, FHIR® and the FHIR Mark® are trademarks owned by Health Level Seven International, registered with the United States Patent and Trademark Office.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.7.1.4 | 149 | 7/1/2026 |