Pad MRN

  • Creator
    Topic
  • #53187
    Greg Tataryn
    Participant

      I need to pad the MRN coming in on results messages from one system into our HIS. I currently have the following TCL code in the Xlate to pad PID-3.1 with zeroes until it reaches 9 digits long. I feel like this is not the most efficient way to do this but it is working for now. If anyone has a more efficient bit of code it would be appreciated.

      Code:

      set mrn [lindex $xlateInVals 0]
      set mrnLength [string length $mrn]
      while {$mrnLength < 9} { set mrn 0$mrn set mrnLength [string length $mrn] } set xlateOutVals $mrn

    Viewing 0 reply threads
    • Author
      Replies
      • #76857
        Charlie Bursell
        Participant

          set mrn [lindex $xlateInVals 0]

          set xlateOutVals

            ]

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