Guidance for FHIR IG Creation
0.1.0 - CI Build International flag

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

Related IGs

Related IGs are registered using the parameter related-ig:

    "parameter": [
      {
        "code": "related-ig",
        "value": "role:code=id"
      }
    ]

where:

  • role is a one of the following codes: module, data, test-case or ref-impl
  • code is a simple token by which the IG is known internally
  • id is the NPM package IG of the related package. The id does not have a version

E.g. here's an example:

    "parameter": [
      {
        "code": "related-ig",
        "value": "module:library=hl7.fhir.uv.cds-hooks-library"
      }
    ]

Or in sushi-config.yaml:

parameters:
  related-ig: module:library=hl7.fhir.uv.cds-hooks-library

You can refer content in a related IG using a jekyll statement like this:

{{ site.data.related.[code].link }}

where code is the code defined above. The IG Publisher will replace this link with whatever is the appropriate reference depending on the build circumstances.

For example:

The related IG [{{ site.data.related.code.title }}]({{ site.data.related.code.link }}/index.html) is related because... 

Note that site.data.related.code. has following properties:

  • id: the NPM package id of the IG
  • title: the title of the IG
  • link: the web reference - depends on the build context
  • canonical: the canonical of the IG
  • version: the stated version of the IG

There's two fragments:

  • related-igs-list.xhtml
  • related-igs-table.xhtml

You can include either or both anywhere that suits in the narrative. Here's examples of what they look like:



ID Title Role Version
hl7.fhir.uv.cds-hooks-library CDS Hooks Library module dev

It's not possible for the tooling to automatically figure out what's going on with related IGs when it becomes time to publish - the tooling can't know whether it should reference an existing published version of the related IG, or a version that is yet to be published.

For this reason, you have to specify the intended version for the related IG in your publication request:

    "related" : {
      "library" : "1.0.1"
    }

The publication tooling will determine whether 1.0.1 has been published already, or whether it is yet to be published. If it is not yet published, then the related IG must have a publication-request defined for the nominated version. (This is how two IGs that reference each other can be published - both have publication requests for the version yet to be published, and both nominate the yet to be published version of the other. The publication tooling will sort this out).