Stream: implementers
Topic: Adding a data type to a choice element
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
Michele Mottini (Jun 24 2021 at 15:49):
That's not possible -this list of possible types is fixed
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
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?
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
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