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

HLCSREP.m

Go to the documentation of this file.
  1. HLCSREP ;ALB/MFK - HL7 QUEUE MANAGEMENT ;10/17/2007 08:56
  1. ;;1.6;HEALTH LEVEL SEVEN;**109,122**;Oct 13, 1995;Build 14
  1. ;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. REPMSG ;Duplicate messages on a queue
  1. ; INPUT: MSG - Array which contains the queue and the
  1. ; message numbers for msgs to be re-queued
  1. ; MSG(QUEUE,NUMBER)
  1. ; OUTPUT: NONE
  1. N DIC,LLE,X,Y,DA,ERROR,FROMID,MSGID
  1. N TOID,ENTRY,LLE
  1. Q:('$D(MSG))
  1. ; create new entries
  1. S (LLE,ERROR)=""
  1. F S LLE=$O(MSG(LLE)) Q:(LLE="")!(ERROR) D
  1. .S ENTRY=""
  1. .F S ENTRY=$O(MSG(LLE,ENTRY)) Q:(ENTRY="")!(ERROR) D
  1. ..S MSGID=$$ENQUEUE^HLCSQUE(LLE,"OUT")
  1. ..I +MSGID'>0 S ERROR=1 Q
  1. ..S TOID=$P(MSGID,"^",2)
  1. ..M ^HLCS(870,LLE,2,TOID)=^HLCS(870,LLE,2,ENTRY)
  1. ..; Change .01 of new record to be IEN
  1. ..S $P(^HLCS(870,LLE,2,TOID,0),"^",1)=TOID
  1. ..S $P(^HLCS(870,LLE,2,TOID,0),"^",2)="P"
  1. EXIT ;
  1. Q
  1. ;
  1. ENQUE(LINK,DIR,IEN773) ;
  1. ;This routine will place the message=IEN773 on the "AC" xref of file 773.
  1. ;Input:
  1. ; DIR = "I" or "O", denoting the direction that the message is going in
  1. ; LINK = the ien of the logical link
  1. ; IEN773 = ien of the message in file 773
  1. ;
  1. Q:'$G(LINK)
  1. I DIR'="I",DIR'="O" Q
  1. Q:'$G(IEN773)
  1. ;
  1. ; patch HL*1.6*122: MPI-client/server
  1. F L +^HLMA("AC",DIR,LINK,IEN773):10 Q:$T H 1
  1. S ^HLMA("AC",DIR,LINK,IEN773)=""
  1. L -^HLMA("AC",DIR,LINK,IEN773)
  1. ;
  1. S $P(^HLMA(+IEN773,0),U,17)=+LINK ; HL*1.6*109 - lja
  1. I DIR="O" D LLCNT^HLCSTCP(LINK,3)
  1. Q
  1. ;
  1. DEQUE(LINK,DIR,IEN773) ;
  1. ;This routine will remove the message=IEN773 on the "AC" xref of file 773.
  1. ;Input:
  1. ; DIR = "I" or "O", denoting the direction that the message is going in
  1. ; LINK = the ien of the logical link
  1. ; IEN773 = ien of the message in file 773
  1. ;
  1. Q:'$G(LINK)
  1. I DIR'="I",DIR'="O" Q
  1. Q:'$G(IEN773)
  1. ;
  1. ; patch HL*1.6*122: MPI-client/server
  1. F L +^HLMA("AC",DIR,LINK,IEN773):10 Q:$T H 1
  1. K ^HLMA("AC",DIR,LINK,IEN773)
  1. L -^HLMA("AC",DIR,LINK,IEN773)
  1. ;
  1. Q