Is there a way to create a pre proc TCL that would remove semi colons from any OBX starting from field 5 onward. Below is the code I have, I am able to put all the OBX segments into a list but I am not able to remove semi colon starting from field 5 onward with out effect the fields before.
Note that this character is the subfield delimiter for the sending system HL7 messages.
#Note: $segid = OBX
set i 0
set segmentList [split $msgdata r]
foreach segment $segmentList {
if [cequal [csubstr $segment 0 3] $segid] {
lappend segment3 $segment
}
incr i
}
set b [regsub -all {x3b} $segment3 {}]
Thanks in advance for any help provided.
Yamil