ACK going into Eclipsys Sunrise Clinical Manager

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ACK going into Eclipsys Sunrise Clinical Manager

  • Creator
    Topic
  • #48295
    Rentian Huang
    Participant

      Greetings!!

      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, I tried modified the HL7Raw_ack as attached but it still got rejected.

      Thanks for any input!

      Sam  8)

      Code:

      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
      }
         }
      }

    Viewing 4 reply threads
    • Author
      Replies
      • #58269
        Richard Hart
        Participant

          Sam.

          You should perhaps be looking at the message encapsulation, rather than the message.

          ie PDLS.

          We migrated to iSoft’s version of the original Eclipsys Clinicl Manager and apart from the added ‘features’, I believe that the message communcation should be the same.

          The comms required was for message and ACK, both encapsulated by MLLP.

          ie

          Cloverleaf sends a message and this is encapsulated by the PDL and then sent – the PDL waits for an encapsulated ACK character before returning for a successful delivery.

          This is the PDL we use ‘icm_acknak.pdl’. I based this on the tcp_acknak and mlp_tcp  code. You can get rid of the ‘echo’ commands, we ensure that all our code indicates its revision at thread startup.

        • #58270
          Rentian Huang
          Participant

            Richard,

            Thanks for your reply!

            Frankly, I am still comfused with the PDL you sent. Looks like the only place I would put my ACK proc is in the “TPS Inbound Data” of the Inbound tab, within the IB thread.

            If I use a pdl as you suggested, where should I place it? I am currently using mlp_tcp.pdl with PROTOCOL:pdl-tcpip, for the IB thread. That is mandantory…

            Sam  8)

          • #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

            • #58272
              Rentian Huang
              Participant

                Thanks for your reply Rich!!!

                You are absolutely right, we have the exact setup as you do in TPS Inbound Reply, as well as the thread purely receiving ACK from SCM and HL7ACK_OUT.

                Regarding ob ACK to SCM, from the proc you sent, I can see you are only sending “^F” to SCM?? But I have been told that 0B061C0D is what SCM wants??? Our connection is down at the moment, but I will try your proc as soon as it is UP.

                Also, what is the statement “set data [echo “6″]” doing?

                Again, your help is very much appreciated!!!

                Sam  8)

              • #58273
                Rentian Huang
                Participant

                  Rick,

                  I put your tcl in the TPS Inbound Data box of the IB thread, but looks like it doesn’t work because my IB SMAT kept growing dramatically, since SCM keeps sending the same msgs over and over again until it receives a good ACK.

                  Any idea?

                  Thanks!

                  Sam  8)

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.