Skip to content

SUSHI 1.0.0

Compare
Choose a tag to compare
@julianxcarter julianxcarter released this 13 Nov 19:40
· 460 commits to master since this release
135e348

This is the official, stable SUSHI 1.0.0 release, marking the end of the beta phase for SUSHI 1.0.0. SUSHI 1.0.0 includes full support for FHIR Shorthand 1.0 and a new project structure to better support IG Publisher integration.

New Project Structure

SUSHI 1.0 no longer uses a top-level fsh folder or a nested ig-data folder. Instead, SUSHI 1.0 projects are designed to fit seamlessly within the current template-based IG Publisher project structure. Using SUSHI 1.0:

  • Authors configure SUSHI via /sushi-config.yaml (previously /fsh/config.yaml)
  • Authors put all .fsh files in /input/fsh/* (previously /fsh/*)
  • Authors put all other IG files (ig.ini, package-list.json, menu.xml, pages, etc.) in their normal locations based on current IG Publisher requirements (previously /fsh/ig-data/*)
  • SUSHI generates all outputs to /fsh-generated and clears it before each generation (previously /* and /input/* without clearing old generated files)

This approach has several advantages over the old approach:

  • Project layout and structure is consistent with all template-based IG Publisher projects
  • Existing projects can more easily convert to using SUSHI, even leveraging incremental conversion
  • All source files and generated files are clearly separated, and no longer need to be copied around

For detailed instructions on the new project structure see the SUSHI 1.0 Project Structure documentation.

To migrate an existing SUSHI 0.16.0 project to the new project structure see the SUSHI 1.0 Migration Guide.

Supported Templates

The new SUSHI project structure required that changes be made to the base template in order to find and use files in the /fsh-generated folder. Currently, these changes are only in the #current version of the base template, so your project's /ig.ini MUST specify a template that is based on fhir.base.template#current. For now, any of the following should work:

  • fhir.base.template#current
  • hl7.base.template#current
  • hl7.fhir.template#current
  • hl7.davinci.template#current
  • hl7.cda.template#current

Once the base template has been officially released with these changes, you will be able to use a locked version of a template again.

Deprecated Features

SUSHI 1.0.0 deprecates several features found in SUSHI 0.16.0. These features were deprecated based on feedback from the FHIR Core team and SUSHI users, as well as to provide a cleaner, more consistent approach to developing IGs.

  • The template property in the SUSHI configuration is no longer supported. Authors should manage the /ig.ini file directly.
  • The history property in the SUSHI configuration is no longer supported. For now, authors should manage the /package-list.json file directly, but further guidance may come from the FHIR Core team in the future.
  • The /input/ignoreWarnings.txt file is no longer generated by SUSHI. Authors should manage this file directly.
  • The /_updatePublisher, /_genonce, and /_gencontinuous scripts are no longer generated by SUSHI. If you wish to use these scripts, you can always download the latest versions from the sample-ig repository. (NOTE: sushi --init will download these automatically if you use it to initialize a new project).
  • The external keyword for menu URLs in config.yaml is no longer supported since the IG Publisher now detects external links and automatically inserts an external link icon.

Legacy Projects

SUSHI 1.0.0 continues to support "legacy" projects (i.e., projects not using the new file structure). In these cases, the behavior should be the same as in SUSHI 0.x, with one caveat: SUSHI will not generate the publisher scripts even for legacy projects.

If SUSHI detects that you are using a legacy project format, it will issue a warning that you should update your project to the new project structure. Support for legacy projects will be removed in a future version of SUSHI.

HL7 IG Auto-Builder

Currently, the HL7 IG Auto-Builder uses the most recent official version of SUSHI. This means that all projects will now build using SUSHI 1.0.0 by default. We do not anticipate this causing any issues due to SUSHI's support of legacy project structures. If you absolutely must continue using the pre-1.0.0 SUSHI, you can affect the version of SUSHI that the IG Publisher uses by providing a fsh.ini file at the root of the project with the following contents:

[FSH]
sushi-version=0.16.0

Additional Changes
In addition to the changes to project structure and configuration, SUSHI 1.0.0 includes the following changes and bug fixes:

  • Fixes SUSHI incorrectly counting the minimum cardinality on sliced elements (#659)
  • If SUSHI is run against a directory with no FSH files but the directory has a config.yaml file, SUSHI will not exit early.
  • Fixes bug with using ad hoc extensions on nested paths in instances (#621)
  • Fixes bug with cardinality min value of choices when type slicing is used (#596)
  • Fixes bug with finding slices of choice slices (#593)
  • Supports setting the resource description in the generated ImplementationGuide on conformance and terminology resources only (#629)
  • Avoids generating a duplicate resource when a resource is provided in input and defined in FSH (#623)
  • Correctly extracts SUSHI configuration information from a provided ImplementationGuide resource (#635)
  • Skips the processing of XML files that appear to be spreadsheets (#638)
  • Fixes a bug where SUSHI specific comments were appended to input files (#626)
  • Fixes a bug that allows uses the current working directory as the input directory if is not specified (#627)
  • Resets the errors and warnings in between invocations of fshToFhir (#625)
  • Allows (and ignores) non-JSON/non-XML files in input/* resource folders (#641)
  • Fixes ambiguous identifier in error message about duplicate resources (#642)
  • Fixes bug that overwrote a Quantity value when a unit was set in a subsequent rule (#608)
  • Fixes handling of MS flag when applied to sliced elements and/or slices (#647)
  • Fixes assignment to Quantity specializations (e.g., Age) using FSH quantity syntax (#617)
  • Merges Mapping rules when a matching Mapping already exists on the parent resource (#657)
  • Exports _-prefixed properties (e.g., extensions on primitives) directly after their non-_ counterparts (#632)
  • Changes config.yaml's group keys to represent id rather than name, allowing name to be set independently (#646)
  • Emits an error if an inline extension is defined on a profile since this is disallowed by the IG Publisher (#591)
  • Supports new instance-name and instance-description extensions to set example resource metadata in the generated IG (#654)

Full Documentation

For additional documentation, refer to FSH School's SUSHI 1.0 documentation and/or the FSH specification.

Install or Update

To install or update to this release, run the following command:

$ npm install -g fsh-sushi

To revert to a previous stable release, run a command like the following:

$ npm install -g [email protected]

To check or confirm what version of SUSHI you have installed, you can run the following command:

$ sushi -v