One way you could do this is via an MDM^T02 HL7 message. There is actually an example message containing a PDF document distributed with HealthShare: <install-directory>\Data\Scenario_4.hl7
The document data is encapsulated in a series of OBX segments:
The critical pieces of this are:
OBX-2: Must be "ED" for "Encapsulated Data"
OBX-5.3: Must be the file type. In this case it's "PDF". If you want to view this document in the HealthShare Clinical Viewer, then you can find a list of supported doc types at websys.Document:ValidTypes in the Access Gateway namespace.
OBX-5.4: Must be "Base64" if the data is base64-encoded, otherwise it can be left blank.
OBX-5.5: The document data