Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-28234

SUSHI reorders sliced array elements

    XMLWordPrintableJSON

Details

    • Icon: Comment Comment
    • Resolution: Considered - No action required
    • Icon: Medium Medium
    • Shorthand (FHIR)
    • 0.12.0 [deprecated]
    • FHIR Infrastructure
    • Shorthand Instance Tags [deprecated]
    • SUSHI [deprecated]
    • Hide

      Sushi is not a tool maintained by HL7.  Feedback should be raised on the Shorthand stream on chat.fhir.org.

      Show
      Sushi is not a tool maintained by HL7.  Feedback should be raised on the Shorthand stream on chat.fhir.org.

    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)

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lduncan Luke Duncan
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: