source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENY2REP6.m@ 1154

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

initial load of WorldVistAEHR

File size: 6.1 KB
RevLine 
[613]1ENY2REP6 ;(WIRMFO)/DH-Print Y2K Cumulative ;8.20.98
2 ;;7.0;ENGINEERING;**51,55**;August 17,1993
3PRT ; physical printing
4 U IO
5 N PAGE,DATE,PRCNT,MONTH,ESCAPE,UL
6 D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2),PAGE=0
7 S MONTH="Jan^Feb^Mar^Apr^May^Jun^Jul^Aug^Sep^Oct^Nov^Dec"
8 S $P(UL,"-",79)="-"
9 I '$G(ENCLASS) D Q
10 . S CLASS="CON",STATION="" F S STATION=$O(COUNT(STATION)) Q:STATION="" D HDR,PRT1 D HOLD Q:$G(ESCAPE)
11 ;
12 S STATION="" F S STATION=$O(COUNT(STATION)) Q:STATION=""!($G(ESCAPE)) S CLASS="" F S CLASS=$O(COUNT(STATION,CLASS)) Q:CLASS=""!($G(ESCAPE)) I CLASS'="CON" D HDR D PRT1,HOLD Q:$G(ESCAPE)
13 Q
14 ;
15PRT1 ; print by functional classification
16 W !,"Active Equipment Records: "_COUNT(STATION,CLASS,"ACT"),?40,"Potential Y2K Candidates: "_COUNT(STATION,CLASS,"Y2K")
17 W !," TURN-IN's with Y2K CATEGORY of 'NC' are counted as active records."
18 W !," Potential Y2K Candidate => Active record with a MANUFACTURER and a MODEL."
19 Q:'COUNT(STATION,CLASS,"Y2K") ; nothing to print
20 W !!,"Counts by Y2K Category:"
21 W !,?8,"FC",?23,"NC",?37,"CC",?51,"NA",?64,"Null"
22 F J=0,"FC","NC","NA","CC" S PRCNT(J)=$P((COUNT(STATION,CLASS,J)/COUNT(STATION,CLASS,"Y2K")*100)+.5,".") S:PRCNT(J)="" PRCNT(J)=0
23 W !,?2,$J(COUNT(STATION,CLASS,"FC"),5)_" ("_PRCNT("FC")_"%)",?17,$J(COUNT(STATION,CLASS,"NC"),5)_" ("_PRCNT("NC")_"%)"
24 W ?31,$J(COUNT(STATION,CLASS,"CC"),5)_" ("_PRCNT("CC")_"%)",?45,$J(COUNT(STATION,CLASS,"NA"),5)_" ("_PRCNT("NA")_"%)"
25 W ?59,$J(COUNT(STATION,CLASS,0),5)_" ("_PRCNT(0)_"%)"
26FC D:COUNT(STATION,CLASS,"FC")
27 . W !!,"For FULLY COMPLIANT ("_COUNT(STATION,CLASS,"FC")_" equipment records):"
28 . S PRCNT("UPG")=$P((COUNT(STATION,CLASS,"FC","UPG")/COUNT(STATION,CLASS,"FC")*100)+.5,".")
29 . S X(0)=COUNT(STATION,CLASS,"FC")-COUNT(STATION,CLASS,"FC","UPG")
30 . W !,?2,X(0)_" records were entered as FULLY COMPLIANT, "_COUNT(STATION,CLASS,"FC","UPG")_" were entered as CONDITIONALLY"
31 . W !," COMPLIANT and then updated." I COUNT(STATION,CLASS,"FC","UPG")>0 D
32 .. W " The total cost of "_$S(COUNT(STATION,CLASS,"FC","UPG")=1:"this update",1:"these updates")_" was $"_$P(^TMP($J,STATION,CLASS,"FC","ACST")+.5,".")_"."
33 .. W !," The estimated total cost was $"_$P(^TMP($J,STATION,CLASS,"FC","ECST")+.5,".")_"."
34NC D:COUNT(STATION,CLASS,"NC")
35 . W !!,"For NON-COMPLIANT ("_COUNT(STATION,CLASS,"NC")_" equipment records):"
36 . F J=0,"RET","REP","USE" S PRCNT(J)=$P((COUNT(STATION,CLASS,"NC",J)/COUNT(STATION,CLASS,"NC")*100)+.5,".") S:PRCNT(J)="" PRCNT(J)=0
37 . W !," Retire:",$J(COUNT(STATION,CLASS,"NC","RET"),5)_"("_PRCNT("RET")_"%) Replace:",$J(COUNT(STATION,CLASS,"NC","REP"),5)_"("_PRCNT("REP")_"%) Use as is:"
38 . W $J(COUNT(STATION,CLASS,"NC","USE"),5)_"("_PRCNT("USE")_"%) Unknown:",$J(COUNT(STATION,CLASS,"NC",0),5)_"("_PRCNT(0)_"%)"
39 . W !," ",COUNT(STATION,CLASS,"NC","ATD")_" item"_$S(COUNT(STATION,CLASS,"NC","ATD")=1:" has",1:"s have")_" been replaced to date"
40 . I COUNT(STATION,CLASS,"NC","ATD")'>0 W "."
41 . E D
42 .. W " at a cost of $"_$P(^TMP($J,STATION,CLASS,"NC","ATD")+.5,".")_"."
43 .. W !," The original estimate for replacing "_$S(COUNT(STATION,CLASS,"NC","ATD")=1:"this item",COUNT(STATION,CLASS,"NC","ATD")=2:"both of these items",1:"these "_COUNT(STATION,CLASS,"NC","ATD")_" items")
44 .. W " was $"_$P(^TMP($J,STATION,CLASS,"NC","ETD")+.5,".")_"."
45 . I COUNT(STATION,CLASS,"NC","REP")>0 D
46 .. W !," The original estimate for replacing "_$S(COUNT(STATION,CLASS,"NC","REP")=1:"this item",COUNT(STATION,CLASS,"NC","REP")=2:"both of these items",1:"all of these "_COUNT(STATION,CLASS,"NC","REP")_" items")
47 .. W " was $"_$P(^TMP($J,STATION,CLASS,"NC","ETOT")+.5,".")_"."
48 .. I COUNT(STATION,CLASS,"NC","REP")>COUNT(STATION,CLASS,"NC","ATD") D
49 ... W !," The current estimate for replacing the remaining "_(COUNT(STATION,CLASS,"NC","REP")-COUNT(STATION,CLASS,"NC","ATD"))_" item(s) is $"_($P(^TMP($J,STATION,CLASS,"NC","ETOT")+.5,".")-$P(^TMP($J,STATION,CLASS,"NC","ETD")+.5,"."))_"."
50 .. I IOSL<60 D HOLD,HDR Q:$G(ESCAPE)
51 .. I IOSL>59 W !
52 .. W !,?15,"REPLACEMENT SCHEDULE ("_COUNT(STATION,CLASS,"NC","SREP")_" equipment records)"
53 .. W !," Calendar 1998 Calendar 1999 Calendar 2000"
54 .. W !,"Month Count Est cost($) Count Est Cost($) Count Est Cost($)"
55 .. W !,UL
56 .. F J=1:1:12 W !,$P(MONTH,U,J),?13,$J(COUNT(STATION,CLASS,"NC","SCHDT",1998,J),5),?24,$J(^TMP($J,STATION,CLASS,"NC","ECST",1998,J),7,0) D
57 ... W ?36,$J(COUNT(STATION,CLASS,"NC","SCHDT",1999,J),5),?47,$J(^TMP($J,STATION,CLASS,"NC","ECST",1999,J),7,0)
58 ... W ?59,$J(COUNT(STATION,CLASS,"NC","SCHDT",2000,J),5),?70,$J(^TMP($J,STATION,CLASS,"NC","ECST",2000,J),7,0)
59 .. W !,"Unknown",?13,$J(COUNT(STATION,CLASS,"NC","SCHDT",1998,0),5),?24,$J(^TMP($J,STATION,CLASS,"NC","ECST",1998,0),7,0) D
60 ... W ?36,$J(COUNT(STATION,CLASS,"NC","SCHDT",1999,0),5),?47,$J(^TMP($J,STATION,CLASS,"NC","ECST",1999,0),7,0)
61 ... W ?59,$J(COUNT(STATION,CLASS,"NC","SCHDT",2000,0),5),?70,$J(^TMP($J,STATION,CLASS,"NC","ECST",2000,0),7,0)
62CC Q:'COUNT(STATION,CLASS,"CC")
63 I IOSL<60 D HOLD,HDR Q:$G(ESCAPE)
64 W:IOSL>59 !
65 W !,?18,"UPDATE SCHEDULE ("_COUNT(STATION,CLASS,"CC")_" equipment records)"
66 W !," Calendar 1998 Calendar 1999 Calendar 2000"
67 W !,"Month Count Est cost($) Count Est Cost($) Count Est Cost($)"
68 W !,UL
69 F J=1:1:12 W !,$P(MONTH,U,J),?13,$J(COUNT(STATION,CLASS,"CC","UPG",1998,J),5),?24,$J(^TMP($J,STATION,CLASS,"CC","ECST",1998,J),7,0) D
70 . W ?36,$J(COUNT(STATION,CLASS,"CC","UPG",1999,J),5),?47,$J(^TMP($J,STATION,CLASS,"CC","ECST",1999,J),7,0)
71 . W ?59,$J(COUNT(STATION,CLASS,"CC","UPG",2000,J),5),?70,$J(^TMP($J,STATION,CLASS,"CC","ECST",2000,J),7,0)
72 W !,UL
73 W !,"Estimated total cost of updating "_COUNT(STATION,CLASS,"CC")_" item(s) is $"_^TMP($J,STATION,CLASS,"CC","ECST")_"."
74 Q
75 ;
76HDR ; report header
77 Q:$G(ESCAPE)
78 W:PAGE>0!($E(IOST,1,2)="C-") @IOF S PAGE=PAGE+1
79 W "Cumulative Y2K Report as of "_DATE("PRNT"),?65,"Page: "_PAGE
80 W !,$S(ENSTN:"Station: "_STATION,1:"Consolidated ("_STATION("PARNT")_")")
81 W ?40,"FUNCTIONAL CLASSIFICATION: "_$S('$G(ENCLASS):"ALL",CLASS=0:"Null",1:CLASS)
82 W !,UL
83 Q
84 ;
85HOLD Q:$E(IOST,1,2)'="C-"!($G(ESCAPE))
86 W !!,"Press <RETURN> to continue, '^' to escape..." R X:DTIME
87 I '$T!($E(X)="^") S ESCAPE=1
88 Q
89 ;ENY2REP6
Note: See TracBrowser for help on using the repository browser.