Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › saving discarded messages › Reply To: saving discarded messages
######################################################################
# Name: charge_route
# Purpose:
# UPoC type: trxid
# Args: msgId = message handle
# Returns: The message’s transaction ID
#
# Notes:
# The message is both modify- and destroy-locked — attempts to modify
# or destroy it will error out.
#
proc charge_route { mh } {
set datList [datlist]
set gh [grmcreate -msg $mh hl7 2.3 cerner23 dft]
set dh0 [grmfetch $gh {0(0).PV1(0).00133.[3]}]
set myent [datget $dh0 VALUE]
set ffour [string range $myent 0 3]
if { [string compare $ffour “MLMI”] == 0 } {
set trxId “LTHS”
} else {
set trxId “HBOC”
}
grmdestroy $gh
hcidatlistreset $datList
return $trxId ;# return it
}
Craig Weldy
Senior Interface Analyst
Beacon Health System
South Bend, In, 46615