I have to modify couple of patient demographics info and currently I am using tcl procs to accomplish this. for example, to modify patient A/C #, I am using the following code:-
set PID_Seg [getHL7Segment $msg PID]
set Patient_acc [getHL7Field $PID_Seg 18]
set New_Acc [string range $Patient_acc 2 11]
set New_Acc1 [string trimleft $New_Acc 0]
set msg [replaceHL7Field $msg PID 18 $New_Acc1]
This code is working fine for all transactions but when I hit A17 messages, I got obvious errors. Seconod PID instance is all get mixed up.
Does any one know a way to deal with the second instance of PID using tcl code?
Thanks.
Arslan Khan