I’m new . . . below is a tcl fragment on patient home phone number coming in hl7 and going out to a frl. Sometimes the value out is blank . . . I understand the else portion of the code (building the phone number area code first) but need help understanding the first part of the code. Any help would be greatly appreciated. Thanks, Sarah
set inp [lindex $xlateInVals 0]
if [cequal [string trimleft $inp 0] “”] {
set xlateOutVals “”
} else {
set one [csubstr $inp 1 3]
set two [csubstr $inp 5 3]
set three [csubstr $inp 9 4]
set xlateOutVals “$one$two$three”
}