ACHSAUDD ; IHS/ITSC/PMF - TPF ACHS AUTO AUDIT PURGE ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;;
;;
;PURGE ALL DATA AUDIT ENTRIES FO ALL ACHS FILES
START ;
;LETS SET UP THE FROM TO DATES
S (FROMTXT,X)="T-30" D ^%DT S FROM=Y-1,FROM=FROM_".99999"
S (TOTXT,X)="T" D ^%DT S TO=Y
;
;LETS GO THRU ALL CHS DATA NAMES
;
S U="^"
S ACHSFNAM="CHS "
F S ACHSFNAM=$O(^DIC("B",ACHSFNAM)) Q:ACHSFNAM=""!($E(ACHSFNAM,1,3)'="CHS") D
.S ACHSFNUM=$O(^DIC("B",ACHSFNAM,""))
.Q:ACHSFNUM=""
.W !,ACHSFNAM
.D PURGE
Q
PURGE ;
S DPP=1
S DPP(1)=ACHSFNUM_U_"DATE/TIME RECORDED"_UUUUUUU1
S DPP(1,"F")=FROM_U_FROMTXT_U
S DPP(1,"T")=TO_U_TOTXT_U
Q
ACHSAUDD ; IHS/ITSC/PMF - TPF ACHS AUTO AUDIT PURGE ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;;
+3 ;;
+4 ;PURGE ALL DATA AUDIT ENTRIES FO ALL ACHS FILES
START ;
+1 ;LETS SET UP THE FROM TO DATES
+2 SET (FROMTXT,X)="T-30"
DO ^%DT
SET FROM=Y-1
SET FROM=FROM_".99999"
+3 SET (TOTXT,X)="T"
DO ^%DT
SET TO=Y
+4 ;
+5 ;LETS GO THRU ALL CHS DATA NAMES
+6 ;
+7 SET U="^"
+8 SET ACHSFNAM="CHS "
+9 FOR
SET ACHSFNAM=$ORDER(^DIC("B",ACHSFNAM))
IF ACHSFNAM=""!($EXTRACT(ACHSFNAM,1,3)'="CHS")
QUIT
Begin DoDot:1
+10 SET ACHSFNUM=$ORDER(^DIC("B",ACHSFNAM,""))
+11 IF ACHSFNUM=""
QUIT
+12 WRITE !,ACHSFNAM
+13 DO PURGE
End DoDot:1
+14 QUIT
PURGE ;
+1 SET DPP=1
+2 SET DPP(1)=ACHSFNUM_U_"DATE/TIME RECORDED"_UUUUUUU1
+3 SET DPP(1,"F")=FROM_U_FROMTXT_U
+4 SET DPP(1,"T")=TO_U_TOTXT_U
+5 QUIT