Question
Muhammad Waseem · Aug 4

How to send PDF/Image as attachment along with FHIR Resource

Hi,

How to send PDF/Image as attachment along with FHIR Resource.

Thanks

 

Product version: IRIS 2021.1
00
1 0 1 102
Log in or sign up to continue

Hi

If you are using the HS FHIR Resource classes in IRIS for Health then you will see that attributes such as Patient.Picture is a BinaryStream. If you are using a BinaryStream you need to convert it into Base64 encoding which generates a stream of characters that do not include any control characters that may cause a JSON or XML parser to think that it has encountered a line terminator. If you look at the FHIR to SDA nd SDA to FHIR data transformations you will see how they Transform the Inbound Stream from Base64 to Binary and from Binary to Base 64 encoding for the outbound SDA to FHIR JSON or XML.