source: FOIAVistA/tag/r/ENGINEERING-EN/ENY2REP5.m@ 1093

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

initial load of FOIAVistA 6/30/08 version

File size: 4.4 KB
Line 
1ENY2REP5 ;;(WIRMFO)/DH-Overall Y2K Status by Man~Mod ;9.30.98
2 ;;7.0;ENGINEERING;**51,55**;August 17, 1993
3VIEW ; status of Y2K data base by manufacturer~model
4 ; counts only, no costing information
5 W @IOF,!!,?20,"** STATUS OF Y2K EQUIPMENT DATA BASE **"
6 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
7 S ALLSTN=0
8 I $P(^DIC(6910,1,0),U,10)!($D(^DIC(6910,1,3))) D
9 . W !! S DIR(0)="Y",DIR("A")="Do you want a breakout by station",DIR("B")="NO"
10 . S DIR("?",1)="If you say 'NO' you will obtain a single report for all your equipment,"
11 . S DIR("?")="regardless of which station it belongs to."
12 . D ^DIR K DIR I $D(DIRUT) S ALLSTN="^" Q
13 . S ALLSTN=Y
14 I ALLSTN=U K ALLSTN Q
15 W !! S DIR(0)="YA",DIR("A")="Shall we ignore equipment records with no Y2K issues? ",DIR("B")="YES"
16 S DIR("?",1)="Enter YES if you do not wish the counts to include equipment records for"
17 S DIR("?")="which the Y2K CATEGORY is 'FC' or 'NA'."
18 D ^DIR K DIR I $D(DIRUT) K ALLSTN Q
19 S ENSUP=Y
20 W !! K IO("Q") S %ZIS="QM" D ^%ZIS I POP K ALLSTN,ENSUP Q
21 I $D(IO("Q")) S ZTRTN="VIEW1^ENY2REP5" D K ALLSTN,ENSUP G EXIT
22 . S ZTDESC="Y2K Equipment Snapshot",ZTIO=ION
23 . S ZTSAVE("ALLSTN")="",ZTSAVE("ENSUP")=""
24 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
25 ;
26VIEW1 K ^TMP($J)
27 N MAN,MOD,CAT,PAGE,DATE,LINE,ESCAPE,TOTAL,STATION
28 S PAGE=0 D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2)
29 S STATION("PARNT")=$P($G(^DIC(6910,1,0)),U,2)
30 S STATION=STATION("PARNT")
31 S TOTAL(STATION,"GRAND")=0 F J=0,"FC","NC","CC","NA" S TOTAL(STATION,J)=0 ; initialize
32 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")]""
33 . 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]""
34 .. I '$P(^ENG(6914,DA,1),U,4) K ^ENG(6914,"K",MAN,DA) S DA=$O(^ENG(6914,"K",MAN,DA),-1) Q ;broken x-ref
35 .. I "^4^5^"[(U_$P($G(^ENG(6914,DA,3)),U)_U) Q ;inactive record
36 .. S CAT=$P($G(^ENG(6914,DA,11)),U) S:CAT="" CAT=0
37 .. I '$D(ZTQUEUED),'(DA#100) W "." ; activity indicator
38 .. I ENSUP,"^FC^NA^"[(U_CAT_U) Q ; suppress the 'don't cares'
39 .. I ALLSTN S STATION=$S($P($G(^ENG(6914,DA,9)),U,5)]"":$P(^(9),U,5),1:STATION("PARNT")) D:'$D(TOTAL(STATION))
40 ... S TOTAL(STATION,"GRAND")=0 F J=0,"FC","NC","CC","NA" S TOTAL(STATION,J)=0
41 .. I '$D(^TMP($J,STATION,MAN("E"),MOD,CAT)) F J=0,"FC","NC","CC","NA" S ^TMP($J,STATION,MAN("E"),MOD,J)=0
42 .. S ^TMP($J,STATION,MAN("E"),MOD,CAT)=^(CAT)+1,TOTAL(STATION,CAT)=TOTAL(STATION,CAT)+1
43 .. S TOTAL(STATION,"GRAND")=TOTAL(STATION,"GRAND")+1
44 ;
45VIEWPRT ; print the snapshot
46 U IO
47 I '$D(^TMP($J)) D VIEWHDR W !!,?15,"<Nothing to print>" D HOLD G EXIT
48 S STATION=0 F S STATION=$O(^TMP($J,STATION)) Q:STATION="" D VIEWHDR D D:'$G(ESCAPE) HOLD Q:$G(ESCAPE) W @IOF
49 . 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,20) F S MOD=$O(^TMP($J,STATION,MAN("E"),MOD)) Q:MOD=""!(ESCAPE) S MOD("E")=$E(MOD,1,14) D
50 .. W !,MAN("PRNT")_"~"_MOD("E"),?42 W:'ENSUP $J(^TMP($J,STATION,MAN("E"),MOD,"FC"),5) W ?48,$J(^TMP($J,STATION,MAN("E"),MOD,"NC"),5),?54,$J(^("CC"),5)
51 .. W ?60 W:'ENSUP $J(^TMP($J,STATION,MAN("E"),MOD,"NA"),5) W ?66,$J(^TMP($J,STATION,MAN("E"),MOD,0),5)
52 .. S TOTAL=0 F J=0,"FC","NC","CC","NA" S TOTAL=TOTAL+^TMP($J,STATION,MAN("E"),MOD,J)
53 .. W ?72,$J(TOTAL,5)
54 .. K ^TMP($J,STATION,MAN("E"),MOD)
55 .. S LINE=LINE+1 I (IOSL-LINE)'>4 D HOLD Q:ESCAPE D:$D(^TMP($J)) VIEWHDR
56 . I '$G(ESCAPE) D
57 .. K X S $P(X,"-",79)="-" W !,X
58 .. W !,"TOTALS",?42 W:'ENSUP $J(TOTAL(STATION,"FC"),5) W ?48,$J(TOTAL(STATION,"NC"),5),?54,$J(TOTAL(STATION,"CC"),5),?60 W:'ENSUP $J(TOTAL(STATION,"NA"),5) W ?66,$J(TOTAL(STATION,0),5),?72,$J(TOTAL(STATION,"GRAND"),5)
59 G EXIT
60 ;
61VIEWHDR ; header for Y2K snapshot
62 W:$E(IOST,1,2)="C-"!(PAGE) @IOF S PAGE=PAGE+1,LINE=3
63 W "Y2K Equipment Status - Counts Only Printed: "_DATE("PRNT")_" Page: "_PAGE
64 I ENSUP W !,"Equipment Records with Y2K Category of 'FC' or 'NA' are not being counted." S LINE=LINE+1
65 W !,"Manufacturer~Model "_$S('ALLSTN:"(Consolidated: "_STATION("PARNT")_")",1:"(Station: "_STATION_")"),?45,"FC NC CC NA Null TOTAL"
66 K X S $P(X,"-",79)="-" W !,X
67 Q
68 ;
69HOLD Q:$E(IOST,1,2)'="C-"
70 W !!,"Press <RETURN> to continue, '^' to escape..." R X:DTIME
71 I '$T!($E(X)="^") S ESCAPE=1
72 Q
73EXIT ;
74 K ^TMP($J)
75 D ^%ZISC,HOME^%ZIS
76 I $D(ZTQUEUED) S ZTREQN="@"
77 K J,K,X,ALLSTN,ENSUP
78 Q
79 ;ENY2REP5
Note: See TracBrowser for help on using the repository browser.