Guidance for FHIR IG Creation
0.1.0 - CI Build
Guidance for FHIR IG Creation, published by HL7 International - FHIR Management Group. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/ig-guidance/ and changes regularly. See the Directory of published versions
FHIR Implementation Guides follow a semantic versioning (semver) approach with some standards specific adaptations:
Milestone releases correspond to formal publications that the publisher expects implementers to base production
implementations on. Milestone releases use standard semantic versioning with the format major.minor.patch
:
Note that HL7 exercises careful governance over the choice as to whether minor changes cause a new publication or can happen within the scope of the standards update process.
Examples:
1.0.0
- First major release1.1.0
- Update to edition 1 with minor new features (and maybe changes)1.1.1
- Technical Correction for version 1.1For draft, ballot, and working publications, a suffix is appended to the base version using a hyphen:
1.0.0-ballot
- Ballot version of 1.0.02.1.0-draft
- Draft version of 2.1.01.5.0-preview
- Preview version of 1.5.03.0.0-cibuild
- Continuous integration build of 3.0.0Common suffixes include:
-ballot
- For ballot versions-draft
- For draft versions-preview
- For preview releases-cibuild
- For continuous integration buildsWorking releases are generally preview for comment, and generally not appropriate for production implementations, though implementers often do anyway.
Agreed terms:
Confusing terms:
Todo:
IGs can depend on other IGs and packages using two primary identifiers:
http://hl7.org/fhir/us/core
)hl7.fhir.us.core
)You can specify either identifier, and the publisher will resolve the missing information:
If an IG want to use content from another IG, then it has to 'depend on it' by including it in the package dependencies. Dependencies are always to a combination of package + version, and are specified either in the ImplementationGuide resource for the IG, or if the IG is built by Sushi, in the sushi-config.yaml. In IGs, dependencies must always have a stated version (with one specific exception - see Related IGs).
Possible version values are:
current
- use the last build of the master/main branch on build.fhir.org (note: we apologise for using this misleading term as described above)dev
- use the last local build performed on this computer (in any branch), otherwise fall back to #currentit's possible for an IG to depend on multiple different versions of an IG. This can be done explicitly - see below, ot it can arise through transitive dependencies of packages it depends on. In the latter case, things can be quite messy - see Pinning Canonical References
Outside of an IG resource, e.g. in the parameters to the validator, the
package reference syntax used is similar to NPM: packageId#version
.
In some contexts, the package reference can have no version. When this
is the case, the tools will pick the most recent publication (milestone,
or otherwise).
Tools:
An IG can depend on multiple versions of an IG at once, e.g:
"dependsOn" : [{
"packageId" : "hl7.fhir.us.core",
"version" : "3.1.1"
}, {
"packageId" : "hl7.fhir.us.core",
"version" : "7.0.0"
}]
The reasons why an IG might want to do this is complicated and it creates many issues, but sometimes there is no choice.
This isn't directly possible in sushi-config.yaml, or in the package.json format used inside NPM packages, so in those cases, a convention from the NPM package ecosystem is adopted:
"dependencies" : {
"hl7.fhir.us.core" : "3.1.1",
"uscore@npm:hl7.fhir.us.core" : "7.0.0"
}
A similar syntax would apply in sushi-config.yaml, but it is not yet supported by Sushi.
The IG Publisher always ensures that 4 packages are loaded:
There is never any reason for editors to pay any attention to the publication package (hl7.fhir.pubpack), though since it is first any systemic errors in the package infrastructure will show up as errors with the pubpack. Otherwise, it's of no interest to editors.
The same is largely true for the tooling extensions - they're internal business to the Publication tooling. There are a few cases where editors need to pay attention to this - consult the FHIR Product Director if you think you need to.
For the other two packages - Extensions Pack and THO, the IG publisher will inject
the most recent full release of each of these packages into the IG if it doesn't
see them already present. Editors can choose something other than the most recent
full release by adding explicit dependencies to these packages.