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

QAQADLAU.m

Go to the documentation of this file.
QAQADLAU ;HISC/DAD-DELETE AN AUDIT FILE ENTRY ;2/10/92  13:41
 ;;1.7;QM Integration Module;;07/25/1995
 ; REQUIRED VARIABLES
 ;  QAUDIT("FILE")=FILE#
 ;  QAUDIT("DA")=THE CALLING RECORD'S INTERNAL ENTRY NUMBER
 Q:$S($D(QAUDIT("FILE"))[0:1,$D(QAUDIT("DA"))[0:1,QAUDIT("FILE")'>0:1,QAUDIT("DA")'>0:1,1:0)
 S:$D(X)#2 QAUDIT("X")=X S:$D(DA)#2 QAUDIT("SAVE DA")=DA S %X="DA(",%Y="QAUDIT(""SAVE DA""," D %XY^%RCR
 F QAUDITD0=0:0 S QAUDITD0=$O(^QA(740.5,"AA",QAUDIT("FILE"),QAUDIT("DA"),QAUDITD0)) Q:QAUDITD0'>0  D LOOP1
 S:$D(QAUDIT("X"))#2 X=QAUDIT("X") S:$D(QAUDIT("SAVE DA"))#2 DA=QAUDIT("SAVE DA") S %X="QAUDIT(""SAVE DA"",",%Y="DA(" D %XY^%RCR
 K %X,%Y,QAQADICT,QAQAFLD,QAUDIT,QAUDITD0,QAUDITD1
 Q
LOOP1 ;
 F QAUDITD1=0:0 S QAUDITD1=$O(^QA(740.5,QAUDITD0,1,QAUDITD1)) Q:QAUDITD1'>0  D LOOP2
 K ^QA(740.5,QAUDITD0,1,0)
 S QAUDIT=$S($D(^QA(740.5,QAUDITD0,0))#2:^(0),1:"") Q:QAUDIT=""
 F QAUDIT(0)=.01:.01:.02 S QAQAFLD=QAUDIT(0),QAQADICT=740.5,DA=QAUDITD0,X=$P(QAUDIT,"^",100*QAQAFLD\1) D:X]"" ENKILL^QAQAXREF
 K ^QA(740.5,QAUDITD0,0)
 S QAUDIT=$S($D(^QA(740.5,0))#2:$P(^(0),"^",4),1:"") Q:QAUDIT=""  S:QAUDIT $P(^(0),"^",4)=QAUDIT-1
 Q
LOOP2 ;
 S QAUDIT=$S($D(^QA(740.5,QAUDITD0,1,QAUDITD1,0))#2:^(0),1:"") Q:QAUDIT=""
 F QAUDIT(0)=.01:.01:.04 S QAQAFLD=QAUDIT(0),QAQADICT=740.51,DA=QAUDITD1,DA(1)=QAUDITD0,X=$P(QAUDIT,"^",100*QAQAFLD\1) D:X]"" ENKILL^QAQAXREF
 K ^QA(740.5,QAUDITD0,1,QAUDITD1,0)
 Q