FHIR Chat · Composition with image and a contained Binary · implementers

Stream: implementers

Topic: Composition with image and a contained Binary


view this post on Zulip Rik Smithies (Feb 02 2021 at 19:23):

Composition can have an image that uses data from a Binary.

<td>
   <img src="#imageResource" alt="an image"/>
</td>

Does this have to be a contained resource, and not just another resource in the Bundle? The latter is not mentioned as a possibility and I can't see how it would work.

http://build.fhir.org/narrative.html#id

However a contained resource has to be referenced from the containing, but servers don't seem to be able to detect the image to resource link, and reject it because of constraint dom-3.

view this post on Zulip Lloyd McKenzie (Feb 02 2021 at 19:28):

@Lisa Nelson

view this post on Zulip Rik Smithies (Feb 02 2021 at 19:52):

@Lisa Nelson (Lisa R Nelson) :-)

view this post on Zulip Rik Smithies (Feb 03 2021 at 11:43):

@Ward Weistra the firely server cannot recognise that a contained Binary resource is referenced by its container, either by noticing the "src" link (as above), or by this trick of using a dummy extension

<contained>
    <Binary>
            <id value="imageResource"/>
            <contentType value="image/png"/>
            <data value="iVBORw0-snip-="/>
    </Binary>
</contained>
<!-- If there is a contained resource that is not referenced by its container, servers may reject this.
Servers may not recognise that it is referenced by id, from the text.
This extension ensures there is a reference to the contained Binary that servers can see -->
<extension url="http://example/fhir/extension/dummyValidationReference">
        <valueReference>
              <reference value="#imageResource"/>
        </valueReference>
</extension>

view this post on Zulip Ward Weistra (Feb 03 2021 at 14:09):

@Rik Smithies Thanks for the pointer, let me ask a real Firely Server expert!

view this post on Zulip Christiaan Knaap (Feb 03 2021 at 15:37):

Hi @Rik Smithies : Could you send me the full resource and the http request you're issuing?
Plus the version of Firely Server you're using (or is it the public one, hence currently version 4.0.0)?

view this post on Zulip Rik Smithies (Feb 03 2021 at 15:52):

sent, thanks


Last updated: Apr 12 2022 at 19:14 UTC