source: WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLSERV.m@ 824

Last change on this file since 824 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.0 KB
RevLine 
[613]1HLSERV ;AISC/SAW-Server Routine for HL7 Messages Received Through MailMan ;5/27/93 15:08
2 ;;1.6;HEALTH LEVEL SEVEN;;Oct 13, 1995
3 ;This routine is used for the Version 1.5 Interface Only
4 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
5 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)
6 F HLI=3:1 X XMREC Q:XMER<0 S ^TMP("HLR",$J,HLDT,HLI)=XMRG
7 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
8 S HLMT=$S(HLMTN="QRY":"ORF",HLMTN="ORM":"ORR",1:"ACK") S:$D(HLERR) HLMT="ACK" D MSH^HLCHK
9 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
10 D @HLROU S XMZ=HLTRANS
11EXIT D KILL^HLTRANS,KILL^HLCHK S XMSER="S.HL SERVER" D REMSBMSG^XMA1C
12 K HLX,HLTIME,HLTRANS,XMSER,XMZ,^TMP("HLR",$J) Q
Note: See TracBrowser for help on using the repository browser.