resending from error database

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf resending from error database

  • Creator
    Topic
  • #49379
    Gary Atkinson
    Participant

      I have some inbound data coming into the engine via tcp-ip.  I want to check the msg for a certain field and send the msg to the error database if the certain field is null (pre-inbound tps).  My delimma is the vendor only keeps his connection up while he is sending data, so I can not re-send these error messages back through translation after the fact.  Is it possible to set-up a inbound fileset thread and route it to a tcp-ip thread?  I’m thinking this will not work, because of the pdl, but thought I would ask anyways  ðŸ˜†

    Viewing 12 reply threads
    • Author
      Replies
      • #61712
        John Hamilton
        Participant

          How are you trying to resend the message? Is it some automated process or is a manual process?  You can resend the message even if the remote system is not connected as long as the thread is running. You may run into a problem with the ACK going back to the remote system.  But if you can send the message post SMS inbound you can avoid that too.

        • #61713
          Gary Atkinson
          Participant

            I have not tried to resend via post inbound tps.  When I have tried pre inbound tps and thread just queues the msg.  The process as of right now is going to be manually as I have not found a way input the data in the field automatically (too many if then this situations).  Thx for the tips….

          • #61714
            Gary Atkinson
            Participant

              This is my first time forcing a message to the error database.  Running the proc through the testing tool, I do not getting any Tcl errors when using a bad msg.  But, if I run a bad message through the engine (inbound pre-tps), where the disposition should return ERROR the metadata shows this:

              Code:

              msgType           : DATA
                      msgClass          : PROTOCOL
                      msgState          : Tcl failure in IB data TPS (201)

              My proc is here:

              Code:

              proc tpsOBR4_check { args } {
                 keylget args MODE mode               ;# Fetch mode

                 set dispList {} ;# Nothing to return

                 switch -exact — $mode {
                     start {
                         # Perform special init functions
                 # N.B.: there may or may not be a MSGID key in args
                     }

                     run {
                 # ‘run’ mode always has a MSGID; fetch and process it
                         keylget args MSGID mh
                         set msg [ msgget $mh ]
                         set segmentList [ split $msg r ]
                         set segment [lindex [ lregexp $segmentList ^OBR ] 0 ]
                         set fieldsep [ string index $msg 3 ]
                         set fieldList [ split $segment $fieldsep ]
                         #puts $fieldList
                         set field [ lindex $fieldList 4 ]
                         puts “OBR field4: nothing $field”
                         if {[ string equal $field {} ]} {
                             keylset userdata DATA “OBR4 is missing a value”
                             msgmetaset $mh USERDATA $userdata
                             set msgdisp “ERROR $mh”
                             #msgdump $mh
                         } else {
                             set msgdisp “CONTINUE $mh”
                         }
                         lappend dispList $msgdisp
                     }

                     time {
                         # Timer-based processing
                 # N.B.: there may or may not be a MSGID key in args
                     }
                     
                     shutdown {
                 # Doing some clean-up work
              }
                 }

                 return $dispList
              }


              Ideas? Suggestions? Thanks in advance….

            • #61715
              John Hamilton
              Participant

                I just pulled this script out added a couple of brackets at the end.

                And it seems to work as expected. Except I get this for the messages that error out.   I’m not sure why it would be different then you outcome.

                14:36:12 [0.0.11339944] P D N 5120   201   1142 conn_1                        

                TPS ERROR disposition

                And no errors in the testing tool.

              • #61716
                Gary Atkinson
                Participant

                  What did you get in the msgState?  I’m thinking it should say pre-inbound tps.

                • #61717
                  John Hamilton
                  Participant

                    No I got “Tcl failure in IB data TPS (201)”

                    But the “msgUserData       : {DATA {OBR4 is missing a value}}”

                  • #61718
                    Michael Hertel
                    Participant

                      Can you post the complete error?

                      I’m thinking that when you return ERROR that this is what is supposed to happen.

                    • #61719
                      John Hamilton
                      Participant

                        clft1@hci – CLFT1: > hcidbdump -e -L -m 12864005 | more

                        msg: 0x3000003c

                           msgType           : DATA

                           msgClass          : PROTOCOL

                           msgState          : Tcl failure in IB data TPS (201)

                           msgPriority       : 5120

                           msgRecoveryDbState: 3

                           msgFlags          : 0x8202

                           msgMid            : [0.0.12864005]

                           msgSrcMid         : midNULL

                           msgSrcMidGroup    : midNULL

                           msgOrigSrcThread  : conn_1

                           msgOrigDestThread :

                           msgSrcThread      : conn_1

                           msgDestThread     :

                           msgXlateThread    :

                           msgSkipXlate      : 0

                           msgSepChars       :

                           msgNumRetries     : 0

                           msgGroupId        : 0

                           msgDriverControl  :

                           msgRecordFormat   :

                           msgRoutes         :

                           msgUserData       : {DATA {OBR4 is missing a value}}

                           msgStaticIsDirty  : 0

                           msgVariableIsDirty: 0

                           msgTimeStartIb    : 1183386564.828

                           msgTimeStartOb    : 1183386564.828

                           msgTimeCurQueStart: 0.000

                           msgTimeTotalQue   : 0.350

                           msgTimeRecovery   : 1183386565.191

                           msgEoConfig       : 0x0

                           msgData (BO)      : 0x30000120

                           message           : ‘MSH|^~&|EPC|TEST5794|1100|HD|20070613094213|JGKYKER|OR

                        M^O01|106|P|2.3|||x0dPID|1|5077259|E2563231^^^^EPC|58133901^^^IDX^MRN|TEST^TEST

                        ER^^^^||19550505|F|UNLIMITED^TEST^^^^~ALIASES^TEST^^^^|X|1 SAND HILL CT^^FRANKSV

                        ILLE^WI^53126^US^^^RACINE|RACINE|(262)555-8484|||S||42030220^^^T|456-84-7979||||

                        |||||||||||||||||||||||||||x0dPV1|||^^^^^^^^||||500008^PROVIDER^ONE^F^^^|||||||

                        |||||5077259642|||||||||||||||||||||||||||||||5077259642x0dIN1|1|42260334|^KELS

                        F|AETNA|PO BOX 981107^^EL PASO^TX^79998-1107^|||||||20070101|||PI|TEST^TESTER^^^

                        ^||19550505|1 SAND HILL CT^^FRANKSVILLE^WI^53126^US^^^|||1||||||||||||||45645484

                        8|||||||Fx0dGT1|1|1000104|TEST^TESTER^^^^||1 SAND HILL CT^^FRANKSVILLE^WI^53126

                        ^US^^^RACINE|(262)555-8484||19550505|F|N|1|456-84-7979||||||||x0dORC|NW|642^EPI

                        C|||||^^^^^Routine||200706130940|||999555777^PROVIDER^ONE^F^^^^U^^^^^N|10080120^

                        ^^1008^^^^^|||||WS0145^WS0145^^10140210^CL CARDIOLOGYx0dOBR|1|642^EPIC||001016^

                        CALCIUM, SERUM^L||20070613|||||N||||BLOOD, VENOU&BLOOD, VENOUS|999555777^PROVIDE

                        R^ONE^F^^^^^^^^^N||7642|||106||||||^^^^^Routine|||||||||20070613|||||||||x0dDG1

                        |1|I9|780.71^CHRONIC FATIGUE SYNDROME^I9|CHRONIC FATIGUE SYNDROME||x0d’

                      • #61720
                        Gary Atkinson
                        Participant

                          Interesting that the engine considers the ERROR return a Tcl failure and causes confusion in novice clovertechers like myself  ðŸ˜•

                        • #61721
                          Michael Hertel
                          Participant

                            Sorry, I meant could you post the complete error info from the process log.

                          • #61722
                            James Cobane
                            Participant

                              It’s interesting; based on the data in the message, it should not be hitting the ERROR database, as there is a value in OBR:4 (001016^

                              CALCIUM, SERUM^L).

                              Jim Cobane

                              Henry Ford Health

                            • #61723
                              Gary Atkinson
                              Participant

                                For a bad message–>

                                Process log shows:

                                Code:

                                msgState          : IB pre-SMS (1)

                                Error database shows:

                                Code:

                                msgState          : Tcl failure in IB data TPS (201)

                              • #61724
                                John Hamilton
                                Participant

                                  I added a line of code in the TCL to force it into error.  

                                  I set the variable to force the error. But you are correct, if I had not added the code it would not have errored out.

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