Originally posted by thomas chan
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 <in_date:$xlateInVals>
if {[string length $xlateInVals] != 8} {
set xlateOutVals ""
}
puts <out_date:$xlateOutVals>
}}
{ POST {
puts <post_date:$xlateOutVals>
}}
{ IN =200212 }
{ OUT {{0(0).PID.00110.[0]}} }
}
...
3) When I ran a test, I got the followings:
<in_date:200212>
<out_date:>
<post_date:20010119>
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:
<in_date:200212>
<out_date:>
<post_date:{}>
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???