source: FOIAVistA/tag/r/ENGINEERING-EN/ENY2REP2.m@ 1544

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

initial load of FOIAVistA 6/30/08 version

File size: 5.4 KB
Line 
1ENY2REP2 ;;(WIRMFO)/DH-Y2K Category Summary Report ;9.30.98
2 ;;7.0;ENGINEERING;**51,55**;August 17, 1993
3 ;
4Y2KCAT ; snapshot of Y2K data base by manufacturer~model for a given
5 ; Y2K category
6 W @IOF,!!,?20,"** SNAPSHOT OF Y2K EQUIPMENT DATA BASE **"
7 W !,?22,"(Summary for a specific Y2K category)"
8 I $P($G(^DIC(6910,1,0)),U,2)']"" W !!,"There is no STATION NUMBER in your Engineering Init Paramaters file.",!,"Can't proceed.",*7 Q
9 S ALLSTN=0
10 I $P(^DIC(6910,1,0),U,10)!($D(^DIC(6910,1,3))) D I ALLSTN="^" K ALLSTN Q
11 . W !! S DIR(0)="Y",DIR("A")="Do you want a breakout by station",DIR("B")="NO"
12 . S DIR("?",1)="If you say 'NO' you will obtain a single report for all your equipment,"
13 . S DIR("?")="regardless of which station it belongs to."
14 . D ^DIR K DIR I $D(DIRUT) S ALLSTN="^" Q
15 . S ALLSTN=Y
16 S DIR(0)="SM^FC:FULLY COMPLIANT;CC:CONDITIONALLY COMPLIANT;NC:NON-COMPLIANT;NA:NOT APPLICABLE;NL:NULL",DIR("A")="Please select the Y2K CATEGORY for which you would like counts",DIR("B")="CC"
17 S DIR("?",1)="FULLY COMPLIANT => Device will function properly in all respects on"
18 S DIR("?",2)=" January 1, 2000 without user intervention."
19 S DIR("?",3)="CONDITIONALLY COMPLIANT => Device requires user intervention to function"
20 S DIR("?",4)=" properly in all respects on January 1, 2000. This may include a"
21 S DIR("?",5)=" manufacturer software and/or hardware update or other one-time"
22 S DIR("?",6)=" user action."
23 S DIR("?",7)="NON-COMPLIANT => Device will not function properly on January 1, 2000 and"
24 S DIR("?",8)=" no manufacturer remedy is available. Site must decide whether to"
25 S DIR("?",9)=" retire, replace, renovate/upgrade, or retain and use this device."
26 S DIR("?",10)="NOT APPLICABLE => There are no Y2K implications for this device."
27 S DIR("?")="NULL => No Y2K category has been entered for this device."
28 D ^DIR K DIR I $D(DIRUT) K ALLSTN Q
29 S CAT=Y,CAT("E")=Y(0)
30 W !! K IO("Q") S %ZIS="QM" D ^%ZIS I POP K ALLSTN,CAT Q
31 I $D(IO("Q")) S ZTRTN="Y2KCAT1^ENY2REP2" D K ALLSTN,CAT G EXIT
32 . S ZTDESC="Y2K Equipment Snapshot by Y2K Category"
33 . S ZTSAVE("ALLSTN")="",ZTSAVE("CAT")="",ZTSAVE("CAT(""E"")")=""
34 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
35 ;
36Y2KCAT1 K ^TMP($J)
37 N MAN,MOD,PAGE,DATE,LINE,ESCAPE,TOTAL,STATION,DA,REPL,EST,ACT
38 S PAGE=0 D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2)
39 S STATION("PARNT")=$P($G(^DIC(6910,1,0)),U,2)
40 S STATION=STATION("PARNT")
41 F J="COUNT","EST","ACT" S TOTAL(STATION,J)=0 ; initialize
42 S MAN=0 F S MAN=$O(^ENG(6914,"K",MAN)) Q:'MAN S MAN("E")=$P($G(^ENG("MFG",MAN,0)),U) D:MAN("E")]""
43 . S DA=0 F S DA=$O(^ENG(6914,"K",MAN,DA)) Q:'DA S MOD=$P($G(^ENG(6914,DA,1)),U,2) D:MOD]""
44 .. I '$D(ZTQUEUED),'(DA#100) W "." ; activity indicator
45 .. Q:"^4^5^"[(U_$P($G(^ENG(6914,DA,3)),U)_U) ; ck for turn-ins
46 .. S EN=$G(^ENG(6914,DA,11))
47 .. S CAT("DA")=$P(EN,U) S:CAT("DA")="" CAT("DA")="NL"
48 .. Q:CAT("DA")'=CAT ;not what we're counting
49 .. I ALLSTN S STATION=$S($P($G(^ENG(6914,DA,9)),U,5)]"":$P(^(9),U,5),1:STATION("PARNT")) I '$D(TOTAL(STATION)) F J="COUNT","EST","ACT" S TOTAL(STATION,J)=0
50 .. I '$D(^TMP($J,STATION,MAN("E"),MOD)) F J="COUNT","EST","ACT" S ^TMP($J,STATION,MAN("E"),MOD,J)=0
51 .. S TOTAL(STATION,"COUNT")=TOTAL(STATION,"COUNT")+1,^TMP($J,STATION,MAN("E"),MOD,"COUNT")=^TMP($J,STATION,MAN("E"),MOD,"COUNT")+1
52 .. I CAT="FC" D Q
53 ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$P(EN,U,3),TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+$P(EN,U,4)
54 ... S ^TMP($J,STATION,MAN("E"),MOD,"EST")=^TMP($J,STATION,MAN("E"),MOD,"EST")+$P(EN,U,3),^("ACT")=^("ACT")+$P(EN,U,4)
55 .. I CAT="CC" D Q
56 ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$P(EN,U,3)
57 ... S ^TMP($J,STATION,MAN("E"),MOD,"EST")=^TMP($J,STATION,MAN("E"),MOD,"EST")+$P(EN,U,3)
58 .. I CAT="NC" D
59 ... S ACT=0,EST=0,REPL=""
60 ... I $P(EN,U,6)="REP" S EST=$P($G(^ENG(6914,DA,2)),U,3),REPL=$O(^ENG(6914,"AO",DA,0))
61 ... I REPL,$D(^ENG(6914,REPL,2)) S ACT=$P(^(2),U,3)
62 ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+EST,TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+ACT
63 ... S ^TMP($J,STATION,MAN("E"),MOD,"EST")=^TMP($J,STATION,MAN("E"),MOD,"EST")+EST,^("ACT")=^("ACT")+ACT
64 .. Q
65 ;
66CATPRNT ; print the snapshot
67 U IO W:$E(IOST,1,2)="C-" @IOF
68 I '$D(^TMP($J)) D CATHDR W !!,?15,"<Nothing to print>" D HOLD G EXIT
69 S STATION=0 F S STATION=$O(^TMP($J,STATION)) Q:STATION=""!($G(ESCAPE)) D CATHDR D D HOLD Q:$G(ESCAPE) W @IOF
70 . S MAN("E")=0 S (MOD,ESCAPE)=0 F S MAN("E")=$O(^TMP($J,STATION,MAN("E"))) Q:MAN("E")="" S MAN("PRNT")=$E(MAN("E"),1,30) F S MOD=$O(^TMP($J,STATION,MAN("E"),MOD)) Q:MOD=""!(ESCAPE) S MOD("E")=$E(MOD,1,20) D
71 .. W !,MAN("PRNT")_"~"_MOD("E"),?51,$J(^TMP($J,STATION,MAN("E"),MOD,"COUNT"),4),?60,$J(^("EST"),8,2),?70,$J(^("ACT"),8,2)
72 .. K ^TMP($J,STATION,MAN("E"),MOD)
73 .. S LINE=LINE+1 I (IOSL-LINE)'>4 D HOLD Q:ESCAPE I $D(^TMP($J)) W @IOF D CATHDR
74 . Q:$G(ESCAPE)
75 . K X S $P(X,"-",79)="-" W !,X
76 . W !,"TOTALS",?50,$J(TOTAL(STATION,"COUNT"),5),?60,$J(TOTAL(STATION,"EST"),8,2),?70,$J(TOTAL(STATION,"ACT"),8,2)
77 G EXIT
78 ;
79CATHDR ; header for Y2K snapshot
80 S PAGE=PAGE+1,LINE=3
81 W "Y2K Summary Snapshot for "_CAT("E")_" "_DATE("PRNT")_" ",?70,"Page: "_PAGE
82 W !,"Manufacturer~Model "_$S('ALLSTN:"Consolidated",1:"Station: "_STATION),?50,"Count Estimated $ Actual $"
83 K X S $P(X,"-",79)="-" W !,X
84 Q
85 ;
86HOLD Q:$E(IOST,1,2)'="C-"!($G(ESCAPE))
87 W !!,"Press <RETURN> to continue, '^' to escape..." R X:DTIME
88 I '$T!($E(X)="^") S ESCAPE=1
89 Q
90EXIT ;
91 K ^TMP($J) D ^%ZISC,HOME^%ZIS
92 I $D(ZTQUEUED) S ZTREQN="@"
93 K EN,J,K,X,ALLSTN,CAT
94 Q
95 ;ENY2REP2
Note: See TracBrowser for help on using the repository browser.