› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › resending from error database
msgType : DATA
msgClass : PROTOCOL
msgState : Tcl failure in IB data TPS (201)
My proc is here:
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….
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.
But the “msgUserData : {DATA {OBR4 is missing a value}}”
I’m thinking that when you return ERROR that this is what is supposed to happen.
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’
CALCIUM, SERUM^L).
Jim Cobane
Henry Ford Health
Process log shows:
msgState : IB pre-SMS (1)
Error database shows:
msgState : Tcl failure in IB data TPS (201)
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.