Dan Drury

Forum Replies Created

Viewing 3 replies – 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: Need some help with split #78123
    Dan Drury
    Participant

      Russ,

      Thank you for your guidance.  

      Having this be the tip of the iceberg is an understatement.  Parsing data from systems that did not normalize name data is quite challenging.  I am going to put your script in place as a stop gap but need to build in the ability to parse out the suffix.

      Your code comments with pattern matching is genius!  Thank  You.

      in reply to: Need some help with split #78119
      Dan Drury
      Participant

        Almost there:  

        If I have the source of:

        “De La Smith, Tommy”

        and I use a preproc tcl of

        set xlateOutVals  [string trim [lindex $xlateInVals 0] ]

        To destination @name1 and @name2 I get

        @name1 =De La Smith

        @name2 = Tommy  (with the leading space)

        I can then apply a preproc tcl of:

        set xlateOutVals  [string trimleft [lindex $xlateInVals 0]]

        With source of @name2 to get rid of the leading space

        My final issue is if @name2 =” Tommy III” I lose the III

        Is there a way to concatenate all elements of a list into a single string, or, specify something other than a blank space as the delimiter of a list?

        in reply to: Trying to convert HL7 TS to human readable date #75758
        Dan Drury
        Participant

          Jim,

          Thank  you for pointing out that xlateOutVals is a list.  with my original tcl I now have a 1 X 3 array of xlateOutVals to play with.  0 = date portion 1 = time portion 2 = AM/PM  (wonder what hat is called in time nomenclature).  I have three variables listed in my destination now, one for each list element and can then use those variables that contain the date, time and day/night portion as needed.

          Thank you for pointing me in the correct direction.

          I now have a source of TS with a tcl preproc of:

          set newDate [regsub — {(d{8})(d{2})(d{2})(d{2})} $xlateInVals {1 2:3:4} ]

          set xlateOutVals [clock format [clock scan $newDate] -f {%m/%d/%Y %H:%M %p}]

          and three variables on the destination to “catch” the date, time and day/night output for use later.

          Thank You,

          Dan Drury

        Viewing 3 replies – 1 through 3 (of 3 total)