ENEQRP ;(WASH ISC)/DH-Equipment Report Driver ;6-8-89
V ;;7.0;ENGINEERING;;Aug 17, 1993
;
S %OPT="OPT"
SE D:'$D(DT) DT^DICRW S U="^",S=";",%O=$T(@(%OPT))
I $D(^DOPT($P(%O,S,5),"VERSION")),($P($T(V),S,3)=^DOPT($P(%O,S,5),"VERSION")) G IN
K ^DOPT($P(%O,S,5))
F I=1:1 Q:$P($T(@(%OPT)+I),S,3)="" S %OP=I,^DOPT($P(%O,S,5),I,0)=$P($T(@(%OPT)+I),S,3),^DOPT($P(%O,S,5),"B",$P($P($T(@(%OPT)+I),S,3),"^",1),I)=""
S K=I-1,^DOPT($P(%O,S,5),0)=$P(%O,S,4)_U_1_U_K_U_K K I,K,X S ^DOPT($P(%O,S,5),"VERSION")=$P($T(V),S,3)
IN I $P(%O,S,6)'="" D @($P(%O,S,6))
PR Q:'$D(%OPT) K %O(1) S %O=$T(@(%OPT)),S=";",IOP="HOME" S:$P(%O,S,9)'="" %O(1)="" D ^%ZIS K IOP W:IOST'["PK-" @IOF
I $P(%O,S,7)'="" D @($P(%O,S,7))
I $P(%O,S,7)="" W !!,$P(%O,S,3),":",!,$P($T(V),S,3),!! I '$D(%O(1)) W $P(%O,S,4),"S:",!
F J=1:1 Q:$P($T(@(%OPT)+J),S,3)="" S %OP=J,K=$S(J<10:15,1:14) I '$D(%O(1)) W !,?K,J,". ",$P($T(@(%OPT)+J),S,3)
RE W ! S DIC="^DOPT("_""""_$P($T(@(%OPT)),S,5)_""""_",",DIC(0)="AEQMN" D ^DIC G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,%O X $P($T(@(%OPT)+Y),S,4) G PR
HDR W @IOF,!!,"EQUIPMENT MANAGEMENT REPORTS",!,"Version ",^ENG("VERSION"),! Q
EXIT I $P($T(@(%OPT)+(%OP+1)),S,4)'="" X $P($T(@(%OPT)+(%OP+1)),S,4)
K DIC,G,J,%OP I $P(%O,S,8)'="" S %OPT=$P(%O,S,8) G SE
OUT K K,S,%OPT,%O Q
;
OPT ;;ENINGEERING EQUIPMENT MANAGEMENT MODULE;EQUIPMENT REPORT;ENEQRP;
;;SPECIFIC ITEM HISTORY;D HS^ENEQRP1
;;EQUIPMENT TYPE HISTORY;D HD^ENEQRP2
;;INVENTORY LISTING;D ^ENEQRPI
;;WARRANTY LIST;D W^ENEQRP1
;;REPLACEMENT LISTING;D R^ENEQRP1
;;FAILURE RATE REPORT;D F^ENEQRP3
;;PM WORKLOAD ANALYSIS;D EN^ENEQRP5
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENEQRP 1616 printed Sep 15, 2024@21:17:11 Page 2
ENEQRP ;(WASH ISC)/DH-Equipment Report Driver ;6-8-89
V ;;7.0;ENGINEERING;;Aug 17, 1993
+1 ;
+2 SET %OPT="OPT"
SE if '$DATA(DT)
DO DT^DICRW
SET U="^"
SET S=";"
SET %O=$TEXT(@(%OPT))
+1 IF $DATA(^DOPT($PIECE(%O,S,5),"VERSION"))
IF ($PIECE($TEXT(V),S,3)=^DOPT($PIECE(%O,S,5),"VERSION"))
GOTO IN
+2 KILL ^DOPT($PIECE(%O,S,5))
+3 FOR I=1:1
if $PIECE($TEXT(@(%OPT)+I),S,3)=""
QUIT
SET %OP=I
SET ^DOPT($PIECE(%O,S,5),I,0)=$PIECE($TEXT(@(%OPT)+I),S,3)
SET ^DOPT($PIECE(%O,S,5),"B",$PIECE($PIECE($TEXT(@(%OPT)+I),S,3),"^",1),I)=""
+4 SET K=I-1
SET ^DOPT($PIECE(%O,S,5),0)=$PIECE(%O,S,4)_U_1_U_K_U_K
KILL I,K,X
SET ^DOPT($PIECE(%O,S,5),"VERSION")=$PIECE($TEXT(V),S,3)
IN IF $PIECE(%O,S,6)'=""
DO @($PIECE(%O,S,6))
PR if '$DATA(%OPT)
QUIT
KILL %O(1)
SET %O=$TEXT(@(%OPT))
SET S=";"
SET IOP="HOME"
if $PIECE(%O,S,9)'=""
SET %O(1)=""
DO ^%ZIS
KILL IOP
if IOST'["PK-"
WRITE @IOF
+1 IF $PIECE(%O,S,7)'=""
DO @($PIECE(%O,S,7))
+2 IF $PIECE(%O,S,7)=""
WRITE !!,$PIECE(%O,S,3),":",!,$PIECE($TEXT(V),S,3),!!
IF '$DATA(%O(1))
WRITE $PIECE(%O,S,4),"S:",!
+3 FOR J=1:1
if $PIECE($TEXT(@(%OPT)+J),S,3)=""
QUIT
SET %OP=J
SET K=$SELECT(J<10:15,1:14)
IF '$DATA(%O(1))
WRITE !,?K,J,". ",$PIECE($TEXT(@(%OPT)+J),S,3)
RE WRITE !
SET DIC="^DOPT("_""""_$PIECE($TEXT(@(%OPT)),S,5)_""""_","
SET DIC(0)="AEQMN"
DO ^DIC
if X=""!(X=U)
GOTO EXIT
if Y<0
GOTO RE
KILL DIC,J,%O
XECUTE $PIECE($TEXT(@(%OPT)+Y),S,4)
GOTO PR
HDR WRITE @IOF,!!,"EQUIPMENT MANAGEMENT REPORTS",!,"Version ",^ENG("VERSION"),!
QUIT
EXIT IF $PIECE($TEXT(@(%OPT)+(%OP+1)),S,4)'=""
XECUTE $PIECE($TEXT(@(%OPT)+(%OP+1)),S,4)
+1 KILL DIC,G,J,%OP
IF $PIECE(%O,S,8)'=""
SET %OPT=$PIECE(%O,S,8)
GOTO SE
OUT KILL K,S,%OPT,%O
QUIT
+1 ;
OPT ;;ENINGEERING EQUIPMENT MANAGEMENT MODULE;EQUIPMENT REPORT;ENEQRP;
+1 ;;SPECIFIC ITEM HISTORY;D HS^ENEQRP1
+2 ;;EQUIPMENT TYPE HISTORY;D HD^ENEQRP2
+3 ;;INVENTORY LISTING;D ^ENEQRPI
+4 ;;WARRANTY LIST;D W^ENEQRP1
+5 ;;REPLACEMENT LISTING;D R^ENEQRP1
+6 ;;FAILURE RATE REPORT;D F^ENEQRP3
+7 ;;PM WORKLOAD ANALYSIS;D EN^ENEQRP5