I am trying to create a tcl script that would only go to PID 5_3 field and remove any quotes.
Below is my proc, when I run this proc it removes quotes throughtout the whole message. I really want it to remove it just from the PID 5_3 or the patient name suffix field
Thank you very much for the help
Yamil
proc remove_singlequotes { args } {
set mode [keylget args MODE] ;# What mode are we in
set context [keylget args CONTEXT] ;# What mode are we in
switch -exact — $mode {
start {
return “” ;# Perform special init functions
}
run {
keylget args MSGID mh
set msg [msgget $mh]
regsub -all — {x22} $msg {} new_msg
#
# replace msg by new_msg
msgset $mh $new_msg
set returnList “{CONTINUE $mh}”
return $returnList
default {
echo “Unknown mode in
return “” ;# Dont know what to do
}
}
}
}