Supressing Leading Numbers in PID 3

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Supressing Leading Numbers in PID 3

  • Creator
    Topic
  • #47953
    Victor Ligenza
    Participant

    I have an issue that I was attempting to take care of in an .xlt.  The issue is my Mysis lab system prefixes the facility code to the MR number in the PID 3 field.  What I get is a value of 50999999999.  The 50 being the facility and the 999999999 being a 9 digit MR#, leading zeros are included in the MRN#.  My first thought was to subtract 50000000000 from the PID 3 and place only the resulting MR# in the outbound data.  I dicovered that a @variable in the translation configuration can only by nine digits long.  If I had to write a tcl proc would I have the same limitations.  I have next to no tcl experience so I wanted to know if this would be a problem before I began.

    Thanks in advance for any comments or suggestions.

    Victor Ligenza

Viewing 4 reply threads
  • Author
    Replies
    • #57148
      Charlie Bursell
      Participant

      Put this fragment in with your COPY statement

      set xlateOutVals

        2 end]]

      1. #57149
        Victor Ligenza
        Participant

        Thank you Charlie!!!!!

        I see in your author description you are a clovertech teacher.  Can you recommend an education path to bring someone up to speed on tcl.

      2. #57150
        Charlie Bursell
        Participant

        Get a copy of Bent Welch’s book

        “Practical Programming in Tcl and Tk”

        Brent Welch, Ken Jones and Jeff Hobbs

        4th Edition

        Prentice Hall – ISBN 0-13-038560-3

        Get a copy of TclTutor at

        http://www.msen.com/~clif/TclTutor.html

        Quovadx offers a Tcl Class

        If you have any sort of programming background with any language or scripting,  Tcl is easy to learn.  We can teach you Tcl but we cannot teach you programming.  Most of us were in our second year of college before we could even spell Programmer.

        Charlie

      3. #57151
        Dave Loricchio
        Participant

        Hi,

        I’ve tried putting this fragment with the COPY statement, in the input/output pre-tcl box.  

        set xlateOutVals

          2 end]]

          The code is not stripping off the first two digits of the patient ID.  Do you have any ideas about what I can do?  I know very little about tcl.

          Thanks,

          Dave

        1. #57152
          Kevin Kinnell
          Participant

          Well, the code should strip the first two characters off of any string, so there must be something going on with your xlate.

          Not saving the xlate before I run another test on it is the usual culprit for me. 🙄

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

      Forum Statistics

      Registered Users
      5,117
      Forums
      28
      Topics
      9,292
      Replies
      34,435
      Topic Tags
      286
      Empty Topic Tags
      10