FHIR Chat · Adding a data type to a choice element · implementers

Stream: implementers

Topic: Adding a data type to a choice element


view this post on Zulip Linda (Jun 24 2021 at 13:28):

I am sure this has been asked before but I can't find it. Can someone point me to an example or documentation or prior message on how to add a data type to a choice element. We want to adopt valueAttachment from R5 Observation.value into our R4 version. ThanQ

view this post on Zulip Michele Mottini (Jun 24 2021 at 15:49):

That's not possible -this list of possible types is fixed

view this post on Zulip Eric Haas (Jun 24 2021 at 15:54):

you use it as an extension in R4. See this "Extensions for converting between versions"
http://hl7.org/fhir/versions.html#extensions

view this post on Zulip Linda (Jun 24 2021 at 16:26):

Little confused by the two responses. Do I just add an extension to the backbone in R4 if I can't add to choice element?

view this post on Zulip Michele Mottini (Jun 24 2021 at 18:07):

Yes, you add the extension http://hl7.org/fhir/5.0/StructureDefinition/extension-Observation.valueAttachment` to Observation - but for clients that do not know how to process that (most/all of them?) you end up with an Observation without a value, so don't know if it is a very good solution

view this post on Zulip Elliot Silver (Jun 24 2021 at 20:27):

@Linda , alternatively, if you are using R4, look at Media. This is sort-of an Observation where the content is a file. Note that this resource goes away in R5 because Observation gained valueAttachment, so that's something to consider. Another option might be DocumentReference.


Last updated: Apr 12 2022 at 19:14 UTC