proc route_by_type data args "] set msg_type [lindex $fields 8] set event [lindex $fields 9] switch "$msg_type^$event" "ADT^A01" # Route to Thread: EHR_ADT_OUT return [list "EHR_ADT_OUT" $data] "ADT^A03" # Route to Thread: PHARMACY_UPD_OUT return [list "PHARMACY_UPD_OUT" $data] default # Send to error queue error "Unhandled message type: $msg_type^$event" $data
return $data When a TCL error command is called or a process crashes, Cloverleaf moves the message to:
$HCI_ROOT/error/<site>/<thread>/
set sql "INSERT INTO inbound_log (mrn, hl7_raw, received_dt) VALUES ('$mrn', '$hl7_text', GETDATE())" hciodbc::exec $conn $sql hciodbc::disconnect $conn
# process_msg.tcl - Basic HL7 logging proc process_msg data args global HCI_ROOT # Extract MSH segment set lines [split $data "\r"] set msh [lindex $lines 0]
proc route_by_type data args "] set msg_type [lindex $fields 8] set event [lindex $fields 9] switch "$msg_type^$event" "ADT^A01" # Route to Thread: EHR_ADT_OUT return [list "EHR_ADT_OUT" $data] "ADT^A03" # Route to Thread: PHARMACY_UPD_OUT return [list "PHARMACY_UPD_OUT" $data] default # Send to error queue error "Unhandled message type: $msg_type^$event" $data
return $data When a TCL error command is called or a process crashes, Cloverleaf moves the message to:
$HCI_ROOT/error/<site>/<thread>/
set sql "INSERT INTO inbound_log (mrn, hl7_raw, received_dt) VALUES ('$mrn', '$hl7_text', GETDATE())" hciodbc::exec $conn $sql hciodbc::disconnect $conn
# process_msg.tcl - Basic HL7 logging proc process_msg data args global HCI_ROOT # Extract MSH segment set lines [split $data "\r"] set msh [lindex $lines 0]