Re: Here’s what we do

#58271
Rich Durkee
Participant

    On each one of the threads that send messages from Cloverleaf to SCM, on the Outbound Tab, Inbound Reply section, we have hcitpsmsgkill in the “TPS Inbound Reply” box.  

    We also have a separate thread that does nothing but receive ACK message from SCM. On SCM you should have configured a HL7ACK_OUT (or similar name) connection. The name you choose is the same as what is in the “Connection Name” in your outbound Communication Processes. Then on Cloverleaf you need a thread that receives these ACK/NAK messages. We write them out to a disk file but it is not necessary to do that. On the Inbound Tab, TPS Inbound Data box we have this proc which sends an ACK back to SCM:

    proc scm_06_ack { args } {

       keylget args MODE mode                      

    switch -exact — $mode {

           start {

               return {}

               # Perform special init functions

               # N.B.: may or may not be a MSGID key

           }        

      run {            

    # ‘run’ mode always has a MSGID; fetch and process it

               keylget args MSGID mh

              keylget args CONTEXT context

                lappend returnlist “CONTINUE $mh”

               if {[cequal $context sms_ib_data]} {

                  set data [echo “6”]

                  set msgob [msgcreate -type reply “^F”]

                       lappend returnlist “OVER $msgob”                echo “$returnlist”

               } else {

                   echo “expected context sms_ib_data; got ‘$context'”            

                 }

               return $returnlist

               }

          shutdown {

    # Doing some clean-up work

           }

           default {

               error “Unknown mode ‘$mode’ in ackg

               return {}

           }

       }

    }

    Rich Durkee

    Genesys Regional Medical Center