ENY2REP1 ;;(WIRMFO)/DH-Y2K Category Reports ;8.19.98
;;7.0;ENGINEERING;**51,55**;August 17, 1993
EN ; print counts by equipment category or manufacturer, decreasing order
; indicate Y2K status
W @IOF,!,?20,"** SUMMARY OF Y2K EQUIPMENT DATA **"
I $P($G(^DIC(6910,1,0)),U,2)']"" W !!,"There is no STATION NUMBER in your Engineering Init Parameters file.",!,"Can't proceed." Q
W ! S DIR(0)="SM^CAT:EQUIPMENT CATEGORY;MFG:MANUFACTURER;CSN:CATEGORY STOCK NUMBER",DIR("A")="Print Summary by",DIR("B")="CAT"
D ^DIR K DIR Q:$D(DIRUT)
S ENTYPE=Y
W ! S DIR(0)="YA",DIR("A")="Shall we ignore "_$S(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" with no Y2K issues? ",DIR("B")="YES"
S DIR("?",1)="Enter YES if you do not wish to see counts for "_$S(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" for"
S DIR("?")="which all of the equipment entries have Y2K CATEGORIES of 'NA' or 'FC'."
D ^DIR K DIR I $D(DIRUT) K ENTYPE Q
S ENSUP=Y
W ! S DIR(0)="SM^A:ALPHABETICALLY;C:BY COUNT",DIR("A")="Sort List",DIR("B")="ALPHABETICALLY"
S DIR("?")="If COUNT is specified then large groupings will be at the top of your list."
D ^DIR K DIR I $D(DIRUT) K ENTYPE,ENSUP Q
S ENSORT=Y
I ENSORT="C" D I $D(DIRUT) K ENTYPE,ENSUP,ENSORT Q
. W ! S DIR(0)="N^1:9999:0",DIR("A")="Only print "_$S(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" with COUNT of at least",DIR("B")=1
. S DIR("?")="This feature allows you to print only the high count entries."
. D ^DIR K DIR Q:$D(DIRUT)
. S ENSORT("MIN")=Y
S ENSTN=0
I $P(^DIC(6910,1,0),U,10)!($D(^DIC(6910,1,3))) D I ENSTN="^" K ENTYPE,ENSUP,ENSORT,ENSTN Q
. 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."
. W ! D ^DIR K DIR I $D(DIRUT) S ENSTN="^" Q
. S ENSTN=Y
W !! K IO("Q") S %ZIS="QM" D ^%ZIS I POP K ENTYPE,ENSUP,ENSORT,ENSTN Q
I $D(IO("Q")) S ZTRTN="DEQUE^ENY2REP8" D K ENTYPE,ENSUP,ENSORT,ENSTN Q
. S ZTSAVE("EN*")="",ZTDESC="Y2K Counts by EQUIPMENT CATEGORY"
. S ZTIO=ION D ^%ZTLOAD,HOME^%ZIS K ZTSK
;
G DEQUE^ENY2REP8
;ENY2REP1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENY2REP1 2338 printed Dec 13, 2024@01:57:25 Page 2
ENY2REP1 ;;(WIRMFO)/DH-Y2K Category Reports ;8.19.98
+1 ;;7.0;ENGINEERING;**51,55**;August 17, 1993
EN ; print counts by equipment category or manufacturer, decreasing order
+1 ; indicate Y2K status
+2 WRITE @IOF,!,?20,"** SUMMARY OF Y2K EQUIPMENT DATA **"
+3 IF $PIECE($GET(^DIC(6910,1,0)),U,2)']""
WRITE !!,"There is no STATION NUMBER in your Engineering Init Parameters file.",!,"Can't proceed."
QUIT
+4 WRITE !
SET DIR(0)="SM^CAT:EQUIPMENT CATEGORY;MFG:MANUFACTURER;CSN:CATEGORY STOCK NUMBER"
SET DIR("A")="Print Summary by"
SET DIR("B")="CAT"
+5 DO ^DIR
KILL DIR
if $DATA(DIRUT)
QUIT
+6 SET ENTYPE=Y
+7 WRITE !
SET DIR(0)="YA"
SET DIR("A")="Shall we ignore "_$SELECT(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" with no Y2K issues? "
SET DIR("B")="YES"
+8 SET DIR("?",1)="Enter YES if you do not wish to see counts for "_$SELECT(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" for"
+9 SET DIR("?")="which all of the equipment entries have Y2K CATEGORIES of 'NA' or 'FC'."
+10 DO ^DIR
KILL DIR
IF $DATA(DIRUT)
KILL ENTYPE
QUIT
+11 SET ENSUP=Y
+12 WRITE !
SET DIR(0)="SM^A:ALPHABETICALLY;C:BY COUNT"
SET DIR("A")="Sort List"
SET DIR("B")="ALPHABETICALLY"
+13 SET DIR("?")="If COUNT is specified then large groupings will be at the top of your list."
+14 DO ^DIR
KILL DIR
IF $DATA(DIRUT)
KILL ENTYPE,ENSUP
QUIT
+15 SET ENSORT=Y
+16 IF ENSORT="C"
Begin DoDot:1
+17 WRITE !
SET DIR(0)="N^1:9999:0"
SET DIR("A")="Only print "_$SELECT(ENTYPE="CAT":"EQUIPMENT CATEGORIES",ENTYPE="MFG":"MANUFACTURERS",1:"CATEGORY STOCK NUMBERS")_" with COUNT of at least"
SET DIR("B")=1
+18 SET DIR("?")="This feature allows you to print only the high count entries."
+19 DO ^DIR
KILL DIR
if $DATA(DIRUT)
QUIT
+20 SET ENSORT("MIN")=Y
End DoDot:1
IF $DATA(DIRUT)
KILL ENTYPE,ENSUP,ENSORT
QUIT
+21 SET ENSTN=0
+22 IF $PIECE(^DIC(6910,1,0),U,10)!($DATA(^DIC(6910,1,3)))
Begin DoDot:1
+23 SET DIR(0)="Y"
SET DIR("A")="Do you want a breakout by station"
SET DIR("B")="NO"
+24 SET DIR("?",1)="If you say 'NO' you will obtain a single report for all your equipment,"
+25 SET DIR("?")="regardless of which station it belongs to."
+26 WRITE !
DO ^DIR
KILL DIR
IF $DATA(DIRUT)
SET ENSTN="^"
QUIT
+27 SET ENSTN=Y
End DoDot:1
IF ENSTN="^"
KILL ENTYPE,ENSUP,ENSORT,ENSTN
QUIT
+28 WRITE !!
KILL IO("Q")
SET %ZIS="QM"
DO ^%ZIS
IF POP
KILL ENTYPE,ENSUP,ENSORT,ENSTN
QUIT
+29 IF $DATA(IO("Q"))
SET ZTRTN="DEQUE^ENY2REP8"
Begin DoDot:1
+30 SET ZTSAVE("EN*")=""
SET ZTDESC="Y2K Counts by EQUIPMENT CATEGORY"
+31 SET ZTIO=ION
DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
End DoDot:1
KILL ENTYPE,ENSUP,ENSORT,ENSTN
QUIT
+32 ;
+33 GOTO DEQUE^ENY2REP8
+34 ;ENY2REP1