Stream: implementers
Topic: base64Binary answerOptions Extension
Ferenc Takács (Jul 22 2020 at 16:19):
Hi! I'm trying to implement base64 images as part of Questionnaire answerOptions.
I'm thinking on adding an extension somehow to this structure:
"answerOption": [
{
"valueCoding": {
"code": "62855",
"display": "0"
}
},
{
"valueCoding": {
"code": "62858",
"display": "1-3"
}
}
]
Anybody had something similar?
Lloyd McKenzie (Jul 22 2020 at 16:44):
To clarify, your intention is to have a 'picture' for each option? If so, look at the http://build.fhir.org/ig/HL7/sdc/rendering.html#rendering-xhtml. It allows you to specify HTML for the Question text - which can include <img/> tags - which in theory can point to contained Binary resources. (@Grahame Grieve would that meet the requirement of the contained resource being referenced from the container? If not, should it?)
Vassil Peytchev (Jul 22 2020 at 16:51):
Would that mean that <img> tags will have to be post-processed to actually point to the extracted content of the contained Binary resources? Sounds like it is imposing unexpected requirements to the rendering-xhtml extension...
Ferenc Takács (Jul 23 2020 at 07:14):
Thanks for the suggestion! Yes it would be to show a small illustration for each radio option. It should be inline or at least included in the questionnaire itself. The best option so far would be to use rendering-xhtml extension inside valueCoding and just inline the images. Or to use contained Binary resources but then how would I reference them in the answerOptions?
Lloyd McKenzie (Jul 23 2020 at 14:19):
You'd need the HTML extension for sure. Whether you needed the 'contained' Binary depends on whether you embed the data in the <img/> or not. @Joee Garcia Can we add an example of using the XHTML extension with a diagram - ideally one image using a contained binary and one using 'data'?
Joee Garcia (Jul 23 2020 at 16:00):
@Lloyd McKenzie Sure, will work on it.
Last updated: Apr 12 2022 at 19:14 UTC