Stream: shorthand
Topic: Example Extraction
Keith Boone (Apr 25 2020 at 19:42):
Some of the example resources I'm building also include examples of extensions or other profiles (of data types). Is there a way to easily mark those as examples for the extensions / profiles, or to extract them as examples. Some of my examples are so buried in slices that it's somewhat challenging from my perspective to figure out how to turn them into a simple example.
Chris Moesel (Apr 26 2020 at 03:06):
If I understand your question correctly, I think you want to create Instance
s where the InstanceOf
is an extension or a profile of a datatype (not a resource). And then to be able to include those instances inline in other examples. This is almost possible now that we support the #inline
usage -- but I think that SUSHI currently only supports Instance
s where the InstanceOf
is a resource or profile of a resource. If you tried to do InstanceOf
and extension or datatype, it might partially work -- but it will likely slap a resourceType
field on it and maybe a meta.profile
field as well. So... this is something we'll need to address.
Keith Boone (Apr 26 2020 at 04:04):
No, it's more like, if I create an example resource, AND it uses an extension or datatype profile declared elsewhere in my IG, Sushi would be smart enough to identify this particular situation, and with little or NO extra work on my part, make what I've already given as an example elsewhere for a whole resource as an Example for the extension or profile. More than two lines of SUSHI text is more work than I want to provide (he whines).
Matt Sargent (Apr 28 2020 at 19:32):
@Chris Moesel
but I think that SUSHI currently only supports Instances where the InstanceOf is a resource or profile of a resource.
Does this mean that something like this is not currently supported since Identifier is not a Resource?
Instance: SpecificIdentifierInstance
InstanceOf: Identifier
Title: "Example Identifier"
Usage: #example
* value = "ID12345"
* extension.valueBoolean = true
* extension.url = "http://a-url-to-use"
Instance: ExamplePatientInstance
InstanceOf: Patient
Title: "Example Patient"
* identifier = SpecificIdentifierInstance
Nick Freiter (Apr 28 2020 at 20:01):
You're correct, that is currently not supported. If you try that on the latest release of SUSHI (0.12.3), you should see an error along the lines of:
Instance SpecificIdentifierInstance of type Identifier is not an Instance of a Resource or Profile of a Resource. Only Instances of Resources or Profiles of Resources may be assigned to other Instances.
to indicate that it isn't allowed. This is something we are planning on adding support for, and you are now one of a few users who have bumped into this, so we will give higher priority to supporting this.
Matt Sargent (Apr 28 2020 at 20:24):
Thanks @Nick Freiter. Wish we would have been on 0.12.3 since that error is much more helpful than the one we were seeing in 0.11.1. Thank you for your help!
Last updated: Apr 12 2022 at 19:14 UTC