Acknowledgements:
This process is documented for HL7 Belgium, with the support of VAZG, RIZIV/INAMI and eHealth
With thanks to Bob Milius for the missing steps, and Grahame Grieve and the FHIR community for the underlying tooling and support.
This process describes a way to publish implementationGuides to its "final" state, i.e. the official release with the necessary redirects and history. This is the procedure used by HL7 Belgium to publish the Belgian FHIR profiles, but can be used by software vendors who wish to publish their specifications online, or other groups. The tooling is in constant improvement and is therefore subject to change.
This process is now automated for local production of the content and will be further automated / integrated with other tools.
To use this, just clone this repository and run the script. Or follow the instructions below.
- Create a folder for your implementation guide publication (all releases of the IG will be in added to that folder, and the folder can be updated to the web server) e.g. Publication
- Download the publisher jar to this folder
- Clone the history template to a folder called fhir-ig-history-template in this folder (or add it as a submodule if you want)
git clone https://github.com/hl7-be/fhir-ig-history-template.git fhir-ig-history-template
You can use other history templates:
git clone https://github.com/openhie/fhir-ig-history-template.git fhir-ig-history-template
git clone https://github.com/HL7/fhir-ig-history-template.git fhir-ig-history-template
git clone https://github.com/IHE/fhir-ig-history-template.git fhir-ig-history-template (soon)
- Add the registry (clone or submodule) submodule to a folder called ig-registry
git clone https://github.com/FHIR/ig-registry.git
5. Copy the IG root folder to a folder called **{ig-root}** e.g. ***my-ig*** under this working folder
- Change the working folder to the IG root folder
example: cd my-ig
7. Create a folder that will be your web root (typically the folder that you will publish to the web)
example: md www
8. Copy history template to web root folder
example: xcopy /s /y ..\fhir-ig-history-template\* www
9. Create a publish.ini in the webroot folder, like this:
[website]
style=fhir.layout
server=apache
url= http://hl7belgium.org/fhir/core
org=HIE
no-registry=1
[feeds]
package=package-feed.xml
publication=publication-feed.xml
Note: the url must be same as the IG's canonical URL
- Change or retain these parameters from the ImplementationGuide:
{ig_id}: ImplementationGuide.id: e.g. be-core
{ig_url}: ImplementationGuide.url: e.g. http://hl7belgium.org/fhir/be-core/ImplementationGuide/be-core
this should take the form {base}/{ig_id}/ImplementationGuide/{ig_id}
{ig_version}: ImplementationGuide.version: e.g. 0.1.0
{ig_package_id}: ImplementationGuide.packageId: e.g. hl7.be.fhir.be-core
{ig_fhir_version}: ImplementationGuide.fhirVersion: e.g. 4.0.1
2. Check the ig filename. Best if it is in the form **{ig\_id}**.json / **{ig\_id}**.xml
- Run the publisher to make sure everything is ok:
java -jar ..\publisher.jar -ig ig.ini
- Create a file called package-list.json in the webroot folder. First, it only includes the current version for CI-build
{
"package-id": "{ig_package_id}",
"title": "Belgium HL7 Core specifications",
"canonical": "{canonical}",
"introduction": "Belgium HL7 Core specifications",
"category": "Research",
"list": [
{
"version": "current",
"desc": "Continuous Integration Build",
"path": {canonical},
"status": "ci-build",
"current": true
}
]
}
Note:
- {canonical} = {base}/{ig-id} e.g.
http://hl7belgium.org/fhir/be-core - make sure there is a category
- Check and/or change these IG parameters:
• {ig_version}
: ImplementationGuide.version: e.g. 0.1.0
• {ig_status}
: ImplementationGuide.status: e.g. draft
• {ig_fhir_version}
: ImplementationGuide.fhirVersion: e.g. 4.0.1
- Do not change:
• {ig_id}
: ImplementationGuide.id: e.g. be-core
• {ig_url}
: ImplementationGuide.url: e.g. http://hl7belgium.org/fhir/be-core/ImplementationGuide/be-core
• {ig_package_id}
: ImplementationGuide.packageId: e.g. hl7.be.fhir.be-core
- Define the following for the new release:
• ig_id
: the IG id, must be the same as {ig_version}
• rel_version
: the version of the IG, must be the same as {ig_version}
• rel_fhir_version
: the version of the IG, must be the same as {ig_fhir_version}
• rel_status
: the publication status (see valueset above)
• rel_desc
: the description of this release
• rel_date
: the date of this release
- Run publication to make sure everything is ok:
java -jar ..\publisher.jar -ig ig.ini
- Run the publisher with -publish option
.\_genonce.bat -publish (base)/(ig_id)/(ig_version)
e.g.
.\_genonce.bat -publish http://hl7-belgium.org/fhir/be-core/0.1.0
- add a list entry to package-list.json
{
"version" = {ig_version},
"date" = {rel-date},
"desc" = {rel-desc},
"path" = {canonical}/{ig_version},
"status" = {rel-status},
"sequence" = ...
"current" = true *
fhir_version = {rel_fhir_version},
changes: (optional link to a page describing changes)
}
example:
{
"version": "0.2.0",
"date": "2021-03-19",
"desc": "Belgium HL7 Core specifications - Release 0.2.0",
"path": "http://hl7belgium.org/fhir/be.core/0.2.0",
"status": "trial-use",
"sequence": "Trial Use 2",
"fhirversion": "4.0.1",
"current": true
}
- Note: Besides the CI build version that should stay the same, only one entry can have "current": true
- Copy the output content to the root folder
xcopy /s /y output <webroot>
e.g.
xcopy /s /y output www
- copy the output content to a folder named after the version
xcopy /s /y output {webroot}\{ig_version}\
e.g.
xcopy /s /y output www\0.2.0\
- Run the publisher in update mode
java -jar ..\publisher.jar -publish-update -folder <webroot> -registry ..\ig-registry\fhir-ig-list.json -history ..\fhir-ig-history-template
e.g.
java -jar ..\publisher.jar -publish-update -folder www -registry ..\ig-registry\fhir-ig-list.json -history ..\fhir-ig-history-template
- Just in case, IF you have a custom template, copy the template’s style files to history (we’ll fix this)
xcopy /s /y <webroot>\assets <webroot>\assets-hist
e.g.
xcopy /s /y www\assets www\assets-hist