Skip to content

SUSHI 0.15.0

Compare
Choose a tag to compare
@cmoesel cmoesel released this 24 Jul 20:28
· 525 commits to master since this release
cd8f50d

SUSHI 0.15.0 contains the following enhancements and bug fixes:

  • New sushi --init capability to kickstart a new SUSHI project (#527) (details below)
  • Supports Bring-Your-Own-XML resources (#444) (details below)
  • Supports new Canonical keyword (#519 and #536) (details below)
  • No longer copies hidden files from ig-data (#350)
  • Now removes only certain top-level extensions from parent definitions (#534)
  • Improves error descriptions for parsing errors related to whitespace around symbolic keywords (#318)
  • sushi -v now reports the SUSHI version and the FHIR Shorthand version it implements
  • Fixes bug related to referencing contained inline resources (#525)
  • Fixes bug with using CodeSystems in code definitions within caret rules (#516)
  • Fixes bug with conflicting extension names (#531)

sushi --init

Authors can now run sushi --init to have SUSHI create a new SUSHI project with a default configuration and project structure. This provides a simple way to get started with FHIR Shorthand and SUSHI.

When sushi --init is run, SUSHI will request high-level project information from the user:

Name (Default: ExampleIG): NewIG
Id (Default: fhir.example): my.id
Canonical (Default: http://example.org): http://myid.org
Status (Default: draft): active
Version (Default: 0.1.0): 2.0.0
Initialize SUSHI project in C:\Users\shorty\dev\NewIG? [y/n]: y

These values are used to generate a simple config.yaml file and a corresponding IG-Publisher-compatible folder structure:

NewIG
├── .gitignore
├── _genonce.bat     
├── _genonce.sh           
├── _updatePublisher.bat  
├── _updatePublisher.sh 
├── _gencontinuous.bat 
├── _gencontinuous.sh  
└── fsh
    ├── config.yaml   
    ├── ig-data
    │   └── input
    │       └── pagecontent
    │           └── index.md  
    └── patient.fsh    

From this point on, the author can make modify the config and definitions as necessary.

Bring-Your-Own-XML Resources

Prior to this release, SUSHI already supported Bring-Your-Own-JSON resources. This allowed authors to put their JSON resource definitions into one of the supported ig-data/input resources folders (e.g., ig-data/input/resources, ig-data/input/profiles, ig-data/input/extensions, ig-data/input/vocabulary, etc.) -- and then reference them from their FSH files. This approach can be helpful for projects incrementally transitioning to FSH, or for authors who wish to use other tools for certain resource types (like CapabilityStatements).

Now this same functionality can be used with XML resources. To support this feature, SUSHI leverages Lantana's FHIR.js library to internally translate the XML resources into JSON.

Canonical Keyword

The new Canonical keyword allows authors to indicate that a resource's canonical URL should be used as a value. The Canonical keyword syntax is similar to Reference:

* system = Canonical(MyCodeSystem)

In the example above, the system would be set to the actual canonical URL of the MyCodeSystem resource definition. This is particularly helpful when you need to reference the canonical of a definition in the same IG (otherwise you would have to construct the canonical yourself).

Note that this also supports specifying a particular version (as supported by the canonical type itself):

* system = Canonical(MyCodeSystem|1.2.3)

Full Documentation

For additional documentation, refer to the FSH language reference.

Install or Update

To install or update to the latest version, run the following command:

$ npm install -g fsh-sushi