HLMA0 ;AISC/SAW-Message Administration Module (Cont'd) ;7/17/97 17:30
;;1.6;HEALTH LEVEL SEVEN;**34,109**;Oct 13, 1995
RECEIVE(HLLD0,HLLD1) ;Entry point to receive an external message
;
;This is a subroutine call with parameter passing. There are no
;output parameters returned by this call.
;
;Required Input Parameter
; HLLD0 = Internal entry number where message is stored in Logical Link
; file or XM if message is stored in MailMan
;Optional Input Parameter (Required if HLLD0 does not equal XM)
; HLLD1 = Internal entry number of IN QUEUE multiple entry in Logical
; Link file
;
;Check for required parameter
I $G(HLLD0)']"" Q
I HLLD0'="XM",'$G(HLLD1) Q
N HLRESLT
;Get message ID and Message Text IEN for message being received
D CREATE^HLTF(.HLMID,.HLMTIEN,.HLDT,.HLDT1)
K HLDT,HLDT1
;Call Transaction Processor
D PROCESS^HLTP0(HLMTIEN,HLLD0,$S($G(HLLD1):HLLD1,1:""),.HLRESLT)
;Update Status to Successfully Completed or Error During Transmission
D STATUS^HLTF0(HLMTIEN,$S(HLRESLT:4,1:3),$S(HLRESLT:+HLRESLT,1:""),$S(HLRESLT:$P(HLRESLT,"^",2),1:""),,$S($G(HLERR("SKIP_EVENT"))=1:1,1:0))
EXIT K HLMTIEN,HLRESLT
Q
HLMA0 ;AISC/SAW-Message Administration Module (Cont'd) ;7/17/97 17:30
+1 ;;1.6;HEALTH LEVEL SEVEN;**34,109**;Oct 13, 1995
RECEIVE(HLLD0,HLLD1) ;Entry point to receive an external message
+1 ;
+2 ;This is a subroutine call with parameter passing. There are no
+3 ;output parameters returned by this call.
+4 ;
+5 ;Required Input Parameter
+6 ; HLLD0 = Internal entry number where message is stored in Logical Link
+7 ; file or XM if message is stored in MailMan
+8 ;Optional Input Parameter (Required if HLLD0 does not equal XM)
+9 ; HLLD1 = Internal entry number of IN QUEUE multiple entry in Logical
+10 ; Link file
+11 ;
+12 ;Check for required parameter
+13 IF $GET(HLLD0)']""
QUIT
+14 IF HLLD0'="XM"
IF '$GET(HLLD1)
QUIT
+15 NEW HLRESLT
+16 ;Get message ID and Message Text IEN for message being received
+17 DO CREATE^HLTF(.HLMID,.HLMTIEN,.HLDT,.HLDT1)
+18 KILL HLDT,HLDT1
+19 ;Call Transaction Processor
+20 DO PROCESS^HLTP0(HLMTIEN,HLLD0,$SELECT($GET(HLLD1):HLLD1,1:""),.HLRESLT)
+21 ;Update Status to Successfully Completed or Error During Transmission
+22 DO STATUS^HLTF0(HLMTIEN,$SELECT(HLRESLT:4,1:3),$SELECT(HLRESLT:+HLRESLT,1:""),$SELECT(HLRESLT:$PIECE(HLRESLT,"^",2),1:""),,$SELECT($GET(HLERR("SKIP_EVENT"))=1:1,1:0))
EXIT KILL HLMTIEN,HLRESLT
+1 QUIT