source: FOIAVistA/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSREP.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1HLCSREP ;ALB/MFK - HL7 QUEUE MANAGEMENT ;10/17/2007 08:56
2 ;;1.6;HEALTH LEVEL SEVEN;**109,122**;Oct 13, 1995;Build 14
3 ;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5REPMSG ;Duplicate messages on a queue
6 ; INPUT: MSG - Array which contains the queue and the
7 ; message numbers for msgs to be re-queued
8 ; MSG(QUEUE,NUMBER)
9 ; OUTPUT: NONE
10 N DIC,LLE,X,Y,DA,ERROR,FROMID,MSGID
11 N TOID,ENTRY,LLE
12 Q:('$D(MSG))
13 ; create new entries
14 S (LLE,ERROR)=""
15 F S LLE=$O(MSG(LLE)) Q:(LLE="")!(ERROR) D
16 .S ENTRY=""
17 .F S ENTRY=$O(MSG(LLE,ENTRY)) Q:(ENTRY="")!(ERROR) D
18 ..S MSGID=$$ENQUEUE^HLCSQUE(LLE,"OUT")
19 ..I +MSGID'>0 S ERROR=1 Q
20 ..S TOID=$P(MSGID,"^",2)
21 ..M ^HLCS(870,LLE,2,TOID)=^HLCS(870,LLE,2,ENTRY)
22 ..; Change .01 of new record to be IEN
23 ..S $P(^HLCS(870,LLE,2,TOID,0),"^",1)=TOID
24 ..S $P(^HLCS(870,LLE,2,TOID,0),"^",2)="P"
25EXIT ;
26 Q
27 ;
28ENQUE(LINK,DIR,IEN773) ;
29 ;This routine will place the message=IEN773 on the "AC" xref of file 773.
30 ;Input:
31 ; DIR = "I" or "O", denoting the direction that the message is going in
32 ; LINK = the ien of the logical link
33 ; IEN773 = ien of the message in file 773
34 ;
35 Q:'$G(LINK)
36 I DIR'="I",DIR'="O" Q
37 Q:'$G(IEN773)
38 ;
39 ; patch HL*1.6*122: MPI-client/server
40 F L +^HLMA("AC",DIR,LINK,IEN773):10 Q:$T H 1
41 S ^HLMA("AC",DIR,LINK,IEN773)=""
42 L -^HLMA("AC",DIR,LINK,IEN773)
43 ;
44 S $P(^HLMA(+IEN773,0),U,17)=+LINK ; HL*1.6*109 - lja
45 I DIR="O" D LLCNT^HLCSTCP(LINK,3)
46 Q
47 ;
48DEQUE(LINK,DIR,IEN773) ;
49 ;This routine will remove the message=IEN773 on the "AC" xref of file 773.
50 ;Input:
51 ; DIR = "I" or "O", denoting the direction that the message is going in
52 ; LINK = the ien of the logical link
53 ; IEN773 = ien of the message in file 773
54 ;
55 Q:'$G(LINK)
56 I DIR'="I",DIR'="O" Q
57 Q:'$G(IEN773)
58 ;
59 ; patch HL*1.6*122: MPI-client/server
60 F L +^HLMA("AC",DIR,LINK,IEN773):10 Q:$T H 1
61 K ^HLMA("AC",DIR,LINK,IEN773)
62 L -^HLMA("AC",DIR,LINK,IEN773)
63 ;
64 Q
Note: See TracBrowser for help on using the repository browser.