I am wondering does anyone has experience dealing with ACK going into Eclipsys Sunrise Clinical Manager (SCM)? We are struggling to build a valid ACK (HL7Raw_ack) to go into SCM.
I have been told that the low level ACK SCM wants back is 0B061C0D
Thanks for any input!
Sam 8)
proc hl7Raw_ack { args } {
global HciConnName
set mode [keylget args MODE]
set context [keylget args CONTEXT]
if { ! [info exists HciConnName] } {
set HciConnName “UNKNOWN_TD”
}
switch -exact — $mode {
start {
return “” ;# Nothing specific
}
run {
set mh [keylget args MSGID] ;# Message header
set msg [msgget $mh] ;# The message
#
# Make sure we are in proper context
#
if {$context != “sms_ib_data”} {
echo “$HciConnName: hl7Raw_ack; wrong context $context”
echo “CONTINUE MESSAGE — NO ACTION TAKEN”
return “{CONTINUE $mh}”
}
#
# Set up defaults
#
set mtype “ACK” ;# Message type
set ack_type “AA” ;# Assume good ack
set send_appl “”
set rx_appl “Cloverleaf”
set send_fac “”
set rx_fac “”
set p_type “P”
set seq_no “”
set rx_ID “”
set version “2.2” ;# assume 2.2
set ack_msg “”
set fldsep “|”
set sepchar “^~\&”
set dttm [fmtclock [getclock] “%Y%m%d%H%M”]
#
# Split the message and get MSH segment
#
set segments [split $msg r]
#
# If valid MSH segment, get data else send NAK
#
set mshseg [lindex $segments 0] ;# MSH segment
set mshname [csubstr $mshseg 0 3] ;# Segment name
if ![cequal $mshname “MSH”] { ;# Invalid MSH
set ack_msg “Invalid MSH segment”
set ack_type “AR”
} else { ;# Valid MSH
set fldsep [csubstr $mshseg 3 1] ;# get field sep char
set mshflds [split $mshseg $fldsep] ;# get MSH fields
set sepchar [lindex $mshflds 1] ;# Sep characters
set send_appl [lindex $mshflds 2] ;# Set send to receive
set rx_appl [lindex $mshflds 4] ;# Set receive to send
set send_fac [lindex $mshflds 5] ;# Set send to receive
set rx_fac [lindex $mshflds 3] ;# Set receive to send
set p_type [lindex $mshflds 10] ;# Set processing type
set rx_ID [lindex $mshflds 9] ;# Message Control ID
set version [lindex $mshflds 11] ;# Version
set seq_no [lindex $mshflds 12] ;# Set sequence number
}
#
# Now build the ACKNOWLEGEMENT message
#
# set ACK “MSH$fldsep$sepchar$fldsep$rx_appl$fldsep$send_fac$fldsep”
# append ACK “$send_appl$fldsep$rx_fac$fldsep$dttm$fldsep$fldsep$mtype$fldsep”
# append ACK “$rx_ID$fldsep$p_type$fldsep$version$fldsep${seq_no}r”
# append ACK “MSA$fldsep$ack_type$fldsep$rx_ID$fldsep${ack_msg}r”
set ACK “x0bx06x1cx0d”
set obMsg [msgcreate -type reply]
msgset $obMsg $ACK
if [cequal $ack_type “AA”] {
return “{CONTINUE $mh} {OVER $obMsg}”
} else {
return “{KILL $mh} {OVER $obMsg}”
}
}
shutdown {
# Doing some clean-up work
}
default {
return “” ;# don’t know what to do
}
}
}