source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPTAPP.m@ 1437

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1DGPTAPP ;MTC/ALB - PTF Purge Utilities; 10-14-92
2 ;;5.3;Registration;;Aug 13, 1993
3 ;
4PUR ;-- entry point from protocol 'DGPT A/P PURGE'
5 N DGTMP
6 ;
7 ;-- get template to purge
8 D SEL^VALM2 I '$D(VALMY) G PURQ
9 S DGTMP=$O(^TMP("ARCPTF",$J,"AP LIST","REC",+$O(VALMY(0)),0))
10 ;--if data has not been archived quit
11 I '$P($G(^DGP(45.62,+DGTMP,0)),U,4) W !,*7,">>> Data Must be Archived before Purge..." H 2 G PURQ
12 ;--if data has been already purged quit
13 I $P($G(^DGP(45.62,+DGTMP,0)),U,7) W !,*7,">>> Data Already Purged..." H 2 G PURQ
14 ;
15 ;-- perfrom purge
16 I $$WARNING D
17 . D PURGE^DGPTAPP1(DGTMP)
18 . ;-- update history file
19 . D ADDPUR(DGTMP)
20 ;
21PURQ Q
22 ;
23PUREX ;-- exit point from protocol 'DGPT A/P PURGE'
24 D TMPINT^DGPTLMU2
25 S VALMBCK="R"
26 Q
27 ;
28ADDPUR(TEMP) ;-- This function will add PURGE date, user and status
29 ;
30 ; INPUT : TEMP - IFN of the History File to update
31 ;
32 I '$D(^DGP(45.62,TEMP,0)) G ADDPURQ
33 W !,">>> Adding Purge data to PTF Archive/Purge History entry."
34 W !," Deleting Archive Data..." H 2
35 S DA=TEMP,DIE="^DGP(45.62,",DR=".05////^S X=DUZ;.06///NOW;.07///1;100///@"
36 D ^DIE
37 K DIE,DR,DA
38ADDPURQ Q
39 ;
40WARNING() ; This function will display a warning to the user before the
41 ; purge of the data will occur. A '1' will be returned if the purge
42 ; should continue.
43 ; OUTPUT : 1 - DO NOT CONTINUE
44 ; 0 - OK
45 W !,*7,"This option will permanently purge data from the Data Base."
46 S DIR(0)="Y",DIR("A")="Are you sure that you want to continue ",DIR("B")="NO" D ^DIR K DIR
47 Q $S(Y:1,1:0)
48 ;
Note: See TracBrowser for help on using the repository browser.