source: FOIAVistA/tag/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/AWCMCPUR.m@ 1641

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

initial load of FOIAVistA 6/30/08 version

File size: 932 bytes
Line 
1AWCMCPUR ;VISN 7/THM-Purge CPRS Monitor data file and ^XTMP("AWC" global ; 09 Jan 2004 3:43 PM
2 ;;7.3;TOOLKIT;**84**;Jan 9, 2004
3 ;
4EN D DT^DICRW
5 ; number of days to keep data in param file
6 S AWCPDAYS=$P(^AWC(177100.12,1,0),U,14)
7 I +AWCPDAYS=0 S AWCPDAYS=30 ;if no limit set, keep minimum of 30 days
8 S X1=DT,X2=-AWCPDAYS D C^%DTC S AWCEND=X+.2359,AWCDTX=""
9 F S AWCDTX=$O(^AWC(177100.13,"C",AWCDTX)) Q:(AWCDTX>AWCEND)!(AWCDTX="") DO
10 .F DA=0:0 S DA=$O(^AWC(177100.13,"C",AWCDTX,DA)) Q:DA="" DO
11 ..S DIK="^AWC(177100.13," D ^DIK
12 ;
13 ; now purge the XTMP global
14PGXTMP S AWCDTX="" F S AWCDTX=$O(^XTMP("AWCCPRS",AWCDTX)) Q:(AWCDTX>AWCEND)!(AWCDTX="") DO
15 .F DA=0:0 S DA=$O(^XTMP("AWCCPRS",AWCDTX,DA)) Q:DA="" K ^XTMP("AWCCPRS",AWCDTX,DA,0)
16 ; reset zero node purge date
17 S X="T+10",%DT="" D ^%DT Q:Y<0 S AWCPGDT=Y
18 S $P(^XTMP("AWCCPRS",0),U)=AWCPGDT
19 K DIK,DA,AWCEND,AWCPGDT,AWCDTX,AWCPDAYS,X1,X2,X,%,%H,%T,%DT,Y
20 Q
Note: See TracBrowser for help on using the repository browser.