Source
0(0).MSH(0).#9(0).[1]
0(0).EVN(0).#1(0)
Destination
0(0).MSH(0).#9(0)
0(0).EVN(0).#1(0)
Based on the two input values, I’ll set the output values; for three values in particular, I”ll change the values, for any other values I’ll basically pass the values through.
PreProc TCL:
set msgtype [lindex $xlateInVals 0]
set evntype [lindex $xlateInVals 1]
echo evntype $evntype
switch $msgtype {
A09 { set msh9 “ADT^A03” ; set evn99 “A03” }
A10 { set msh9 “ADT^A02” ; set evn99 “A02” }
A28 { set msh9 “ADT^A08” ; set evn99 “A08” }
default { set msh9 “ADT^$msgtype” ; set evn99 $evntype}
}
echo msh9 = $msh9
echo evn99 = $evn99
set xlateOutVals
]
echo $xlateOutVals
The echo output looks great, but the output message only has the first field (MSH9) updated – the EVN segment should have field 1 updated, but it remains null. What can I do to get the second Destination field to be updated? Or do I need a second COPY statement?
Thanks, Pete
Command output:
evntype A10
msh9 = ADT^A02
evn99 = A02
ADT^A02 A02
MESSAGE 1
0(0).MSH(0) : >|^~&|CROUSE|CHA8J0|LAB|LACNY|201104271620|J41134/CHPFOPBD|ADT^A02||P|2.3< 0(0).EVN(0) : >||201104271620<
Peter Heggie
PeterHeggie@crouse.org