pdf to hl7 message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf pdf to hl7 message

  • Creator
    Topic
  • #50282
    Henry Bauer
    Participant

      I have been tasked with researching whether or not we can convert a pdf document to HL7. Any help would be greatly appreciated.

    Viewing 7 reply threads
    • Author
      Replies
      • #65454

        We use the unix pdftotext utility. Then we convert the resulting text to hl7 using tcl procs, xlates, etc.

        -- Max Drown (Infor)

      • #65455
        Rick Martin
        Participant

          We’ve also Base64 encoded the PDF file directly into an OBX segment using the encode command in a TCL proc and put the encoded string into OBX.5.

          OBX|1|ED|PDF^filename.pdf||

          The other side simply needs to rehydrate the PDF by decoding the data in OBX.5.

        • #65456
          James Cobane
          Participant

            Henry,

            We have several interfaces that send a base-64 encoded .pdf encapsulated in an HL7 message to our EMR system.  This base-64 encoded .pdf file is sent in OBX:5 of an HL7 MDM^T02 message.  We don’t do the actual encoding of the .pdf file (the source systems are doing it), but it is something that you can do within a tcl proc, as Rick indicates.

            Hope this helps.

            Jim Cobane

            Henry Ford Health

          • #65457
            David Harrison
            Participant

              Out of interest, is there anything you can use to do the same thing with a MS Word document?

              Thanks,

              Dave

            • #65458
              Rick Martin
              Participant

                Hi David,

                Our solution works regardless of file type.  It opens the file in binary mode and base64 encodes it.  Here’s a code snippet:

                   set fi [open $fileName r]

                   fconfigure $fi -translation {binary binary}

                   set en64Var [encode [read $fi]]

                   close $fi

                Rick

              • #65459
                Mark McGrath
                Participant

                  Hi Rick,

                   We are beginning to have to convert pdf files to text.  I have read your post about the unix pdftotext utility.  I have gone to the web to try to download but am not sure where/what I need to be able to use this utility.  We are using AIX 5.3.  Where / what do I need to download to be able to use the pdftotext converter.

                  the web site that I think I could use is the following —

                    http://linux.about.com/gi/dynamic/offsite.htm?site=http://www.foolabs.com/xpdf/

                  thanks,

                  Mark

                • #65460
                  Mark McGrath
                  Participant

                    Hi Max,

                     I meant my last post to be for you and not Rick.  Could you please direct me to the proper web site to get the pdftotext utility for unix AIX 5.3.

                    thanks,

                    Mark

                  • #65461

                    I think this is the correct url: http://www.foolabs.com/xpdf/download.html

                    xpdf is the package.

                    You may need to google around if you want AIX binaries. I believe we compiled the package ourselves.

                    -- Max Drown (Infor)

                Viewing 7 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.