Releases: FHIR/sushi
SUSHI 0.4.1
SUSHI 0.4.1 contains the following bug fix:
- Fixes a bug that caused duplicate profiles and/or extensions to be reported in the output count and listed in the ImplementationGuide JSON file. When this bug occurred, IGs might not properly build.
SUSHI 0.4.0 contained the following features and fixes:
- Simplified support for adding extensions to profiles(details below)
- Initial (limited) support for generating Implementation Guides (details below)
- Default output folder changed from
out
tobuild
- Bug fix for applying constraints to extension values
- Reports total number of errors and warnings after processing completes
Simplified support for adding extensions to profiles
Prior to this release, authors could add extensions using the contains
keyword, but they were required to specify the slicing discriminator manually (using the ^
feature). Now when authors add extensions, if no discriminator has been specified already, SUSHI will automatically add a value
-based discriminator on the url
path (unordered and open).
Example:
Profile: Pirate
Parent: Patient
* extension contains ParrotName 0..1
Extension: ParrotName
* extension 0..0
* value[x] only string
Initial (limited) support for generating Implementation Guides (IG)
SUSHI generates implementation guides that can be published via the new template-based IG Publisher. The template-based publisher is still being developed by the FHIR community. See the Guidance for HL7 IG Creation for more details.
To indicate that SUSHI should generate the IG structure and files, add a folder named ig-data
to the folder containing your FSH files (i.e. the "FSH Tank"). If the folder is empty, SUSHI will generate a basic implementation guide using information in your package.json
and FSH files. In this initial release, SUSHI also supports very limited customization of the IG via the following files:
ig-data/ig.ini
: If present, the user-provided igi.ini values will be merged with the SUSHI-generated ig.ini. The FHIR team has not yet fully documented the ig.ini file, but the following example shows the default values for some of the fields that authors may commonly want to override:Possible values for[IG] template = fhir.base.template copyrightyear = 2019+ ballotstatus = STU1 excludexml = No excludejson = No excludettl = No excludeMaps = No
template
arefhir.base.template
,hl7.fhir.template
, andfhir.davinci.template
.ig-data/package-list.json
: If present, the user-provided package-list.json will be used. If not present, SUSHI will generate a package-list.json. See the FHIR PackageList documentation.ig-data/input/pagecontent/index.md
: If present, the user-provided index.md will be used as the content for the IG's main page. If not preset, SUSHI will generate this file and insert thedescription
value from thepackage.json
file.
Future versions of SUSHI will allow authors to configure the menu, add custom resources, and add additional content (such as pages and snippets).
After running SUSHI, navigate to the output folder (default name: build
) and run the _updatePublisher
script to download the latest publisher to the input-cache
folder. After the download is completed, run the _genonce
script to initiate the Java-based IG builder process (NOTE: Java must be installed). After the publishing process is complete, open the output/index.html
file in your browser.
For more details about the template-based IG Publisher, see Using the HL7 Templates.
Install or Update
To install or update to the latest version, run the following command:
$ npm install -g fsh-sushi
SUSHI 0.4.0
NOTE: This version contains a bug that has been fixed in the SUSHI 0.4.1 release. Please use SUSHI 0.4.1.
SUSHI 0.4.0 contains the following features and fixes:
- Simplified support for adding extensions to profiles (details below)
- Initial (limited) support for generating Implementation Guides (details below)
- Default output folder changed from
out
tobuild
- Bug fix for applying constraints to extension values
- Reports total number of errors and warnings after processing completes
Simplified support for adding extensions to profiles
Prior to this release, authors could add extensions using the contains
keyword, but they were required to specify the slicing discriminator manually (using the ^
feature). Now when authors add extensions, if no discriminator has been specified already, SUSHI will automatically add a value
-based discriminator on the url
path (unordered and open).
Example:
Profile: Pirate
Parent: Patient
* extension contains ParrotName 0..1
Extension: ParrotName
* extension 0..0
* value[x] only string
Initial (limited) support for generating Implementation Guides (IG)
SUSHI generates implementation guides that can be published via the new template-based IG Publisher. The template-based publisher is still being developed by the FHIR community. See the Guidance for HL7 IG Creation for more details.
To indicate that SUSHI should generate the IG structure and files, add a folder named ig-data
to the folder containing your FSH files (i.e. the "FSH Tank"). If the folder is empty, SUSHI will generate a basic implementation guide using information in your package.json
and FSH files. In this initial release, SUSHI also supports very limited customization of the IG via the following files:
ig-data/ig.ini
: If present, the user-provided igi.ini values will be merged with the SUSHI-generated ig.ini. The FHIR team has not yet fully documented the ig.ini file, but the following example shows the default values for some of the fields that authors may commonly want to override:Possible values for[IG] template = fhir.base.template copyrightyear = 2019+ ballotstatus = STU1 excludexml = No excludejson = No excludettl = No excludeMaps = No
template
arefhir.base.template
,hl7.fhir.template
, andfhir.davinci.template
.ig-data/package-list.json
: If present, the user-provided package-list.json will be used. If not present, SUSHI will generate a package-list.json. See the FHIR PackageList documentation.ig-data/input/pagecontent/index.md
: If present, the user-provided index.md will be used as the content for the IG's main page. If not preset, SUSHI will generate this file and insert thedescription
value from thepackage.json
file.
Future versions of SUSHI will allow authors to configure the menu, add custom resources, and add additional content (such as pages and snippets).
After running SUSHI, navigate to the output folder (default name: build
) and run the _updatePublisher
script to download the latest publisher to the input-cache
folder. After the download is completed, run the _genonce
script to initiate the Java-based IG builder process (NOTE: Java must be installed). After the publishing process is complete, open the output/index.html
file in your browser.
For more details about the template-based IG Publisher, see Using the HL7 Templates.
Install or Update
To install or update to the latest version, run the following command:
$ npm install -g fsh-sushi
SUSHI 0.3.0
The SUSHI 0.3.0 release adds several new capabilities and fixes:
- Error messages now report the FSH file name and line number related to the error
- Support for
^
syntax to set metadata values in the underlyingStructureDefinition
/ElementDefinition
- Profiles and extensions can now declare parents that are other FSH-defined profiles/extensions
- Preliminary support for slicing (requires discriminator to be manually set using
^
syntax) - Generated
StructureDefinition
renamesid
/path
for type slices on choice elements (best practice) - Bug Fix: Constraining extension
value[x]
usingonly
keyword now works properly - Bug Fix: Generated
StructureDefinition
differential no longer lists unchanged expanded elements - Bug Fix: Syntax errors are now reported (previous version suppressed them)
To install or update this version, run the following command:
$ npm install -g fsh-sushi
SUSHI 0.2.1
This release includes various bug fixes from issues that were noticed in SUSHI 0.2.0.
SUSHI 0.2.0
This release incorporates support for the Fixed Value Rule. This rule allows a user to fix an element to a specific value using the =
operator.
This also fixes a few bugs in the initial 0.1.0 release.
SUSHI 0.1.0
Introducing SUSHI, the world's first compiler for FHIR Shorthand!
This initial release is intended mainly for the development team in order to test that the basic process works as intended. It is limited in features and lacks basic documentation. Basic documentation, as well as at least one more feature, will be added in the coming days.
Current supported features:
- Defining profiles and extensions
- Parents are limited to FHIR resources and profiles defined as part of FHIR
- Cardinality constraints
- Flags (
MS
,SU
,?!
) - Value Set bindings
- Only (e.g. type) constraints (limited to FHIR resources and profiles defined as part of FHIR)
To install SUSHI, first install Node.js, then run:
npm install -g fsh-sushi
After installing fsh-sushi, the sushi
command should be in your path:
$ sushi --help
Usage: sushi <path-to-fsh-defs> [options]
Options:
-o, --out <out> the path to the output folder (default: "out")
-h, --help output usage information
sushi
should be run against a FSH Tank folder containing a package.json
config file and .fsh
files:
$ sushi sushi-0.1.0-fsh-examples
info: Exported 4 profile(s) and 1 extension(s).
An example FSH Tank zip is attached to this release below. It is for demonstration purposes only and needs to be unzipped before running sushi
against it. Note that the example FSH files may use features of FHIR Shorthand that are not supported in this release of SUSHI.