Does anybody have the tcl code called tpsFilterBlankHL7Field? I saw it referenced on here but can’t find it. Any help is appreciated. I need to filter out messages with a PID 18 field that is either set to “” or blank.
I have this code in a pre-proc to filter out messages where both the PID-7 and PID-8 are empty. I’m sure there might be an easier/cleaner way but I know this code works.
# Have to find PID
set EMPTY 1
# Get PID segment fields
set PID [split [lsearch -inline -regexp $SEGMENTS {^PV1}] $fldSep]
set PID_7 [split [lindex $PID 7] $subSep]
set PID_8 [split [lindex $PID 8] $subSep]
set Len_PID_7 [llength $PID_7]
set Len_PID_8 [llength $PID_8]
if {($Len_PID_7 < $EMPTY) && ($Len_PID_8 < $EMPTY)} {return KILL}