source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/AWCMCPR4.m@ 674

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1AWCMCPR4 ;VISN7/THM-NIGHT TIME MOVEMENT OF DATA ; 09 Jan 2004 3:43 PM
2 ;;7.3;TOOLKIT;**84**;Jan 9, 2004
3 ;
4EN ;This should be run after midnight so it processes the previous day.
5 S X="T-1",%DT="" D ^%DT S AWCSDT=Y,AWCX=(AWCSDT-.000001),AWCEDT=(Y+.2359)
6 F AWCX=AWCX:0 S AWCX=$O(^XTMP("AWCCPRS",AWCX)) Q:AWCX>AWCEDT!(AWCX="") F AWCDA=0:0 S AWCDA=$O(^XTMP("AWCCPRS",AWCX,AWCDA)) Q:AWCDA="" DO
7 .S AWCD1=$G(^XTMP("AWCCPRS",AWCX,AWCDA,0))
8 .S AWCSTRT=$P(AWCD1,U),AWCEND=$P(AWCD1,U,2),AWCDUZ=$P(AWCD1,U,3),AWCDUZ(2)=$P(AWCD1,U,4),AWCTYPE=$P(AWCD1,U,5)
9 .I AWCDUZ(2)="" S AWCDUZ(2)=+$$SITE^VASITE ;for people without division assignments
10 .S AWCSEC=$$HDIFF^XLFDT(AWCEND,AWCSTRT,2)
11 .S AWCFMDT=$$HTFM^XLFDT(AWCSTRT)
12 .L +^AWC(177100.13,0):1 Q:'$T
13 .S AWCDATA=^AWC(177100.13,0)
14 .S $P(AWCDATA,"^",3)=$P(AWCDATA,"^",3)+1,AWCIEN(1)=$P(AWCDATA,"^",3)
15 .S ^AWC(177100.13,0)=AWCDATA
16 .L -^AWC(177100.13,0)
17 .K AWCDATA
18 .S AWCDATA(177100.13,"+1,",.01)=AWCIEN(1)
19 .S AWCDATA(177100.13,"+1,",1)=AWCSEC
20 .S AWCDATA(177100.13,"+1,",2)=AWCDUZ
21 .S AWCDATA(177100.13,"+1,",3)=AWCFMDT
22 .S AWCDATA(177100.13,"+1,",4)=AWCDUZ(2)
23 .S AWCDATA(177100.13,"+1,",5)=AWCTYPE
24 .D UPDATE^DIE("","AWCDATA","AWCIEN")
25 .K AWCDATA,AWCIEN
26 K AWCSDT,AWCX,AWCDA,AWCD1,AWCSTRT,AWCEND,AWCDUZ,AWCTYPE
27 K AWCFMDT,AWCDATA,AWCIEN,AWCSEC,AWCEDT,%DT,X,Y
28 Q
Note: See TracBrowser for help on using the repository browser.