FHIR Chat · Reslicing · shorthand

Stream: shorthand

Topic: Reslicing


view this post on Zulip Igor Sirkovich (Jun 15 2020 at 05:15):

I'm wondering if there is an example of reslicing in any of the FSH-based IGs. I'm trying to follow https://build.fhir.org/ig/HL7/fhir-shorthand/reference.html#reslicing but Sushi returns an error. If I have a "$this" "pattern" slicing in a profile and try to define reslicing on one of the slices in a derived profile, I'm wondering if I should declare ^slicing.discriminator again (for example, if my original slice is based on identifier.type and I need to reslice it based on identifier.system).

view this post on Zulip Chris Moesel (Jun 15 2020 at 13:09):

Hi @Igor Sirkovich. Finding examples of re-slicing (whether by FSH or not) is hard. It doesn't seem to be very common. The FHIR doc on re-slicing isn't totally clear, but I think the general pattern is that you need to declare the re-slicing discriminator on the original slice that you're re-slicing... So, assuming you want to re-slice sliceA from the original slices, you would have something like:

* identifier[sliceA] ^slicing.discriminator.type = #pattern
* identifier[sliceA] ^slicing.discriminator.path = "$this"
* identifier[sliceA] ^slicing.rules = #open
* identifier[sliceA] contains sliceA1 0..1 and sliceA2 0..1
// proceed to define sliceA1 and sliceA2 patterns... etc.

If the original slicing is sliced by pattern on $this and the re-slicing is also sliced by pattern on $this, then I'm not sure how SUSHI will react to you setting a new pattern on the re-slices since they'll already be inheriting the pattern from the original slice. It should be allowed, but SUSHI might bark.... If so, let us know.

view this post on Zulip Igor Sirkovich (Jun 16 2020 at 02:43):

Thank you @Chris Moesel. I will report back once I find time to try this later this week.


Last updated: Apr 12 2022 at 19:14 UTC