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

HLSERV.m

Go to the documentation of this file.
HLSERV ;AISC/SAW-Server Routine for HL7 Messages Received Through MailMan ;5/27/93  15:08
 ;;1.6;HEALTH LEVEL SEVEN;;Oct 13, 1995
 ;This routine is used for the Version 1.5 Interface Only
 X XMREC G EXIT:XMER<0 G EXIT:"BHS,MSH"'[$E(XMRG,1,3) S HLL(1)=XMRG X XMREC G EXIT:XMER<0 S HLL(2)=XMRG D CHK^HLCHK
 N %,%H,%I D NOW^%DTC S HLDT=%,$P(HLL(1),HLFS,8)="" S ^TMP("HLR",$J,HLDT,1)=HLL(1),^(2)=HLL(2),HLXMZ=XMZ I '$D(HLNDAP0) S $P(HLNDAP0,"^",2)=$P(HLL(1),HLFS,6)
 F HLI=3:1 X XMREC Q:XMER<0  S ^TMP("HLR",$J,HLDT,HLI)=XMRG
 K HLL D IN^HLTF(HLMTN,HLMID,HLDT) I HLMTN="ACK"!(HLMTN="MCF") G EXIT:'$D(HLROU) D:HLROU'="^NONE"&(HLROU'="^")&('$D(HLERR)) @HLROU G EXIT
 S HLMT=$S(HLMTN="QRY":"ORF",HLMTN="ORM":"ORR",1:"ACK") S:$D(HLERR) HLMT="ACK" D MSH^HLCHK
 S HLTRANS=XMZ I $D(HLERR) D CREATE^HLTF(.HLX,.HLDA,.HLDT,.HLDT1) S HLSDATA(2)="MSA"_HLFS_"AR"_HLFS_HLMID_HLFS_HLERR D EN1^HLTRANS S XMZ=HLTRANS G EXIT
 D @HLROU S XMZ=HLTRANS
EXIT D KILL^HLTRANS,KILL^HLCHK S XMSER="S.HL SERVER" D REMSBMSG^XMA1C
 K HLX,HLTIME,HLTRANS,XMSER,XMZ,^TMP("HLR",$J) Q