Implementation Guide (IG)
An Implementation Guide is a website of automatically generated and authored content to described what a system provides.
Outcome Examples
Two example outcomes are a user interface wireframe and an Open API Specification (Swagger).
The following section is broken down into the component parts that build the Implementation Guide, but first, here's an overview of getting a template to build on your local machine, based on Windows Subsystem for Linux (WSLv2), Ubuntu 24.04 distribution.
sudo apt-get update && sudo apt-get install -y openjdk-17-jdk jq
# You may chose to install NodeJS from you package manager or binary install
# however, for workstation usage, recommended approach is to use Node Version Manager (NVM)
nvm_latest=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r ".tag_name")
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${nvm_latest}/install.sh | bash
source $HOME/.nvm/nvm.sh
nvm install --lts
nvm use --lts
nvm alias default node
# Use Node Package Manager to install Sushi compiler
npm install -g fsh-sushi
# Jekyll creates the static content website, requires Ruby and C language compilers
sudo apt-get install -y build-essential zlib1g-dev libssl-dev
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
source ~/.bashrc
rbenv install $(rbenv install -l | head -1)
rbenv global $(rbenv install -l | head -1)
# Use the Ruby package manager to install Jekyll
gem install jekyll bundler
# install PlantUML dependency to /opt/local/bin/dot
sudo apt-get install -y graphviz
sudo mkdir -p /opt/local/bin/
sudo ln -s $(which dot) /opt/local/bin/dot
/opt/local/bin/dot --version
This completes pre-requisite provisioning, generate content
# Create a new Implementation Guide
sushi init
Name (Default: ExampleIG): PatientSummary
Id (Default: fhir.example): fsh.ig
Canonical (Default: http://example.org): https://opennz.org
Status (Default: draft):
Version (Default: 0.1.0):
Release Label (Default: ci-build):
Publisher Name (Default: Example Publisher): Open NZ
Publisher Url (Default: http://example.org/example-publisher): https://opennz.org/HealthCare/implementation-guide
Initialize SUSHI project in /home/jules/PatientSummary? [y/n]: y
Downloading publisher scripts from https://github.com/HL7/ig-publisher-scripts
╭───────────────────────────────────────────────────────────╮
│ Project initialized at: ./PatientSummary │
├───────────────────────────────────────────────────────────┤
│ Now try this: │
│ │
│ > cd PatientSummary │
│ > sushi . │
│ │
│ For guidance on project structure and configuration see │
│ the SUSHI documentation: https://fshschool.org/docs/sushi │
╰───────────────────────────────────────────────────────────╯
Install dependencies (only required first time)
cd PatientSummary
./_updatePublisher.sh -y
generate content
./_genonce.sh
Sushi Output
The _getonce wrapper script will first run the Sushi compiler to convert the FSH notation. Questionaire and Capability definitions are included in the Instances count.
Sushi: ========================= SUSHI RESULTS ===========================
Sushi: | ------------------------------------------------------------- |
Sushi: | | Profiles | Extensions | Logicals | Resources | |
Sushi: | |-------------------------------------------------------------| |
Sushi: | | 1 | 0 | 0 | 0 | |
Sushi: | ------------------------------------------------------------- |
Sushi: | ------------------------------------------------------------- |
Sushi: | | ValueSets | CodeSystems | Instances | |
Sushi: | |-------------------------------------------------------------| |
Sushi: | | 0 | 0 | 1 | |
Sushi: | ------------------------------------------------------------- |
Sushi: | |
Sushi: ===================================================================
Sushi: | That was a sea breeze! 0 Errors 0 Warnings |
Sushi: ===================================================================
Static content is available in /output directory, install NodeJS HTTP server to serve the Implementation Guide locally.
npm install http-server -g
cd output
nohup http-server > /dev/null 2>&1 &
cd ..
Open the URL: http://localhost:8080.
For a reference guide to authoring FHIR Shorthand, see FHIR Shorthand Language Basics.
Profiling
The action of selection resources which best fulfill your requirements. The results of this process are definitions.
Resources
Profile samples of specific resource definitions, i.e. can be used to POST to a FHIR Server. The resulting examples can be tested against a local development server docker run -p 8080:8080 hapiproject/hapi:latest.
Instances
The "things" built from one or more definitions. These provide examples in the Implementation Guides.