FHIR Chat · Mixed IG (xml + fsh): InstanceOf · shorthand

Stream: shorthand

Topic: Mixed IG (xml + fsh): InstanceOf


view this post on Zulip Michaela Ziegler (Mar 25 2021 at 09:22):

We have a mixed IG, that is, we have integrated XML and FSH files. Is it possible to create an FSH-instance that is an instance of the XML-StructureDefinition?
At the moment I get this error:

Sushi: error InstanceOf http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-document not found for referral-min
Alias:   ChOrfDocument = http://fhir.ch/ig/ch-orf/StructureDefinition/ch-orf-document

Instance: referral-min
InstanceOf: ChOrfDocument
Title: "Bundle Referral minimal"
Description: "Example for Bundle"
* type = #document
* etc.

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 10:30):

I remember it is possible.

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 10:30):

(if I am not mistaken)

view this post on Zulip Jose Costa Teixeira (Mar 25 2021 at 10:30):

do you have a repo @Michaela Ziegler ?

view this post on Zulip Michaela Ziegler (Mar 25 2021 at 12:14):

https://github.com/hl7ch/ch-orf (https://github.com/hl7ch/ch-orf/blob/master/input/fsh/EX_Bundle.fsh)

view this post on Zulip Nick Freiter (Mar 25 2021 at 12:48):

This looks like a bug (or at least a lack of a feature) to me. If you move the ch-orf-document up one folder level (so that it is directly in the resources folder, then SUSHI will find it and use it. I've added an issue for us to add support for nested folders like you are using in this IG.

One other thing I did notice is that the ch-orf-document also does not have a snapshot element, and unfortunately SUSHI does require that the resources that are dependencies of FSH definitions do have a snapshot.

view this post on Zulip Michaela Ziegler (Mar 26 2021 at 11:08):

@Nick Freiter Thx for your help.
@Oliver Egger and i have discussed the issue with the snapshot. We think this requirement of sushi unfavourable, as it restricts the use of mixed IGs. because the publisher creates the snapshot of the xml profiles (too late for sushi).

view this post on Zulip Nick Freiter (Mar 26 2021 at 12:50):

To be clear, the snapshot should only be required on a given definition if you are writing FSH that is based on that definition. If SUSHI is generating an Instance or Profile, it needs to know the full snapshot of the StructureDefinition that Instance is an InstanceOf or that Profile has as a Parent, or else much of the validation SUSHI provides, like type checking for example, is not possible.


Last updated: Apr 12 2022 at 19:14 UTC