Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where to add binary resources? #19

Open
joofio opened this issue Oct 21, 2023 · 4 comments
Open

where to add binary resources? #19

joofio opened this issue Oct 21, 2023 · 4 comments

Comments

@joofio
Copy link
Collaborator

joofio commented Oct 21, 2023

how do we link them to the main resources besides the composition?

if nowhere, where do we add those resources in the composition? thoughts on this?
tagging @jkiddo and @cander2 at least.
Feel free to tag someone else.

@jkiddo
Copy link
Collaborator

jkiddo commented Oct 22, 2023

I suggest to have a binary as part of the bundle - not composition. Then have a document reference referenced from the composition and have the document reference referencing the binary

@cander2
Copy link
Collaborator

cander2 commented Oct 22, 2023

That's what I originally wanted but apparently we need to incorporate them into the Composition.
https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Getting.20base64.20images.20to.20display.20in.20IG

In summary, the FHIR document specification requires us to put them in the Composition in a element and then you have the with the reference value.

    <contained>
      <Binary>
        <id value="imageResource" />
        <!-- example format -->
        <contentType value="image/png" />
        <!-- data is base 64 encoded, actual bytes of the image png file -->
        <data value="Base64 Content here" />
      </Binary>
    </contained>
    <!-- this extension is necessary per image -->
    <!-- Image 1-->
    <extension url=http://ema.europa.eu/fhir/extension/dummyValidationReference>
      <valueReference>
        <reference value="#imageResource" />
      </valueReference>
    </extension>

Then add the following wherever you want the image to appear:

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

@cander2
Copy link
Collaborator

cander2 commented Oct 22, 2023

I would prefer to have the Binary as a separate resource in the Bundle and then the Composition cross-references to it. Doesn't look like that is allowed though.

@cander2
Copy link
Collaborator

cander2 commented Oct 22, 2023

Can add this to the list of things to update in the coming IG update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants