SUSHI 2.2.0 includes the following enhancements and bug fixes:
- Allow authors to control if instances should serialize the
meta.profileand/orid(#844) (details below) - Allow authors to provide instances of logical models (#941) (details below)
- Allow authors to insert RuleSets at concept paths in CodeSystem definitions (#942)
- Allow authors to specify mappings for logical models and custom resources (#940)
- Allow authors to use string values for all ValueSet filter operators (#936)
- Provide more details and optional configurations in sushi --init config file (#944)
- Limited support for validating codes defined in local code systems (#595)
- Limited support for validating slicing logic in profiles (#885, #952)
- Clarify error message regarding attempts to "widen" cardinality (#943)
- Fix id generation bug on manually sliced choice elements (#927)
- Fix dependency loading bug for dependence with version "current" (#951)
Allow Authors to Control if Instances Should Serialize the meta.profile and/or id
By default, SUSHI always generates an instance id and the meta.profile property (for instances of profiles). Now authors can control this by specifying an instanceOptions configuration property in sushi-config.yaml. This configuration allows setMetaProfile and setId sub-properties.
The setMetaProfile value controls whether or not meta.profile is set on generated instances. It can have the following values:
always: Set meta.profile for all Instances of profiles (default)never: Do not set meta.profile on any Instancesinline-only: Set meta.profile for only Instances of profiles with Usage set to #inlinestandalone-only: Set meta.profile for only Instances of profiles where Usage is any value other than #inline
The setId value controls whether or not id is set on generated instances. It can have the following values:
always: Set id for all Instances (default)standalone-only: Set id for only Instances where Usage is any value other than #inline
The setId flag can't have an inline-only or never option, because the IG Publisher requires ids for non-inline instances.
Allow Authors to Provide Instances of Logical Models
A recent version of the IG Publisher added support for including instances of logical models as binary resources. This feature was announced and discussed in a Logical Model Examples thread on chat.fhir.org. The basic steps an author needs to take in order to include logical model examples in a SUSHI project are:
- Add the example to the
input/resourcesorinput/examplesfolder
a. The file name of the example should beBinary-{id}.jsonorBinary-{id}.xml(substituting{id}for the real id) - Add an entry for the example in the
sushi-config.yamlresourcesproperty
a. Specify aname
b. SpecifyexampleCanonicalpointing to the canonical of your logical model
c. Add an extension w/ the proper resource format (application/fhir+jsonorapplication/xml)
For example, given the following simple logical model definition in an IG w/ IG canonical root http://example.org:
Logical: MyLM
Id: MyLM
Title: "My LM"
Description: "This is mine"
* important 1..1 SU boolean "Is this resource important"
Create the file input/examples/Binary-my-logical-example.json:
{
"resourceType": "MyLM",
"id": "my-logical-example",
"important": true
}And add the following in your sushi-config.yaml:
resources:
Binary/my-logical-example:
extension:
- url: http://hl7.org/fhir/StructureDefinition/implementationguide-resource-format
valueCode: application/fhir+json
name: Example of LM
exampleCanonical: http://example.org/StructureDefinition/MyLMThis will result in your logical model example being listed and displayed as a proper example of the logical model.
NOTE: This does not allow/support using the Instance keyword for creating examples of logical models. Authors must created the example as raw JSON or XML. Support for the Instance keyword may come in future versions of SUSHI.
Full Documentation
For additional documentation, refer to FSH School's SUSHI documentation, the FSH STU1 specification, and/or the FSH current build specification.
Install or Update
To install or update to this release, run the following command:
$ npm install -g fsh-sushiTo revert to a previous stable release, run a command like the following:
$ npm install -g fsh-sushi@2.1.1To check or confirm what version of SUSHI you have installed, you can run the following command:
$ sushi -v