HLTP2 ;AISC/SAW-Transaction Processor Module (Cont'd) ;2/22/95 11:35
;;1.6;HEALTH LEVEL SEVEN;**34,109**;Oct 13, 1995
PROCACK(HLMTIEN,HLEID,HLRESLT,HL) ;Process acknowledgement message
;
;This is a subroutine call with parameter passing. It returns a value
;in the variable HLRESLT of null if no error occurs, or the following
;two piece value if an error occurs: error code^error description
;
;Required Input Parameters
; HLMTIEN = The IEN from the Message Text file created when the
; GENERATE^HLMA or SEND^HLMA2 entry points were invoked
; HLEID = The IEN from the Protocol file of the driver event
;NOTE: The variable HLRESLT must be passed by reference
; HLRESLT = The variable that will be returned to the calling
; application as descibed above
;Optional Input Parameter
; HL = An array of variables to be used in processing the message
;
;Check for required parameters
S HLRESLT=""
I '$G(HLMTIEN)!('$G(HLEID)) S HLRESLT="7^"_$G(^HL(771.7,7,0))_" at PROCACK^HLTP0 entry point" G EXIT
;Create HL array of variables if it does not exist
I '$D(HL) N HL D INIT^HLFNC2(HLEID,.HL)
;Set special HL variables if data is in global array
I '$D(HLA("HLA")) S HLQUIT=0,HLNODE="",HLNEXT="D HLNEXT^HLCSUTL"
;Get and execute processing routine
D EVENT^HLUTIL1(HLEID,"15,20,772",.HLN) I $G(HLN(772))]"" D
.X:$G(HLN(20))]"" $G(HLN(20))
.N HLERR X HLN(772) I $D(HLERR) S HLRESLT="9^"_$G(^HL(771.7,9,0))
.X:$G(HLN(15))]"" $G(HLN(15))
;Update status of message
D STATUS^HLTF0(HLMTIEN,$S($D(HLERR):4,1:3),$S($D(HLERR):+HLRESLT,1:""),$S($D(HLERR):HLERR,1:""),,$S($G(HLERR("SKIP_EVENT"))=1:1,1:0))
EXIT K HLN,HLNEXT,HLNODE,HLQUIT
Q
HLTP2 ;AISC/SAW-Transaction Processor Module (Cont'd) ;2/22/95 11:35
+1 ;;1.6;HEALTH LEVEL SEVEN;**34,109**;Oct 13, 1995
PROCACK(HLMTIEN,HLEID,HLRESLT,HL) ;Process acknowledgement message
+1 ;
+2 ;This is a subroutine call with parameter passing. It returns a value
+3 ;in the variable HLRESLT of null if no error occurs, or the following
+4 ;two piece value if an error occurs: error code^error description
+5 ;
+6 ;Required Input Parameters
+7 ; HLMTIEN = The IEN from the Message Text file created when the
+8 ; GENERATE^HLMA or SEND^HLMA2 entry points were invoked
+9 ; HLEID = The IEN from the Protocol file of the driver event
+10 ;NOTE: The variable HLRESLT must be passed by reference
+11 ; HLRESLT = The variable that will be returned to the calling
+12 ; application as descibed above
+13 ;Optional Input Parameter
+14 ; HL = An array of variables to be used in processing the message
+15 ;
+16 ;Check for required parameters
+17 SET HLRESLT=""
+18 IF '$GET(HLMTIEN)!('$GET(HLEID))
SET HLRESLT="7^"_$GET(^HL(771.7,7,0))_" at PROCACK^HLTP0 entry point"
GOTO EXIT
+19 ;Create HL array of variables if it does not exist
+20 IF '$DATA(HL)
NEW HL
DO INIT^HLFNC2(HLEID,.HL)
+21 ;Set special HL variables if data is in global array
+22 IF '$DATA(HLA("HLA"))
SET HLQUIT=0
SET HLNODE=""
SET HLNEXT="D HLNEXT^HLCSUTL"
+23 ;Get and execute processing routine
+24 DO EVENT^HLUTIL1(HLEID,"15,20,772",.HLN)
IF $GET(HLN(772))]""
Begin DoDot:1
+25 IF $GET(HLN(20))]""
XECUTE $GET(HLN(20))
+26 NEW HLERR
XECUTE HLN(772)
IF $DATA(HLERR)
SET HLRESLT="9^"_$GET(^HL(771.7,9,0))
+27 IF $GET(HLN(15))]""
XECUTE $GET(HLN(15))
End DoDot:1
+28 ;Update status of message
+29 DO STATUS^HLTF0(HLMTIEN,$SELECT($DATA(HLERR):4,1:3),$SELECT($DATA(HLERR):+HLRESLT,1:""),$SELECT($DATA(HLERR):HLERR,1:""),,$SELECT($GET(HLERR("SKIP_EVENT"))=1:1,1:0))
EXIT KILL HLN,HLNEXT,HLNODE,HLQUIT
+1 QUIT