Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: HLTP2

HLTP2.m

Go to the documentation of this file.
  1. HLTP2 ;AISC/SAW-Transaction Processor Module (Cont'd) ;2/22/95 11:35
  1. ;;1.6;HEALTH LEVEL SEVEN;**34,109**;Oct 13, 1995
  1. PROCACK(HLMTIEN,HLEID,HLRESLT,HL) ;Process acknowledgement message
  1. ;
  1. ;This is a subroutine call with parameter passing. It returns a value
  1. ;in the variable HLRESLT of null if no error occurs, or the following
  1. ;two piece value if an error occurs: error code^error description
  1. ;
  1. ;Required Input Parameters
  1. ; HLMTIEN = The IEN from the Message Text file created when the
  1. ; GENERATE^HLMA or SEND^HLMA2 entry points were invoked
  1. ; HLEID = The IEN from the Protocol file of the driver event
  1. ;NOTE: The variable HLRESLT must be passed by reference
  1. ; HLRESLT = The variable that will be returned to the calling
  1. ; application as descibed above
  1. ;Optional Input Parameter
  1. ; HL = An array of variables to be used in processing the message
  1. ;
  1. ;Check for required parameters
  1. S HLRESLT=""
  1. I '$G(HLMTIEN)!('$G(HLEID)) S HLRESLT="7^"_$G(^HL(771.7,7,0))_" at PROCACK^HLTP0 entry point" G EXIT
  1. ;Create HL array of variables if it does not exist
  1. I '$D(HL) N HL D INIT^HLFNC2(HLEID,.HL)
  1. ;Set special HL variables if data is in global array
  1. I '$D(HLA("HLA")) S HLQUIT=0,HLNODE="",HLNEXT="D HLNEXT^HLCSUTL"
  1. ;Get and execute processing routine
  1. D EVENT^HLUTIL1(HLEID,"15,20,772",.HLN) I $G(HLN(772))]"" D
  1. .X:$G(HLN(20))]"" $G(HLN(20))
  1. .N HLERR X HLN(772) I $D(HLERR) S HLRESLT="9^"_$G(^HL(771.7,9,0))
  1. .X:$G(HLN(15))]"" $G(HLN(15))
  1. ;Update status of message
  1. 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))
  1. EXIT K HLN,HLNEXT,HLNODE,HLQUIT
  1. Q