FHIR Chat · sushi: issues with pattern slicing and complex extensions · shorthand

Stream: shorthand

Topic: sushi: issues with pattern slicing and complex extensions


view this post on Zulip Patrick Werner (Feb 04 2021 at 10:34):

I'm trying to create an example Instance of this profile: https://simplifier.net/erezeptabgabedaten/abrechnungszeilen-duplicate-2

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:35):

lineItem.chargeItemCodeableConcept is sliced by pattern, all Codings are 0..1

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:36):

sushi complains about the Coding:

error Cannot assign [object Object] to this element; a different Coding is already assigned: {"system":"http://TA1.abda.de"}.
  File: /Users/patrickwerner/IdeaProjects/shushi-playground/input/fsh/abrechnungszeilen.fsh
  Line: 9

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:37):

http://TA1.abda.de is also a valid system uri from another slice. If i change it to this system, sushi now complains about another system.uri of the 3 slices.

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:39):

https://github.com/patrick-werner/shushi-playground/blob/main/input/fsh/abrechnungszeilen.fsh

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:39):

You can check out the whole project, needed snapshot of profile already included.

view this post on Zulip Patrick Werner (Feb 04 2021 at 10:40):

Second Issue:
This profile uses this Extension: https://simplifier.net/erezeptabgabedaten/zusatzattribute

view this post on Zulip Patrick Werner (Feb 04 2021 at 11:05):

sushi can't find the element:

 The element or path you referenced does not exist: lineItem.extension[http://fhir.abda.de/eRezeptAbgabedaten/StructureDefinition/Zusatzattribute].extension[ZusatzattributFAM].extension[Markt].extension[Gruppe].valueCodeableConcept

view this post on Zulip Patrick Werner (Feb 04 2021 at 11:07):

but this is the correct path (i think)

view this post on Zulip Patrick Werner (Feb 04 2021 at 11:10):

fsh file: https://github.com/patrick-werner/shushi-playground/blob/main/input/fsh/abrechnungszeilen-Extension.fsh

view this post on Zulip Patrick Werner (Feb 04 2021 at 11:11):

git link: git@github.com:patrick-werner/shushi-playground.git

view this post on Zulip Nick Freiter (Feb 04 2021 at 12:47):

It looks like the first issue is some sort of bug, we will need to investigate more to figure out exactly what is going on, but I think you can accomplish what you want by doing this:

* lineItem[0].chargeItemCodeableConcept.coding[PZN] = http://fhir.de/CodeSystem/ifa/pzn#1

For the second issue, it looks like there is no definition available to SUSHI for the http://fhir.abda.de/eRezeptAbgabedaten/StructureDefinition/Zusatzattribute extension. SUSHI needs to have the definition of that extension (and any sub extensions) available, in the same way you've made the Abrechnungszeilen profile available.

view this post on Zulip Patrick Werner (Feb 04 2021 at 13:57):

thanks @Nick Freiter !!!

view this post on Zulip Patrick Werner (Feb 04 2021 at 15:13):

Ok i applied the first work around, works, thanks again @Nick Freiter
I now also included the whole underlying IG (including the Extension in question) as snapshots into the project, still the same error on the extension:

error The element or path you referenced does not exist: lineItem.extension[http://fhir.abda.de/eRezeptAbgabedaten/StructureDefinition/Zusatzattribute].extension[ZusatzattributFAM].extension[Markt].extension[Gruppe].valueCodeableConcept
  File: /Users/patrickwerner/IdeaProjects/shushi-playground/input/fsh/abrechnungszeilen-Extension.fsh
  Line: 10

view this post on Zulip Patrick Werner (Feb 04 2021 at 15:34):

path from the Extension StrucDef: "id": "Extension.extension:ZusatzattributFAM.extension:Markt.extension:Gruppe"

view this post on Zulip Nick Freiter (Feb 04 2021 at 15:58):

It looks like the URL for the first extension may be different from the URL in the StructureDefinition you are loading in. Does this work:

* lineItem[=].extension[http://fhir.abda.de/eRezeptAbgabedaten/StructureDefinition/Extension-Zusatzattribute].extension[ZusatzattributFAM].extension[Markt].extension[Gruppe].valueCodeableConcept = http://fhir.abda.de/eRezeptAbgabedaten/CodeSystem/Zusatzattribut-Gruppe#1

You should also be able to just simply reference the Extension more simply by name:

* lineItem[=].extension[Zusatzattribute].extension[ZusatzattributFAM].extension[Markt].extension[Gruppe].valueCodeableConcept = http://fhir.abda.de/eRezeptAbgabedaten/CodeSystem/Zusatzattribut-Gruppe#1

view this post on Zulip Patrick Werner (Feb 04 2021 at 19:22):

oh the url got changed and i missed it. @Nick Freiter thanks so much again.

view this post on Zulip Patrick Werner (Feb 04 2021 at 19:23):

problem of a mixed Forge/Sushi project. Will convince my client to fully move to sushi.

view this post on Zulip Patrick Werner (Feb 04 2021 at 19:26):

What do you think about giving out a dedicated warning/error if an Instance references something unknown? Instead of reporting the non-existing element, the fact that the referenced StrucDef is missing would be nice and direct people to the causing issue.


Last updated: Apr 12 2022 at 19:14 UTC