Transmitting documents via HL7

Clovertech Forums Read Only Archives Cloverleaf General Transmitting documents via HL7

  • Creator
    Topic
  • #48763
    Mark Perschbacher
    Participant

      I have been trying to get up to speed as far as the most current method of transmitting rtf or pdf documents via HL7, and thought the knowledgable Cloverleaf users might be a good resource to use.  We have an anatomic pathology system that formats its reports in MS Word.  The current result interface output from this system simply dumps the lines of text unformated into OBX segments.  The vendor does have a purchasable option for formatting the text into MIME.  What other options does HL7 offer for imbedding documents, or sending formatted text?

    Viewing 6 reply threads
    • Author
      Replies
      • #59597
        Rick Martin
        Participant

          Hi Mark,

          We successully tested encoding a PDF file into an OBX segment and having the other side unencode it.  We currently do not do this in a live environment, but we did go as far as testing it out.  We used the following xltp in the translate.  The key xlateInVals is the fileName which is read in and Base64 encoded.

          Hope that helps.

          Rick

          Code:


          ######################################################################
          # Name: xltEncodeFile
          # Purpose:
          # UPoC type: xltp
          # Args: none
          # Notes: All data is presented through special variables.  The initial
          # upvar in this proc provides access to the required variables.
          #
          # This proc style only works when called from a code fragment
          # within an XLT.
          #

          proc xltEncodeFile {} {
             upvar xlateId       xlateId
           xlateInList   xlateInList
           xlateInTypes  xlateInTypes
           xlateInVals   xlateInVals
           xlateOutList  xlateOutList
           xlateOutTypes xlateOutTypes
           xlateOutVals  xlateOutVals

             lassign $xlateInVals labCode dataType dataSubType encoding fileName

             set fi [open $fileName r]
             fconfigure $fi -translation {binary binary}
             set en64Var $labCode^$dataType^$dataSubType^$encoding^[encode [read $fi]]
             close $fi

             set xlateOutVals $en64Var

        • #59598
          Jay Yeiser
          Participant

            I have a current interface that embeds RTF into the OBX for a Medical Records Document Storage system.

          • #59599
            Russ Ross
            Participant

              Rick Martin:

              I’m curious as to what would happen if your 64 bit encoding created a one byte character that happened to be the same as one of your HL7 encoding characters like “|” by chance.

              How would you handle that situation?

              Perhaps I’m missing something but I was not aware that encoding would keep this from happening, unless the encoding scheme made an effort to avoid creating specified characters like the HL7 encoding characters.

              This has been one of my concers against moving such files, not to mention the size of the message can be very large.

              My method thus far has been to send a pointer to where the file can be referenced.

              Russ Ross
              RussRoss318@gmail.com

            • #59600
              Jay Yeiser
              Participant

                I have a test RTF transcription report message if anyone would like to see it.  If so, send me your e-mail and I will send the message.  I don’t know if it is appropriate to post sample messages in this forum.

              • #59601
                Rick Martin
                Participant

                  Russ:

                  The Base64 encoding scheme uses the 0-9; A-Z; a-z; and 2 additional characters (typically + and -) to encode the binary file.

                  Rick

                • #59602
                  Lawrence Williams
                  Participant

                    I realize this is an old thread, but I am hoping someone reads this update and can help..

                    I am attempting to encode a pdf file within a translate, could someone provide an example XLT that performs this operation ?

                  • #59603
                    Steve Carter
                    Participant

                      My suggestion would be to endode the PDF in an proc somewhere prior to the xlate and then just map the field through in the xlate.  The reason for this is the binary data could cause issues within the xlate.

                      Let me know if you have more questions.

                      Steve

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