PDF or XML to HL7

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf PDF or XML to HL7

  • Creator
    Topic
  • #51890
    Sandi Meyers
    Participant

      Before I start chasing my tail… Is there even a possible way in the engine to change a PDF or XML transmission to hl7?

    Viewing 7 reply threads
    • Author
      Replies
      • #72151
        Jim Kosloskey
        Participant

          Sandi,

          PDF – there is no inherent parser for PDF in Cloverleaf – however typically PDF documents are either imbedded in an HL/7 message using a specific OBX Data Type with encoding (typically Base64) – or- by using a refernce pointer Data Type (OBX again typically) to point to the location of the PDF which the receiving system then reads at the location pointed to by the reference pointer.

          For XML, if you have a schema or DTD you can use the Xlate to get data elements from the XML and create an HL/7 message containing those elements in the appropriate HL/7 message event/type structure.

          I would recommend you be Cloverleaf 5.6 or later (later is even better) for XML.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #72152
          David Barr
          Participant

            There are also utilities for converting PDF to text, and you can scrape the text information for fields to put in your HL7.  We use “pdftotext” which is part of the xpdf (link) package.

            We also use pdftk (link) for splitting apart multi-page PDF’s by account.

          • #72153
            Jim Kosloskey
            Participant

              David,

              Isn’t that a command line utility intended to be run against files?

              What if the PDF is transmitted ‘on the fly’ meaning sent via a non file-based protocol?

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #72154
              David Barr
              Participant

                Currently our utilities for PDF processing are called from shell scripts running outside of Cloverleaf. The scripts create HL7 messages in files which are put into directories that Cloverleaf scans using the fileset/local protocol.

                But there

              • #72155
                Robert Denny
                Participant

                  Is there a way to convert an inbound HL7 message into an outbound pdf file. Creating a PDF file for every inbound message?

                • #72156
                  David Barr
                  Participant

                    Sure.  A simple way to do this would be to write fields from the HL7 message to a text file, then use a2ps (from the a2ps package on Red Hat, also available from other sources) to convert to postscript and use Ghostscript with the “pdfwrite” driver to convert postscript to PDF.  You could call these utilities from a TPS proc, then use “msgread” to read the output back into Cloverleaf and route to an outbound thread.

                  • #72157
                    Ryan Boone
                    Participant

                      How would I convert PDF to Postscript via Cloverleaf?

                    • #72158
                      David Barr
                      Participant

                        I think that the latest versions of Ghostscript can take PDF as input, and you can use the “pswrite” driver to output Postscript.

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