SUSHI / IG Publisher Integration and Configuration

FHIR Connectathon 24: May 13 – 15, 2020

Chris Moesel Mark Kramer Principal Systems Engineer Chief Engineer for Health Technical Center MITRE Corporation MITRE Corporation

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International FHIR Shorthand and SUSHI Team

Julia Afeltra Nick Freiter Mint Thompson Mark Kramer Chris Moesel

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Using SUSHI 0.12.x Standalone

Build Outputs Build Inputs sushi . -o build

• Users can specify input and output paths

• If sushi is run with no arguments, defaults to: • Input path: . (current folder) • Output path: build

• To run IG Publisher, either: • Run it from inside output folder (e.g., build) • Copy output files to separate project folder

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Using SUSHI 0.12.x For IG Publisher Auto Build

Build Inputs If the IG Publisher detects a fsh subfolder, Build Outputs it automatically runs SUSHI for you! sushi fsh -o .

• A fsh subfolder triggers IG Publisher compliant defaults: • Input path: fsh • Output path: . (current folder)

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Current Architecture – Simplest Use Case

Before SUSHI After . . └── fsh ├── fsh ├── ig-data │ └── (all sources still exist here too) │ └── (empty) ├── ig.ini ├── package. GENERATE w/ defaults ├── input ├── myfile1.fsh │ ├── ImplementationGuide-hl7.fhir.myig.json └── myfile2.fsh │ ├── includes GENERATE │ │ └── menu. │ ├── pagecontent │ │ └── index.md │ ├── profiles │ │ └── StructureDefinition-my-patient.json │ └── vocabulary │ └── ValueSet-my-valueset.json └── package-list.json

The Good The Bad The Ugly SUSHI handles all IG source files SUSHI handles all IG source files Very limited control over IG JSON file Provides a QUICK start for users Some generated files are only placeholders © 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Current Architecture – Recommended Use Case

Before SUSHI After . . └── fsh ├── fsh ├── ig-data (optional) │ └── (all sources still exist here too) │ ├── ig.ini ├── ig.ini │ ├── input COPY ├── input │ │ ├── includes │ ├── ImplementationGuide-hl7.fhir.myig.json │ │ │ └── menu.xml │ ├── includes │ │ └── pagecontent │ │ └── menu.xml │ │ └── index.md │ ├── pagecontent │ └── package-list.json GENERATE w/ defaults│ │ └── index.md ├── package.json │ ├── profiles ├── myfile1.fsh │ │ └── StructureDefinition-my-patient.json └── myfile2.fsh GENERATE │ └── vocabulary │ └── ValueSet-my-valueset.json └── package-list.json

The Good The Bad The Ugly SUSHI builds entire IG JSON file SUSHI builds entire IG JSON file Very limited control over IG JSON file Early adopters are used to it Duplicate files and folder names Overwrites any files already in target folder © 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: ImplementationGuide The config. file can control all of the properties in ImplementationGuide

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: IG Resource List The Implementation Guide “resource” list is populated using FSH definitions

… and optionally modified or appended in config.yaml

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: IG Page List The ImplementationGuide “page” list can be populated using pagecontent files

… or discreetly defined in config.yaml

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: ig.ini The ig.ini file can optionally be generated using config.yaml

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: menu.xml The menu.xml file can optionally be generated using config.yaml

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International SUSHI Configuration Beta: package-list.json The package-list.json file can optionally be generated using config.yaml

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Beta Architecture – Multiple Config Files Use Case

Before SUSHI After . . └── fsh ├── fsh ├── ig-data (optional) │ └── (all sources still exist here too) │ ├── ig.ini ├── ig.ini │ ├── input COPY ├── input │ │ ├── includes │ ├── ImplementationGuide-hl7.fhir.myig.json │ │ │ └── menu.xml │ ├── includes │ │ └── pagecontent │ │ └── menu.xml │ │ └── index.md │ ├── pagecontent │ └── package-list.json GENERATE │ │ └── index.md ├── config.yaml │ ├── profiles │ │ │ └── StructureDefinition-my-patient.json │ │ └── vocabulary │ │ └── ValueSet-my-valueset.json │ GENERATE └── package-list.json ├── myfile1.fsh └── myfile2.fsh

The Good The Bad The Ugly User has more control of IG JSON Duplicate files and folder names Copies overwrite files already in target folder

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Beta Architecture – Master Config File Use Case

Before SUSHI After . . └── fsh ├── fsh ├── config.yaml │ └── (all sources still exist here too) │ GENERATE ├── ig.ini │ ├── input │ GENERATE │ ├── ImplementationGuide-hl7.fhir.myig.json │ │ ├── includes │ GENERATE│ │ └── menu.xml │ │ ├── pagecontent │ GENERATE│ │ └── index.md │ │ ├── profiles │ │ │ └── StructureDefinition-my-patient.json │ GENERATE │ └── vocabulary ├── myfile1.fsh GENERATE │ └── ValueSet-my-valueset.json └── myfile2.fsh └── package-list.json

The Good The Bad The Ugly User has more control of IG JSON May have duplicate files & folders Generated files overwrite files in target folder All config-related info in one place SUSHI tightly coupled w/ pub files SUSHI may be “over-stepping” its boundaries © 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Potential Future Architecture

Before SUSHI After . . ├── ig.ini ├── ig.ini ├── input ├── input │ ├── ig.yaml or ig.fsh │ ├── ig.yaml or ig.fsh │ ├── includes GENERATE w/ minimal processing │ ├── includes │ │ └── menu.xml │ │ └── menu.xml │ ├── pages │ ├── pages │ │ └── index.md │ │ └── index.md │ ├── profiles │ ├── profiles │ │ └── myfile1.fsh │ │ └── profiles.fsh │ └── vocabulary │ └── vocabulary │ └── myfile2.fsh │ └── terminology.fsh └── package-list.json ├── package-list.json GENERATE └── temp └── sushi ├── ImplementationGuide-hl7.fhir.myig.json ├── StructureDefinition-my-patient.json └── ValueSet-my-valueset.json The Good More Good The Tradeoffs Same Structure as non-FSH projects Clean separation of source & out User responsible for multiple config files User has full control of IG JSON No more duplicate files/folders! Requires new IG Publisher development © 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Resources FHIR Shorthand • Documentation: http://hl7.org/fhir/uv/shorthand/2020May/index.html

SUSHI 0.12.x • Release Notes: https://github.com/FHIR/sushi/releases/tag/v0.12.6 • Documentation: http://hl7.org/fhir/uv/shorthand/2020May/sushi.html • Install or Update: npm install -g fsh-sushi

SUSHI 0.13.x BETA • Release Notes: https://github.com/FHIR/sushi/releases/tag/v0.13.0-beta.1 • Documentation: http://build.fhir.org/ig/HL7/fhir-shorthand/branches/beta/sushi.html • Install or Update: npm install -g fsh-sushi@beta

Talk to us on chat.fhir.org: #shorthand

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International Discussion

© 2020 The MITRE Corporation. All rights reserved. Approved for Public Release 19-3439. Distribution Unlimited. HL7®, FHIR® and the flame design mark are the registered trademarks of Health Level Seven International