- This topic has 3 replies, 3 voices, and was last updated 15 years, 7 months ago by .
-
Topic
-
We are having an issue where sometimes our patient access registrars improperly register an account, and when that happens a MRN does not get generated. Cerner does not accept messages without a MRN so when this happens the connection gets dropped, and can not be restarted until the faulty message is skipped. As a solution I am working on creating tcl code to check each message to insure that a MRN is present in PID-3.1, and if there is not a MRN then I want to kill the message. However, before killing the message I would like to receive an email with the HL7 message in there so that I can notify the appropriate people that a patient isn’t being registered correctly.
This is what I have right now:
if {[cequal $pid_3_1 “”]} {
system “echo “Subject: No MRN is Message\n.” | sendmail
sample@tmcmed.org “lappend dispList “KILL $mh”
return $dispList
} else {
lappend dispList “CONTINUE $mh”
return $dispList
}
I am able to get an email generated, but I am having trouble getting the HL7 message in the email so I am just looking for some help with that portion of the code. Thanks in advance!
- The forum ‘Cloverleaf’ is closed to new topics and replies.