Search code examples
hl7-fhir

FHIR - Patient - How to upload and retrieve patient photo


FHIR Patient Resource has a photo variable:

photo 0..* Attachment Image of the patient

Questions: Are there examples for each: How do upload a patient photo (what format are supported etc). How to retrieve a patient photo?

This post How to Get FHIR Photo for Patient from a URL seems to be old.


Solution

  • Patient.photo is an Attachment which contains Attachment.data, which is a base64Binary. So you just base64 encode the image and set the proper contentType.

    I uploaded you a patient with photo here: http://fhirtest.uhn.ca/baseDstu3/Patient/70691