Problem with Pathcopy for HL7v2.3 PID-7 Date of Birth

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Problem with Pathcopy for HL7v2.3 PID-7 Date of Birth

  • Creator
    Topic
  • #48264
    thomas chan
    Participant

    1) I did a pathcopy to copy from PID -> PID

    2) I issued a copy operation to blank the birth date in PID-7 if the length is less than 8 (YYYYMMDD); the following shows a part of the Xlate for that copy operation:

    { { OP COPY }

       { ERR 0 }

       { PRE {

           puts

           if {[string length $xlateInVals] != 8} {

               set xlateOutVals “”

           }

           puts

       }}

       { POST {

           puts

       }}

       { IN =200212 }

       { OUT {{0(0).PID.00110.[0]}} }

    }

    3) When I ran a test, I got the followings:

    MESSAGE 1

    ….

    0(0).PID(0).00106(0).[0].[0]  :  >200062< 0(0).PID(0).00108(0).[0].[0]  :  >Irving TEST THE PATIENT LENGTH MediAR< 0(0).PID(0).00108(0).[1].[0]  :  >Am< 0(0).PID(0).00110(0).[0].[0]  :  >20010119< 0(0).PID(0).00111(0).[0].[0]  :  >F< … 4) I even tried to move the pathcopy after the copy operation, then I got this:

    MESSAGE 1

    ….

    0(0).EVN(0).00100(0).[0].[0]  :  >19930603090227< 0(0).PID(0).00106(0).[0].[0]  :  >200062< 0(0).PID(0).00108(0).[0].[0]  :  >Irving TEST THE PATIENT LENGTH MediAR< 0(0).PID(0).00108(0).[1].[0]  :  >Am< 0(0).PID(0).00110(0).[0].[0]  :  >20010119< … 5) If I removed the pathcopy, then my code fragment works. Any ideas why??? [/b]

Viewing 1 reply thread
  • Author
    Replies
    • #58209
      Jim Kosloskey
      Participant

      Thomas,

      When you removed the PATHCOPY, did you COPY 0(0).PID(0).00110(0).[0].[0] from the ib to the outbound, then run the COPY with your snippet?

      By the way, xlateInVals and xlateOutVals are LISTs and should be treated as such in your Tcl code.

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #58210
      thomas chan
      Participant

      Jim,

      Your reponse was helpful. When I treated both xlateInVals and xlateOutVals as lists, using “lindex to retrieve the first element” and “set xlateOutVals {“”}”, that works fine with pathcopy.

      thanks

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

Forum Statistics

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