No announcement yet.

Inbound ORU PDF Pointer buried in OBX-5

  • Filter
  • Time
  • Show
Clear All
new posts

  • Inbound ORU PDF Pointer buried in OBX-5

    Hello all,
    I am newbie and what I am trying to do is a little complicated and was wondering how I would create a channel for an inbound ORU with a basic PDF pointer buried in the OBX-5 needing the Base64 encoded option for output.

    However, I have another third party product that needs the text version of the report. Since we cannot have different types of reports coming out of one of our applications for separate destinations we need a hybrid ORU.

    On one side we can have the PDF pointer in OBX-1.5 plus the text version in OBX-2 which we will need in this case (We have up to 163 OBX segments).
    On the normal output I would need to remove all the extra OBX segments and replace it with the Base64 encoded part.

    For the other outbound I think I could just leave it alone, send it out as it comes in.

    Would anyone have any information regarding on how to perform this?
    Last edited by Rubicon; 09-10-2013, 01:32 PM. Reason: Using Mirth Version 2.2.2

  • #2
    Not sure I understand what's meant by PDF pointer.

    If you're looking to create a PDF, it can be done using a Document Writer destination. With DW, create the PDF using an HTML template and then write the PDF to a directory path and/or a base64 encoded attachment. The attachment can be embedded in the original HL7 ORU message (OBX-5 of the last segment is common) using a second destination on the same channel. The ORU will then contain both the text report and the embedded PDF.
    Last edited by jkrebs; 04-22-2020, 04:21 PM.


    • #3
      If PDF pointer is a reference to a directory path of an existing PDF, the below will read a path/PDF filename from OBX-5.1, encode to Base64 and embed the result in OBX-5.2 of the HL7 message:

      OBX Pre-Transformation:
      function encodeBase64(file) {
           var readFile = FileUtil.readBytes(file)
           var encodedFile = FileUtil.encode(readFile)
           return encodedFile
      msg.OBX['OBX.5']['OBX.5.2'] = encodeBase64(msg.OBX['OBX.5']['OBX.5.1'].toString())
      OBX Post-Transformation:
      Last edited by jkrebs; 04-23-2020, 05:21 AM.


      • #4
        Old Thread

        Oops! One for the archives.