- ENY2REP2 ;;(WIRMFO)/DH-Y2K Category Summary Report ;9.30.98
- ;;7.0;ENGINEERING;**51,55**;August 17, 1993
- ;
- Y2KCAT ; snapshot of Y2K data base by manufacturer~model for a given
- ; Y2K category
- W @IOF,!!,?20,"** SNAPSHOT OF Y2K EQUIPMENT DATA BASE **"
- W !,?22,"(Summary for a specific Y2K category)"
- 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
- S ALLSTN=0
- I $P(^DIC(6910,1,0),U,10)!($D(^DIC(6910,1,3))) D I ALLSTN="^" K ALLSTN Q
- . W !! S DIR(0)="Y",DIR("A")="Do you want a breakout by station",DIR("B")="NO"
- . S DIR("?",1)="If you say 'NO' you will obtain a single report for all your equipment,"
- . S DIR("?")="regardless of which station it belongs to."
- . D ^DIR K DIR I $D(DIRUT) S ALLSTN="^" Q
- . S ALLSTN=Y
- 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"
- S DIR("?",1)="FULLY COMPLIANT => Device will function properly in all respects on"
- S DIR("?",2)=" January 1, 2000 without user intervention."
- S DIR("?",3)="CONDITIONALLY COMPLIANT => Device requires user intervention to function"
- S DIR("?",4)=" properly in all respects on January 1, 2000. This may include a"
- S DIR("?",5)=" manufacturer software and/or hardware update or other one-time"
- S DIR("?",6)=" user action."
- S DIR("?",7)="NON-COMPLIANT => Device will not function properly on January 1, 2000 and"
- S DIR("?",8)=" no manufacturer remedy is available. Site must decide whether to"
- S DIR("?",9)=" retire, replace, renovate/upgrade, or retain and use this device."
- S DIR("?",10)="NOT APPLICABLE => There are no Y2K implications for this device."
- S DIR("?")="NULL => No Y2K category has been entered for this device."
- D ^DIR K DIR I $D(DIRUT) K ALLSTN Q
- S CAT=Y,CAT("E")=Y(0)
- W !! K IO("Q") S %ZIS="QM" D ^%ZIS I POP K ALLSTN,CAT Q
- I $D(IO("Q")) S ZTRTN="Y2KCAT1^ENY2REP2" D K ALLSTN,CAT G EXIT
- . S ZTDESC="Y2K Equipment Snapshot by Y2K Category"
- . S ZTSAVE("ALLSTN")="",ZTSAVE("CAT")="",ZTSAVE("CAT(""E"")")=""
- . D ^%ZTLOAD,HOME^%ZIS K ZTSK
- ;
- Y2KCAT1 K ^TMP($J)
- N MAN,MOD,PAGE,DATE,LINE,ESCAPE,TOTAL,STATION,DA,REPL,EST,ACT
- S PAGE=0 D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2)
- S STATION("PARNT")=$P($G(^DIC(6910,1,0)),U,2)
- S STATION=STATION("PARNT")
- F J="COUNT","EST","ACT" S TOTAL(STATION,J)=0 ; initialize
- 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")]""
- . 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]""
- .. I '$D(ZTQUEUED),'(DA#100) W "." ; activity indicator
- .. Q:"^4^5^"[(U_$P($G(^ENG(6914,DA,3)),U)_U) ; ck for turn-ins
- .. S EN=$G(^ENG(6914,DA,11))
- .. S CAT("DA")=$P(EN,U) S:CAT("DA")="" CAT("DA")="NL"
- .. Q:CAT("DA")'=CAT ;not what we're counting
- .. 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
- .. I '$D(^TMP($J,STATION,MAN("E"),MOD)) F J="COUNT","EST","ACT" S ^TMP($J,STATION,MAN("E"),MOD,J)=0
- .. S TOTAL(STATION,"COUNT")=TOTAL(STATION,"COUNT")+1,^TMP($J,STATION,MAN("E"),MOD,"COUNT")=^TMP($J,STATION,MAN("E"),MOD,"COUNT")+1
- .. I CAT="FC" D Q
- ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$P(EN,U,3),TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+$P(EN,U,4)
- ... 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)
- .. I CAT="CC" D Q
- ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$P(EN,U,3)
- ... S ^TMP($J,STATION,MAN("E"),MOD,"EST")=^TMP($J,STATION,MAN("E"),MOD,"EST")+$P(EN,U,3)
- .. I CAT="NC" D
- ... S ACT=0,EST=0,REPL=""
- ... I $P(EN,U,6)="REP" S EST=$P($G(^ENG(6914,DA,2)),U,3),REPL=$O(^ENG(6914,"AO",DA,0))
- ... I REPL,$D(^ENG(6914,REPL,2)) S ACT=$P(^(2),U,3)
- ... S TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+EST,TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+ACT
- ... S ^TMP($J,STATION,MAN("E"),MOD,"EST")=^TMP($J,STATION,MAN("E"),MOD,"EST")+EST,^("ACT")=^("ACT")+ACT
- .. Q
- ;
- CATPRNT ; print the snapshot
- U IO W:$E(IOST,1,2)="C-" @IOF
- I '$D(^TMP($J)) D CATHDR W !!,?15,"<Nothing to print>" D HOLD G EXIT
- S STATION=0 F S STATION=$O(^TMP($J,STATION)) Q:STATION=""!($G(ESCAPE)) D CATHDR D D HOLD Q:$G(ESCAPE) W @IOF
- . 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
- .. 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)
- .. K ^TMP($J,STATION,MAN("E"),MOD)
- .. S LINE=LINE+1 I (IOSL-LINE)'>4 D HOLD Q:ESCAPE I $D(^TMP($J)) W @IOF D CATHDR
- . Q:$G(ESCAPE)
- . K X S $P(X,"-",79)="-" W !,X
- . W !,"TOTALS",?50,$J(TOTAL(STATION,"COUNT"),5),?60,$J(TOTAL(STATION,"EST"),8,2),?70,$J(TOTAL(STATION,"ACT"),8,2)
- G EXIT
- ;
- CATHDR ; header for Y2K snapshot
- S PAGE=PAGE+1,LINE=3
- W "Y2K Summary Snapshot for "_CAT("E")_" "_DATE("PRNT")_" ",?70,"Page: "_PAGE
- W !,"Manufacturer~Model "_$S('ALLSTN:"Consolidated",1:"Station: "_STATION),?50,"Count Estimated $ Actual $"
- K X S $P(X,"-",79)="-" W !,X
- Q
- ;
- HOLD Q:$E(IOST,1,2)'="C-"!($G(ESCAPE))
- W !!,"Press <RETURN> to continue, '^' to escape..." R X:DTIME
- I '$T!($E(X)="^") S ESCAPE=1
- Q
- EXIT ;
- K ^TMP($J) D ^%ZISC,HOME^%ZIS
- I $D(ZTQUEUED) S ZTREQN="@"
- K EN,J,K,X,ALLSTN,CAT
- Q
- ;ENY2REP2
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENY2REP2 5629 printed Mar 13, 2025@21:02:06 Page 2
- ENY2REP2 ;;(WIRMFO)/DH-Y2K Category Summary Report ;9.30.98
- +1 ;;7.0;ENGINEERING;**51,55**;August 17, 1993
- +2 ;
- Y2KCAT ; snapshot of Y2K data base by manufacturer~model for a given
- +1 ; Y2K category
- +2 WRITE @IOF,!!,?20,"** SNAPSHOT OF Y2K EQUIPMENT DATA BASE **"
- +3 WRITE !,?22,"(Summary for a specific Y2K category)"
- +4 IF $PIECE($GET(^DIC(6910,1,0)),U,2)']""
- WRITE !!,"There is no STATION NUMBER in your Engineering Init Paramaters file.",!,"Can't proceed.",*7
- QUIT
- +5 SET ALLSTN=0
- +6 IF $PIECE(^DIC(6910,1,0),U,10)!($DATA(^DIC(6910,1,3)))
- Begin DoDot:1
- +7 WRITE !!
- SET DIR(0)="Y"
- SET DIR("A")="Do you want a breakout by station"
- SET DIR("B")="NO"
- +8 SET DIR("?",1)="If you say 'NO' you will obtain a single report for all your equipment,"
- +9 SET DIR("?")="regardless of which station it belongs to."
- +10 DO ^DIR
- KILL DIR
- IF $DATA(DIRUT)
- SET ALLSTN="^"
- QUIT
- +11 SET ALLSTN=Y
- End DoDot:1
- IF ALLSTN="^"
- KILL ALLSTN
- QUIT
- +12 SET DIR(0)="SM^FC:FULLY COMPLIANT;CC:CONDITIONALLY COMPLIANT;NC:NON-COMPLIANT;NA:NOT APPLICABLE;NL:NULL"
- SET DIR("A")="Please select the Y2K CATEGORY for which you would like counts"
- SET DIR("B")="CC"
- +13 SET DIR("?",1)="FULLY COMPLIANT => Device will function properly in all respects on"
- +14 SET DIR("?",2)=" January 1, 2000 without user intervention."
- +15 SET DIR("?",3)="CONDITIONALLY COMPLIANT => Device requires user intervention to function"
- +16 SET DIR("?",4)=" properly in all respects on January 1, 2000. This may include a"
- +17 SET DIR("?",5)=" manufacturer software and/or hardware update or other one-time"
- +18 SET DIR("?",6)=" user action."
- +19 SET DIR("?",7)="NON-COMPLIANT => Device will not function properly on January 1, 2000 and"
- +20 SET DIR("?",8)=" no manufacturer remedy is available. Site must decide whether to"
- +21 SET DIR("?",9)=" retire, replace, renovate/upgrade, or retain and use this device."
- +22 SET DIR("?",10)="NOT APPLICABLE => There are no Y2K implications for this device."
- +23 SET DIR("?")="NULL => No Y2K category has been entered for this device."
- +24 DO ^DIR
- KILL DIR
- IF $DATA(DIRUT)
- KILL ALLSTN
- QUIT
- +25 SET CAT=Y
- SET CAT("E")=Y(0)
- +26 WRITE !!
- KILL IO("Q")
- SET %ZIS="QM"
- DO ^%ZIS
- IF POP
- KILL ALLSTN,CAT
- QUIT
- +27 IF $DATA(IO("Q"))
- SET ZTRTN="Y2KCAT1^ENY2REP2"
- Begin DoDot:1
- +28 SET ZTDESC="Y2K Equipment Snapshot by Y2K Category"
- +29 SET ZTSAVE("ALLSTN")=""
- SET ZTSAVE("CAT")=""
- SET ZTSAVE("CAT(""E"")")=""
- +30 DO ^%ZTLOAD
- DO HOME^%ZIS
- KILL ZTSK
- End DoDot:1
- KILL ALLSTN,CAT
- GOTO EXIT
- +31 ;
- Y2KCAT1 KILL ^TMP($JOB)
- +1 NEW MAN,MOD,PAGE,DATE,LINE,ESCAPE,TOTAL,STATION,DA,REPL,EST,ACT
- +2 SET PAGE=0
- DO NOW^%DTC
- SET Y=%
- XECUTE ^DD("DD")
- SET DATE("PRNT")=$PIECE(Y,":",1,2)
- +3 SET STATION("PARNT")=$PIECE($GET(^DIC(6910,1,0)),U,2)
- +4 SET STATION=STATION("PARNT")
- +5 ; initialize
- FOR J="COUNT","EST","ACT"
- SET TOTAL(STATION,J)=0
- +6 SET MAN=0
- FOR
- SET MAN=$ORDER(^ENG(6914,"K",MAN))
- if 'MAN
- QUIT
- SET MAN("E")=$PIECE($GET(^ENG("MFG",MAN,0)),U)
- if MAN("E")]""
- Begin DoDot:1
- +7 SET DA=0
- FOR
- SET DA=$ORDER(^ENG(6914,"K",MAN,DA))
- if 'DA
- QUIT
- SET MOD=$PIECE($GET(^ENG(6914,DA,1)),U,2)
- if MOD]""
- Begin DoDot:2
- +8 ; activity indicator
- IF '$DATA(ZTQUEUED)
- IF '(DA#100)
- WRITE "."
- +9 ; ck for turn-ins
- if "^4^5^"[(U_$PIECE($GET(^ENG(6914,DA,3)),U)_U)
- QUIT
- +10 SET EN=$GET(^ENG(6914,DA,11))
- +11 SET CAT("DA")=$PIECE(EN,U)
- if CAT("DA")=""
- SET CAT("DA")="NL"
- +12 ;not what we're counting
- if CAT("DA")'=CAT
- QUIT
- +13 IF ALLSTN
- SET STATION=$SELECT($PIECE($GET(^ENG(6914,DA,9)),U,5)]"":$PIECE(^(9),U,5),1:STATION("PARNT"))
- IF '$DATA(TOTAL(STATION))
- FOR J="COUNT","EST","ACT"
- SET TOTAL(STATION,J)=0
- +14 IF '$DATA(^TMP($JOB,STATION,MAN("E"),MOD))
- FOR J="COUNT","EST","ACT"
- SET ^TMP($JOB,STATION,MAN("E"),MOD,J)=0
- +15 SET TOTAL(STATION,"COUNT")=TOTAL(STATION,"COUNT")+1
- SET ^TMP($JOB,STATION,MAN("E"),MOD,"COUNT")=^TMP($JOB,STATION,MAN("E"),MOD,"COUNT")+1
- +16 IF CAT="FC"
- Begin DoDot:3
- +17 SET TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$PIECE(EN,U,3)
- SET TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+$PIECE(EN,U,4)
- +18 SET ^TMP($JOB,STATION,MAN("E"),MOD,"EST")=^TMP($JOB,STATION,MAN("E"),MOD,"EST")+$PIECE(EN,U,3)
- SET ^("ACT")=^("ACT")+$PIECE(EN,U,4)
- End DoDot:3
- QUIT
- +19 IF CAT="CC"
- Begin DoDot:3
- +20 SET TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+$PIECE(EN,U,3)
- +21 SET ^TMP($JOB,STATION,MAN("E"),MOD,"EST")=^TMP($JOB,STATION,MAN("E"),MOD,"EST")+$PIECE(EN,U,3)
- End DoDot:3
- QUIT
- +22 IF CAT="NC"
- Begin DoDot:3
- +23 SET ACT=0
- SET EST=0
- SET REPL=""
- +24 IF $PIECE(EN,U,6)="REP"
- SET EST=$PIECE($GET(^ENG(6914,DA,2)),U,3)
- SET REPL=$ORDER(^ENG(6914,"AO",DA,0))
- +25 IF REPL
- IF $DATA(^ENG(6914,REPL,2))
- SET ACT=$PIECE(^(2),U,3)
- +26 SET TOTAL(STATION,"EST")=TOTAL(STATION,"EST")+EST
- SET TOTAL(STATION,"ACT")=TOTAL(STATION,"ACT")+ACT
- +27 SET ^TMP($JOB,STATION,MAN("E"),MOD,"EST")=^TMP($JOB,STATION,MAN("E"),MOD,"EST")+EST
- SET ^("ACT")=^("ACT")+ACT
- End DoDot:3
- +28 QUIT
- End DoDot:2
- End DoDot:1
- +29 ;
- CATPRNT ; print the snapshot
- +1 USE IO
- if $EXTRACT(IOST,1,2)="C-"
- WRITE @IOF
- +2 IF '$DATA(^TMP($JOB))
- DO CATHDR
- WRITE !!,?15,"<Nothing to print>"
- DO HOLD
- GOTO EXIT
- +3 SET STATION=0
- FOR
- SET STATION=$ORDER(^TMP($JOB,STATION))
- if STATION=""!($GET(ESCAPE))
- QUIT
- DO CATHDR
- Begin DoDot:1
- +4 SET MAN("E")=0
- SET (MOD,ESCAPE)=0
- FOR
- SET MAN("E")=$ORDER(^TMP($JOB,STATION,MAN("E")))
- if MAN("E")=""
- QUIT
- SET MAN("PRNT")=$EXTRACT(MAN("E"),1,30)
- FOR
- SET MOD=$ORDER(^TMP($JOB,STATION,MAN("E"),MOD))
- if MOD=""!(ESCAPE)
- QUIT
- SET MOD("E")=$EXTRACT(MOD,1,20)
- Begin DoDot:2
- +5 WRITE !,MAN("PRNT")_"~"_MOD("E"),?51,$JUSTIFY(^TMP($JOB,STATION,MAN("E"),MOD,"COUNT"),4),?60,$JUSTIFY(^("EST"),8,2),?70,$JUSTIFY(^("ACT"),8,2)
- +6 KILL ^TMP($JOB,STATION,MAN("E"),MOD)
- +7 SET LINE=LINE+1
- IF (IOSL-LINE)'>4
- DO HOLD
- if ESCAPE
- QUIT
- IF $DATA(^TMP($JOB))
- WRITE @IOF
- DO CATHDR
- End DoDot:2
- +8 if $GET(ESCAPE)
- QUIT
- +9 KILL X
- SET $PIECE(X,"-",79)="-"
- WRITE !,X
- +10 WRITE !,"TOTALS",?50,$JUSTIFY(TOTAL(STATION,"COUNT"),5),?60,$JUSTIFY(TOTAL(STATION,"EST"),8,2),?70,$JUSTIFY(TOTAL(STATION,"ACT"),8,2)
- End DoDot:1
- DO HOLD
- if $GET(ESCAPE)
- QUIT
- WRITE @IOF
- +11 GOTO EXIT
- +12 ;
- CATHDR ; header for Y2K snapshot
- +1 SET PAGE=PAGE+1
- SET LINE=3
- +2 WRITE "Y2K Summary Snapshot for "_CAT("E")_" "_DATE("PRNT")_" ",?70,"Page: "_PAGE
- +3 WRITE !,"Manufacturer~Model "_$SELECT('ALLSTN:"Consolidated",1:"Station: "_STATION),?50,"Count Estimated $ Actual $"
- +4 KILL X
- SET $PIECE(X,"-",79)="-"
- WRITE !,X
- +5 QUIT
- +6 ;
- HOLD if $EXTRACT(IOST,1,2)'="C-"!($GET(ESCAPE))
- QUIT
- +1 WRITE !!,"Press <RETURN> to continue, '^' to escape..."
- READ X:DTIME
- +2 IF '$TEST!($EXTRACT(X)="^")
- SET ESCAPE=1
- +3 QUIT
- EXIT ;
- +1 KILL ^TMP($JOB)
- DO ^%ZISC
- DO HOME^%ZIS
- +2 IF $DATA(ZTQUEUED)
- SET ZTREQN="@"
- +3 KILL EN,J,K,X,ALLSTN,CAT
- +4 QUIT
- +5 ;ENY2REP2