source: WorldVistAEHR/trunk/r/QUALITY_ASSURANCE_INTEGRATION-QAQ/QAQADLAU.m@ 1375

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

initial load of WorldVistAEHR

File size: 1.4 KB
Line 
1QAQADLAU ;HISC/DAD-DELETE AN AUDIT FILE ENTRY ;2/10/92 13:41
2 ;;1.7;QM Integration Module;;07/25/1995
3 ; REQUIRED VARIABLES
4 ; QAUDIT("FILE")=FILE#
5 ; QAUDIT("DA")=THE CALLING RECORD'S INTERNAL ENTRY NUMBER
6 Q:$S($D(QAUDIT("FILE"))[0:1,$D(QAUDIT("DA"))[0:1,QAUDIT("FILE")'>0:1,QAUDIT("DA")'>0:1,1:0)
7 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
8 F QAUDITD0=0:0 S QAUDITD0=$O(^QA(740.5,"AA",QAUDIT("FILE"),QAUDIT("DA"),QAUDITD0)) Q:QAUDITD0'>0 D LOOP1
9 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
10 K %X,%Y,QAQADICT,QAQAFLD,QAUDIT,QAUDITD0,QAUDITD1
11 Q
12LOOP1 ;
13 F QAUDITD1=0:0 S QAUDITD1=$O(^QA(740.5,QAUDITD0,1,QAUDITD1)) Q:QAUDITD1'>0 D LOOP2
14 K ^QA(740.5,QAUDITD0,1,0)
15 S QAUDIT=$S($D(^QA(740.5,QAUDITD0,0))#2:^(0),1:"") Q:QAUDIT=""
16 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
17 K ^QA(740.5,QAUDITD0,0)
18 S QAUDIT=$S($D(^QA(740.5,0))#2:$P(^(0),"^",4),1:"") Q:QAUDIT="" S:QAUDIT $P(^(0),"^",4)=QAUDIT-1
19 Q
20LOOP2 ;
21 S QAUDIT=$S($D(^QA(740.5,QAUDITD0,1,QAUDITD1,0))#2:^(0),1:"") Q:QAUDIT=""
22 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
23 K ^QA(740.5,QAUDITD0,1,QAUDITD1,0)
24 Q
Note: See TracBrowser for help on using the repository browser.