here’s my current tcl filter:
keylget args MSGID mh
set msg [msgget $mh]
set segments [split $msg r]
set pv1_loc [lsearch -regexp $segments “^PV1”]
set pv1_seg [lindex $segments $pv1_loc]
set pv1_fld10 [lindex [split $pv1_seg |] 10]
set pv1_fld44 [lindex [split $pv1_seg |] 44]
if {[regexp {ED} $pv1_fld10]} {
lappend dispList “CONTINUE $mh”
} else {
lappend dispList “KILL $mh”
}
I’m told it let the following message through:
MSH|^~&|REG|SACH||SACH|20060615112149||ADT^A08|20607|D|2.3|
EVN|A08|20060615112149|||SHW
PID|||070580||TEST^SRX2^^^^||19810101|F||W|525 PARK PL^^HACKENSACK^NJ^
07601^^|||||||3931755|555-01-0181|||O|||||||||
PV1||I|2ND^210^1|3|||415^PATEL^SAMIR^^^|||MED||||1|||415^PATEL^SAMIR^^
^|MED|541|BCHMO|||||||||N||||||||||||A|||20060615070000||||||
PV2||S||||||||||||||||||||||A|||||||||||||
DG1|000||401.0^MALIGNANT HYPERTENSION^I9|||A|||||||||||
ZOR||||
Is it seeing the ED in MED and letting it go because of that? How can I specify exactly ED?
Thanks much!!