source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPXTRA.m@ 1093

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

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1PRCPXTRA ;WISC/RFJ-purge transaction register ;10 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,ITEMDA,TRANDA
13 S TRANDA=0 F S TRANDA=$O(^PRCP(445.2,"B",PRCP("I"),TRANDA)) Q:'TRANDA S D=$P($G(^PRCP(445.2,TRANDA,0)),"^",17) I D<STOPDATE D
14 . W "." S DIK="^PRCP(445.2,",DA=TRANDA D ^DIK K DIK,DA
15 S ITEMDA=0 F S ITEMDA=$O(^PRCP(445.2,"ABEG",PRCP("I"),ITEMDA)) Q:'ITEMDA S D=0 F S D=$O(^PRCP(445.2,"ABEG",PRCP("I"),ITEMDA,D)) Q:'D I D<$E(STOPDATE,1,5) K ^PRCP(445.2,"ABEG",PRCP("I"),ITEMDA,D)
16 W:'$G(PRCPZTSK) " Finished!" S $P(^PRCP(445,PRCP("I"),0),"^",18)=NOWDT Q
17 ;
18OPTION ;;display entry text
19 ;;This option will purge the register of all transactions that affect the
20 ;;inventory point up to date DATE.
21 ;;
22 ;;The transaction register for and after DATE will NOT be purged.
Note: See TracBrowser for help on using the repository browser.