FHIR Chat · Bundle extension · implementers

Stream: implementers

Topic: Bundle extension


view this post on Zulip Olivia Bellamou-Huet (Apr 10 2020 at 15:13):

Hi everyone, I have a bundle of type collection to contain observations. It seems that a bundle cannot have extensions.
1 - What is the rationale behind this?
2 - How can I then add a flag field (boolean type)? My first thought was to add it as Bundle.myFlag extension but that seems impossible.

view this post on Zulip Lloyd McKenzie (Apr 10 2020 at 15:44):

The Bundle doesn't allow extensions because Bundles don't really have any meaning of their own. If necessary, you can put extensions in Bundle.meta, but first think about why you're assigning meaning to Bundle at all. What are you trying to accomplish?

view this post on Zulip Olivia Bellamou-Huet (Apr 14 2020 at 17:12):

We have an element that gathers a bunch of observations, so we thought of a bundle of type collection. We need to give it a flag for processing. This flag can be changed, therefore I don't think it can be metadata.

view this post on Zulip Lloyd McKenzie (Apr 14 2020 at 17:40):

What sort of processing are you looking for? With Bundles to be processed, you have an option of Batch, Transaction or messaging behavior. You could theoretically also pass a collection Bundle to a custom operation, though it's not clear what the benefits there are for using Bundle vs. just sending your data in Parameters.

view this post on Zulip Olivia Bellamou-Huet (Apr 15 2020 at 07:42):

I mixed up with another bundle, it turns out that this one is of type Message. So we could add the flag as an extension in the MessageHeader. Thank you for you help.

view this post on Zulip René Spronk (May 11 2020 at 10:17):

@Lloyd McKenzie Extending Bundle.meta (??) - AFAIK one cant extend meta..

view this post on Zulip Richard Kavanagh (May 11 2020 at 15:06):

As Meta inherits from Element - and Element allows Extensions, then technically it appears to be valid.
Along the lines of

{
  "resourceType": "Patient",
  "meta": {
    "extension": [
      {
        "url": "http://myextension.com/thingy",
        "valueBoolean": true
      }
    ],
    "profile": [
      "https://api.acme.com/PatientProfile"
    ]
  },
  "name": [
    {
      "family": "Smith",
      "given": [
        "John"
      ]
    }
  ],
  "gender": "male"
}

view this post on Zulip Lloyd McKenzie (May 11 2020 at 19:47):

You can definitely extend Meta

view this post on Zulip René Spronk (May 12 2020 at 06:19):

Hmm, ok. But adding/updating the extension doesn't change the version of the resource, right?.
What would be the impact of adding a ModifierExtension to meta ?

view this post on Zulip Lloyd McKenzie (May 12 2020 at 19:42):

You can't put modifier extensions on complex types unless it's specifically enabled for that type - and Meta isn't one of the types where modifiers is permitted.

view this post on Zulip René Spronk (May 13 2020 at 06:28):

Ah. I missed that constraint on the extensibility page.


Last updated: Apr 12 2022 at 19:14 UTC