source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPXDIS.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1PRCPXDIS ;WISC/RFJ-purge distribution usage history ;12 Feb 92
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 D ^PRCPUSEL Q:'$G(PRCP("I"))
5 N %,%H,%I,DATE,NOWDT,STOPDATE,X,Y
6 D NOW^%DTC S NOWDT=$E(X,1,5)_"01",X1=$E(X,1,5)_"15",X2=-395 D C^%DTC S (Y,STOPDATE)=$E(X,1,5)_"01" D DD^%DT S DATE=Y
7 W ! F %=1:1 S X=$P($T(OPTION+%),";",3,99) Q:X="" S:X["DATE" X=$P(X,"DATE")_DATE_$P(X,"DATE",2) W !,X
8 W ! S XP="ARE YOU SURE",XH="ENTER 'YES' TO START THE PURGE, 'NO' OR '^' TO EXIT."
9 I $$YN^PRCPUYN(2)'=1 Q
10 W !!,"<*> please wait <*>"
11DQ ; automatic purge starts here
12 N D,DA,DIC,DIK,DISTDA
13 S DISTDA=0 F S DISTDA=$O(^PRCP(446,"AD",PRCP("I"),DISTDA)) Q:'DISTDA S D=$P($G(^PRCP(446,DISTDA,0)),"^",2) I $E(D,1,5)<$E(STOPDATE,1,5) D
14 . W "." S DIK="^PRCP(446,",DA=DISTDA D ^DIK K DIK,DA
15 W:'$G(PRCPZTSK) " Finished!" S $P(^PRCP(445,PRCP("I"),0),"^",19)=NOWDT Q
16 ;
17OPTION ;;display entry text
18 ;;This option will purge the distribution history for the inventory point
19 ;;up to date DATE.
20 ;;
21 ;;The distribution history for and after DATE will NOT be purged.
Note: See TracBrowser for help on using the repository browser.