Change Delimiter From | to ;

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Change Delimiter From | to ;

  • Creator
    Topic
  • #48598
    AmyLBauer
    Participant

      I am trying to replace the “|” delmiter with a “;” via a tcl proc.  I know this can be done in an Xlate but was trying to avoid building one since I didn’t need to so far.  I do not get the desired results when using this command in an outbound or inbound TPS:

      regsub -all — “|” $origMsg “;” NewMsg

      Can someone tell me how to make this change ?

      Thanks.

    Viewing 1 reply thread
    • Author
      Replies
      • #59105
        Robert Kersemakers
        Participant

          Hi Amy,

          Try:

           regsub -all — {|} $origMsg {;} NewMsg

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #59106
          garry r fisher
          Participant

            Hi Amy,

            Robert’s suggestion should work but just to clarify something – if you want to ‘work’ on any of the reserved HL7 characters i.e &^~| then you need to use a backslash – yes this means becomes \.

            Also use the {} braces to delimit your code – it makes it easier to read as well as helping the parser.

            Regards

            Garry

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