PDF decode HL7 Message. Moving from 5.5 to 5.8

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf PDF decode HL7 Message. Moving from 5.5 to 5.8

  • Creator
    Topic
  • #52704
    John Hamilton
    Participant

      I have an inbound HL7 OBX segment with and base64 encoded PDF file in it.

      The code I have pretty basic stuff works fine on 5.5.  

      But taking the same tcl proc and putting in on 5.8.  Gives me nothing but a blank PDF.  I have used the  “fconfigure’ command to change the out put to binary but no glory.

      Any one run into this problem. Or care to share any ideas of what I might try.  I have a case open with Lawson but so far they have come up blank too.

      Here is snip it of the code.

      set RAW_DAT [base64::decode $PDF_ENC]

      set OF_IF [open $FILE_NAME w]        

      fconfigure $OF_IF -translation binary

      puts -nonewline $OF_IF “$RAW_DAT”

    Viewing 3 reply threads
    • Author
      Replies
      • #75204
        Jim Kosloskey
        Participant

          John,

          Have you tried using a flush after the puts?

          Just a thought…

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

        • #75205
          John Hamilton
          Participant

            No I had not.

            But that makes the issue even more intresting.

            I have a stand alone sciprt running the same code. It was producing the same issue. A balnk PDF.   I added the flush to it. It works fine now.

            I say cool. But I changed the TCl proc. Run it in the testing tool and I still get a blank PDF.   Which makes me think it has to be some kinf of File I/O issue.  Rather then an Issue with TCL itself.

            Now what ?

            I do have a close that I see is not in the code above just didnt copy and paste it.

          • #75206
            John Hamilton
            Participant

              Ok here is the solution.

              I need to add the fconfigure command with with the fclose.

              Pretty basic stuff, I should have caught.

              Sometime we look for problems when they are not there.

              Thanks for everyone’s help.

              fconfigure $OF_IF -translation binary

              puts $OF_IF “$RAW_DAT”

              flush $OF_IF

              close $OF_IF

            • #75207
              Dave Scoggins
              Participant

                I know this is an older post but it helped me tremendously as I was having all these same issues.

                Thank you for sharing!

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