source: FOIAVistA/trunk/r/ENGINEERING-EN/ENY2VACO.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1ENY2VACO ;;(WIRMFO)/DH-Y2K Activity Report ;10.9.98
2 ;;7.0;ENGINEERING;**55,58**;August 17, 1993
3EN ; national roll-up of Y2K information
4 ; may be selected manually or scheduled to run automatically
5 ; at a user specified frequency
6 N %DT
7 W @IOF,!,?20,"NATIONAL ROLL-UP OF Y2K INFORMATION"
8 I $P($G(^DIC(6910,1,0)),U,2)']"" W !!,"There is no STATION NUMBER in your Engineering Init Parameters file.",!,"Can't proceed.",*7 D HOLD Q
9 I '$D(^XUSEC("ENY2K_ROLL_UP",DUZ)) W !!,"You must hold security key ENY2K_ROLL_UP in order to execute this option.",*7 D HOLD Q
10 ;
11ACT1 W !!,"Please enter starting and stopping dates for activity reporting",!," (or '^' to escape...)",!
12 S %DT="AEP",%DT("A")="Starting date: ",%DT(0)=-DT
13 S Y=$E(DT,1,5)-1 S:$E(Y,4,5)="00" Y=($E(Y,1,3)-1)_12 S Y=Y_"01"
14 X ^DD("DD") S %DT("B")=Y
15 D ^%DT Q:Y'>0
16 S Y=$P(Y,"."),ENDATE("STARTI")=Y X ^DD("DD") S ENDATE("STARTE")=Y
17ACT2 S Y=$$EOM^ENUTL(ENDATE("STARTI")) X ^DD("DD") S %DT("B")=Y
18 S %DT("A")="Stopping date: " K %DT(0)
19 D ^%DT Q:Y'>0 S Y=$P(Y,"."),ENDATE("STOPI")=Y_".9" X ^DD("DD") S ENDATE("STOPE")=Y
20 I ENDATE("STOPI")'>ENDATE("STARTI") W !!,"STOPPING DATE must follow the STARTING DATE",*7 G ACT2
21 S X=$P($O(^ENG(6918,"C",ENDATE("STARTI"))),".") I X=""!(X>ENDATE("STOPI")) W !!,"There was no Y2K activity between "_ENDATE("STARTE")_" and "_ENDATE("STOPE")_".",!,"Cumulative information will be transmitted anyway.",*7
22 I $P(ENDATE("STOPI"),".",2)="" S ENDATE("STOPI")=ENDATE("STOPI")_".99"
23 W !!,"The system is now prepared to send a Y2K report to VACO."
24 S DIR("A")="Is that what you want to do",DIR(0)="Y",DIR("B")="YES"
25 D ^DIR K DIR I $D(DIRUT)!('Y) K ENDATE Q ; confirm the transaction
26 S ZTRTN="DEQVACO^ENY2VACO",ZTIO=""
27 F J="ENDATE(""STARTI"")","ENDATE(""STOPI"")" S ZTSAVE(J)=""
28 S ZTDESC="Y2K National Roll-up (equipment)"
29 S ZTDTH=$H D ^%ZTLOAD,HOME^%ZIS K ZTSK
30 W !!,"A national roll-up of Y2K information has been tasked to run via NetWork",!,"Mail. You will receive a copy of the message."
31 K ENDATE
32 Q
33 ;
34DEQVACO ; use ENX( as root of NetWork mail message
35 K ^TMP($J)
36 I $G(ENDATE("STARTI"))="" D
37 . S Y=$E(DT,1,5)-1 S:$E(Y,4,5)="00" Y=($E(Y,1,3)-1)_12 S Y=Y_"01"
38 . S Y=$P(Y,"."),ENDATE("STARTI")=Y
39 . S ENDATE("STOPI")=$$EOM^ENUTL(ENDATE("STARTI"))_".99"
40 N DA,CAT,EN,ENX,ENY,TOTAL,STATION,COST,COUNT,ALLSTN,ENSTN,KOUNT,ENCLASS
41 D NOW^%DTC S ENY=$P(%,".",2)
42 S ENC(1,0)="ENG^"_$E(1000+$E($P(^DIC(6910,1,0),U,2),1,3),2,4)_"^Y2K^"_(%+17000000\1)_U_ENY_$E("000000",1,6-$L(ENY))_U_$$LTZ^ENPLUTL_"^001^|",KOUNT=1
43 S (ALLSTN,ENSTN)=0,ENY2K("VACO")=1,ENCLASS=1 D CNTACT^ENY2REP,ROLLACT
44 K COUNT,TOTAL
45 K ^TMP($J)
46 D DEQ1^ENY2REP4,ROLLCUM^ENY2VAC1
47 K COUNT,TOTAL
48 D DEQ1^ENY2REPA,ROLLFC^ENY2VAC2
49 K COUNT,TOTAL
50 D SUM1^ENY2USRS,ROLLUTL^ENY2VAC2
51 S KOUNT=KOUNT+1,ENC(KOUNT,0)="$"
52 D SEND
53 G EXIT
54 ;
55ROLLACT ; add Y2K activity to national roll-up
56 S STATION=0 F S STATION=$O(^TMP($J,"ENY2B",STATION)) Q:STATION="" D
57 . S ENC(2,0)="A1^"_($P(ENDATE("STARTI"),".")+17000000\1)_U_($P(ENDATE("STOPI"),".")+17000000\1)_U_"|",COUNT=1,KOUNT=2
58 . F J=0,"FC","NC","CC","NA" F K=0,"FC","NC","CC","NA" I '(J=0&(K=0)) D
59 .. S COUNT=COUNT+1 Q:'^TMP($J,"ENY2B",STATION,J,K,"COUNT")
60 .. S KOUNT=KOUNT+1,ENC(KOUNT,0)="A"_COUNT_U_J_U_K_U_^TMP($J,"ENY2B",STATION,J,K,"COUNT")_U_^("EST")_U_^("ACT")_U_^("REST")_U_$S($D(COUNT(STATION,J,K,"EST")):COUNT(STATION,J,K,"EST"),1:"")
61 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_U_^TMP($J,"ENY2B",STATION,J,K,"RACT")_U_$S($D(COUNT(STATION,J,K,"ACT")):COUNT(STATION,J,K,"ACT"),1:"")_U_"|"
62 Q
63 ;
64SEND ; send NetWork mail
65 S XMY(DUZ)="",XMY("S.EN_UPDATE_Y2K@FORUM.VA.GOV")="",XMDUZ=.5
66 ;S XMY(DUZ)="",XMDUZ=.5
67 S XMSUB="Roll-up of Y2K Information",XMTEXT="ENC("
68 D ^XMD
69 K XMY,XMDUZ,XMSUB,XMTEXT
70 Q
71 ;
72HOLD Q:$E(IOST,1,2)'="C-"
73 R !!,"Press <RETURN> to continue...",X:DTIME
74 Q
75EXIT ;
76 K ^TMP($J)
77 D ^%ZISC,HOME^%ZIS
78 I $D(ZTQUEUED) S ZTREQN="@"
79 K J,K,X,ENDATE,ENSTN
80 Q
81 ;ENY2VACO
Note: See TracBrowser for help on using the repository browser.