Need to remove LF on OBX segment

Clovertech Forums Cloverleaf Need to remove LF on OBX segment

  • Creator
    Topic
  • #122069
    Mahmoud Ihaddadene
    Participant

      Hi,

      We are receiving a Base 64 report on an HL7 message but the source are sending on the OBX-5 a Line Feed at the end. He is not able to remove the Line Feed and we want to do it in Cloverleaf . How we can do it in tcl or xlate?

      Thank you in advance

      Mahmoud

       

       

       

      Attachments:
      You must be logged in to view attached files.
    Viewing 3 reply threads
    • Author
      Replies
      • #122071
        David Barr
        Participant

          Do you have an example message? Is the line feed part of the encoded characters, or is it after? Is Cloverleaf decoding the base64 or is it being passed to another system? This should be easy to do in TCL.

        • #122072
          Mahmoud Ihaddadene
          Participant

            Hi David,

            Here is an example (test.txt) . The docode Base64 is done at Cloveleaf level using a tcl script at inbound tps (fonemedDoc.tcl).

            Regards

             

            Attachments:
            You must be logged in to view attached files.
          • #122075
            David Barr
            Participant

              If you’re just decoding the base64 data and not passing it anywhere you may not need to remove the linefeeds. The decode will ignore them, and they shouldn’t affect your field lookups since they are using \r and | as delimiters. If you do want to remove the linefeeds, I think you could do something like this:
              <pre>set msg [msgget $mh]
              set msg [string map { \n “” } $msg]
              set ctr_val [msgmetaget $mh “USERDATA”]
              set segmentList [split $msg \r]</pre>

            • #122076
              Mahmoud Ihaddadene
              Participant

                Thank you David

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.