Details
-
Comment
-
Resolution: Considered - No action required
-
Medium
-
Shorthand (FHIR)
-
0.12.0 [deprecated]
-
FHIR Infrastructure
-
Shorthand Instance Tags [deprecated]
-
SUSHI [deprecated]
-
Description
SUSHI is reordering sliced array values in an example Instance. My specific example is with a Bundle profile with 2 slices on the Bundle.entry array. No matter what I try it puts the MessageHeader in a bundle at the end.
This is how the profile is defined for Bundle.entry:
- entry 2..2
- entry ^slicing.discriminator.type = #type
- entry ^slicing.discriminator.path = "resource"
- entry ^slicing.rules = #closed
- entry ^slicing.ordered = true
- entry contains
PMIRMessageHeaderEntry 1..1 and
PMIRBundleHistoryEntry 1..1
And when I try to create an example using this, I put it in like this (there is more content, but just as an example)
- entry[PMIRMessageHeaderEntry].fullUrl = "http://example.com/fhir/MessageHeader/1"
- entry[PMIRBundleHistoryEntry].fullUrl = "http://example.come/fhir/Bundle/abc"
And the output always puts the MessageHeader last. I tried reversing the order, I tried changing the slice names so the Header came first alphabetically. It always puts the MessageHeader as the second entry in the Bundle. I understand the entry isn't really ordered, but it's odd that SUSHI puts the header last no matter what the input is.