On the hl7 side the fields required come in as follows:
PID_13_1(1): phone number
PID_13_1(2): PH
PID_13_2(1): mobile_phone
PID_13_2(2): CP
I have set up an iterate in the Xlate as follows:
Type: Field
Basis: 0(0).pid.00116
Variable: %f1
On the copy Option for the telephone e.t.c I have setup the following:
Source : 0(0).pid.00116(%f1)
Destination: Telephone Number
And the tcl in the translate goes as follows:
set data [lindex $xlateInVals 1]
if {[cequal $data “PH”]} {
set c_phone [lindex $xlateInVals 0]
set xlateOutVals
}
I keep getting the last value in the repeating field , am i going about this the correct way or is there a much easier way. I need to fall out of the iteration when i receive the telecomunication use code i need e.t.c.
Thanks in advance for your help
Ray