Changeset 623 for WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSREP.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/HEALTH_LEVEL_SEVEN-HL/HLCSREP.m
r613 r623 1 HLCSREP ;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 ; 5 REPMSG ;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" 25 EXIT ; 26 Q 27 ; 28 ENQUE(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 ; 48 DEQUE(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 1 HLCSREP ;ALB/MFK - HL7 QUEUE MANAGEMENT - 10/4/94 1pm 2 ;;1.6;HEALTH LEVEL SEVEN;**109**;Oct 13, 1995 3 REPMSG ;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" 23 EXIT ; 24 Q 25 ; 26 ENQUE(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 ; 41 DEQUE(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 TracChangeset
for help on using the changeset viewer.