This article will describe and include an example of how to embed an external PDF file into an HL7 segment, specifically ADT_A01:2.3.1 OBX(). This can be useful when attempting to insert pictures or other external data into an HL7 message. In this example, the name of the PDF file to be embedded is provided in the incoming HL7 message in OBX(1):ObservationValue field.
The basic stipulations for this example are as follows:
- Accept a PDF file
- Accept an HL7 message
- Using the name of the PDF file, embed the PDF data into the HL7 message
- Output the message to file

Using EnsLib.
.png)
.png)


.png)


