source: WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSREP.m@ 1259

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

revised back to 6/30/08 version

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