ENEQPMS7 ;(WIRMFO)/DH-Print PM Worklist ;4.3.98
;;7.0;ENGINEERING;**15,21,35,51**;Aug 17, 1993
; Physically prints the worklist
LN80 ; 10 pitch worklist
N X1
D DATA
W !,DA,?11,$E(ENDVTYP,1,30),?42,$E(ENMOD,1,16),?59,$S($L(ENSN)>20:$E(ENSN,1,19)_"*",1:ENSN)
W !," "_ENLOC I $G(ENWING)]"" S ENWING=$E(ENWING,1,(24-$L(ENLOC))) W " ("_ENWING_")"
W ?24,$E(ENMFGR,1,40),?65,ENLID
I ENUSE]"" S ENUSE=$S(ENUSE="IN USE":"IN USE",ENUSE="OUT OF SERVICE":"OOS",ENUSE="LOANED OUT":"ON LOAN",1:"OTHER")
W !," "_ENUSE,?10,ENPMN,?21,$E(ENMAN,1,30),?52,$E(ENSRVC,1,28)
W !," Proc: " I ENPROC(2)]"" W $E(ENPROC(2),1,24)
E W $E(ENPROC(1),1,24)
W ?37,"Crit: ",ENCRIT,?47,"Freq: ",ENHZ,?56,"Level: ",ENLVL
I ENJCAHO="Y" W ?69,"JCAHO: YES"
K ENX D NOTES^ENWOD2(DA),POST
W !!,ENWOX,?17,"Initials:_____ Date:_______ Hours:_____" W:ENHRS]"" "("_ENHRS_") " W "Cost:______" W:ENMAT]"" "("_ENMAT_")"
W !," PM Status (circle): P C D0 D1 D2 D3 Condition" W:$G(ENX(2))]"" " ("_ENX(2)_")" W ": LN G P Y2K: "_$P($G(^ENG(6914,DA,11)),U)
W !! S ENY=ENY+9
Q
;
LN96 ; 12 pitch worklist
N X1
D DATA
W !,DA,?12,$E(ENDVTYP,1,31),?44,$E(ENMOD,1,20),?65,ENSN
W !," "_ENLOC I $G(ENWING)]"" S ENWING=$E(ENWING,1,(24-$L(ENLOC))) W " ("_ENWING_")"
W ?24,$E(ENMFGR,1,55),?80,ENLID
I ENUSE]"" S ENUSE=$S(ENUSE="IN USE":"IN USE",ENUSE="OUT OF SERVICE":"OUT OF SERVICE",ENUSE="LOANED OUT":"ON LOAN",1:"OTHER")
W !," "_ENUSE,?18,ENPMN,?29,$E(ENMAN,1,36),?65,$E(ENSRVC,1,30)
W !," Proc: " I ENPROC(2)]"" W $E(ENPROC(2),1,30)
E W $E(ENPROC(1),1,30)
W ?44,"Crit: ",ENCRIT,?53,"Freq: ",ENHZ,?62,"Level: ",ENLVL
I ENJCAHO="Y" W ?76,"JCAHO: YES"
K ENX D NOTES^ENWOD2(DA),POST
W !!,ENWOX,?18,"Initials:_______ Date:___________ Hours:______" W:ENHRS]"" "("_ENHRS_") " W "Cost:________" W:ENMAT]"" "("_ENMAT_")"
W !," PM Status (circle): P C D0 D1 D2 D3 Condition" W:$G(ENX(2))]"" " ("_ENX(2)_")" W ": LN G P Y2K: "_$P($G(^ENG(6914,DA,11)),U)
W !! S ENY=ENY+9
Q
;
DATA ; Get data from the equipment record (file #6914)
; Expects DA as the IEN for file #6914
S (ENPMN,ENMAN,ENMANF,ENMOD,ENSN,ENLID,ENLOC,ENCRIT,ENPRC,ENPROC(1),ENPROC(2),ENDTYP,ENDVTYP,ENLVL,ENSRVC,ENWING,ENHRS,ENMAT,ENUSE,ENCOND,ENJCAHO,ENMFGR)=""
S ENMFGR=$P(^ENG(6914,DA,0),U,2)
I $D(^ENG(6914,DA,3)) S EN=^(3),ENLOC=$P(EN,U,5),ENPMN=$P(EN,U,6),ENLID=$P(EN,U,7),ENJCAHO=$P(EN,U,9),ENUSE=$$GET1^DIQ(6914,DA,20),ENCOND=$$GET1^DIQ(6914,DA,53)
I ENLOC]"" D
. I ENLOC=+ENLOC,$D(^ENG("SP",ENLOC,0)) D Q
.. S ENLOC=$P(^ENG("SP",ENLOC,0),U),ENWING=$P(^(0),U,3)
.. K:ENWING="" ENWING
. S X=$O(^ENG("SP","B",ENLOC,0))
. I X>0,$D(^ENG("SP",X,0)) S ENWING=$P(^(0),U,3) K:ENWING="" ENWING
S ENSRVC=$$GET1^DIQ(6914,DA,21)
I $D(^ENG(6914,DA,1)) S EN=^(1),ENMAN=$$GET1^DIQ(6914,DA,1),ENMOD=$P(EN,U,2),ENSN=$P(EN,U,3),ENDVTYP=$$GET1^DIQ(6914,DA,6)
S ENCRIT=$P(^ENG(6914,DA,4,SE,0),U,4)
S ENLVL=$P(^ENG(6914,DA,4,SE,2,MULT,0),U,4),ENPRC=$P(^(0),U,5),ENHRS=$P(^(0),U,2),ENMAT=$P(^(0),U,3) S:ENLVL="" ENLVL="N/A" I ENPRC]"",$D(^ENG(6914.2,ENPRC,0)) S ENPROC(1)=$P(^(0),U),ENPROC(2)=$P(^(0),U,2)
E I ENPRC]"" S ENPROC(2)=ENPRC
Q
;
POST ; Writes flagging notes (if any)
; Expects that a call has just been made to NOTES^ENWOD2(DA)
I ENX("T")>0 D
. N I S I=1
. I $G(ENX(1))>DT D
.. S Y=ENX(1) X ^DD("DD")
.. S X1(I)="Unexpired Warranty ("_Y_")",I=I+1
. I $G(ENX(4))]"" S X1(I)="Missed Last PMI" D S I=I+1
.. I ENX(4)'="D0" S X1(I)=X1(I)_" ("_$S(ENX(4)="D1":"could not locate",ENX(4)="D2":"in use",ENX(4)="D3":"out of service",1:"")_")"
. I $G(ENX(6))="O" S X1(I)="HAZARD ALERT("_ENX("HA")_")"
. I $G(ENX(3))=1 W !," IMPORTANT: Device MUST be isolated & rendered inoperative before servicing." S ENY=ENY+1
. I $G(X1(1))]"" D
.. W !," NOTES: "_X1(1) S ENY=ENY+1
.. S I=1 F S I=$O(X1(I)) Q:I'>0 W !,?8,X1(I) S ENY=ENY+1
Q
;ENEQPMS7
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENEQPMS7 3886 printed Oct 16, 2024@17:53:48 Page 2
ENEQPMS7 ;(WIRMFO)/DH-Print PM Worklist ;4.3.98
+1 ;;7.0;ENGINEERING;**15,21,35,51**;Aug 17, 1993
+2 ; Physically prints the worklist
LN80 ; 10 pitch worklist
+1 NEW X1
+2 DO DATA
+3 WRITE !,DA,?11,$EXTRACT(ENDVTYP,1,30),?42,$EXTRACT(ENMOD,1,16),?59,$SELECT($LENGTH(ENSN)>20:$EXTRACT(ENSN,1,19)_"*",1:ENSN)
+4 WRITE !," "_ENLOC
IF $GET(ENWING)]""
SET ENWING=$EXTRACT(ENWING,1,(24-$LENGTH(ENLOC)))
WRITE " ("_ENWING_")"
+5 WRITE ?24,$EXTRACT(ENMFGR,1,40),?65,ENLID
+6 IF ENUSE]""
SET ENUSE=$SELECT(ENUSE="IN USE":"IN USE",ENUSE="OUT OF SERVICE":"OOS",ENUSE="LOANED OUT":"ON LOAN",1:"OTHER")
+7 WRITE !," "_ENUSE,?10,ENPMN,?21,$EXTRACT(ENMAN,1,30),?52,$EXTRACT(ENSRVC,1,28)
+8 WRITE !," Proc: "
IF ENPROC(2)]""
WRITE $EXTRACT(ENPROC(2),1,24)
+9 IF '$TEST
WRITE $EXTRACT(ENPROC(1),1,24)
+10 WRITE ?37,"Crit: ",ENCRIT,?47,"Freq: ",ENHZ,?56,"Level: ",ENLVL
+11 IF ENJCAHO="Y"
WRITE ?69,"JCAHO: YES"
+12 KILL ENX
DO NOTES^ENWOD2(DA)
DO POST
+13 WRITE !!,ENWOX,?17,"Initials:_____ Date:_______ Hours:_____"
if ENHRS]""
WRITE "("_ENHRS_") "
WRITE "Cost:______"
if ENMAT]""
WRITE "("_ENMAT_")"
+14 WRITE !," PM Status (circle): P C D0 D1 D2 D3 Condition"
if $GET(ENX(2))]""
WRITE " ("_ENX(2)_")"
WRITE ": LN G P Y2K: "_$PIECE($GET(^ENG(6914,DA,11)),U)
+15 WRITE !!
SET ENY=ENY+9
+16 QUIT
+17 ;
LN96 ; 12 pitch worklist
+1 NEW X1
+2 DO DATA
+3 WRITE !,DA,?12,$EXTRACT(ENDVTYP,1,31),?44,$EXTRACT(ENMOD,1,20),?65,ENSN
+4 WRITE !," "_ENLOC
IF $GET(ENWING)]""
SET ENWING=$EXTRACT(ENWING,1,(24-$LENGTH(ENLOC)))
WRITE " ("_ENWING_")"
+5 WRITE ?24,$EXTRACT(ENMFGR,1,55),?80,ENLID
+6 IF ENUSE]""
SET ENUSE=$SELECT(ENUSE="IN USE":"IN USE",ENUSE="OUT OF SERVICE":"OUT OF SERVICE",ENUSE="LOANED OUT":"ON LOAN",1:"OTHER")
+7 WRITE !," "_ENUSE,?18,ENPMN,?29,$EXTRACT(ENMAN,1,36),?65,$EXTRACT(ENSRVC,1,30)
+8 WRITE !," Proc: "
IF ENPROC(2)]""
WRITE $EXTRACT(ENPROC(2),1,30)
+9 IF '$TEST
WRITE $EXTRACT(ENPROC(1),1,30)
+10 WRITE ?44,"Crit: ",ENCRIT,?53,"Freq: ",ENHZ,?62,"Level: ",ENLVL
+11 IF ENJCAHO="Y"
WRITE ?76,"JCAHO: YES"
+12 KILL ENX
DO NOTES^ENWOD2(DA)
DO POST
+13 WRITE !!,ENWOX,?18,"Initials:_______ Date:___________ Hours:______"
if ENHRS]""
WRITE "("_ENHRS_") "
WRITE "Cost:________"
if ENMAT]""
WRITE "("_ENMAT_")"
+14 WRITE !," PM Status (circle): P C D0 D1 D2 D3 Condition"
if $GET(ENX(2))]""
WRITE " ("_ENX(2)_")"
WRITE ": LN G P Y2K: "_$PIECE($GET(^ENG(6914,DA,11)),U)
+15 WRITE !!
SET ENY=ENY+9
+16 QUIT
+17 ;
DATA ; Get data from the equipment record (file #6914)
+1 ; Expects DA as the IEN for file #6914
+2 SET (ENPMN,ENMAN,ENMANF,ENMOD,ENSN,ENLID,ENLOC,ENCRIT,ENPRC,ENPROC(1),ENPROC(2),ENDTYP,ENDVTYP,ENLVL,ENSRVC,ENWING,ENHRS,ENMAT,ENUSE,ENCOND,ENJCAHO,ENMFGR)=""
+3 SET ENMFGR=$PIECE(^ENG(6914,DA,0),U,2)
+4 IF $DATA(^ENG(6914,DA,3))
SET EN=^(3)
SET ENLOC=$PIECE(EN,U,5)
SET ENPMN=$PIECE(EN,U,6)
SET ENLID=$PIECE(EN,U,7)
SET ENJCAHO=$PIECE(EN,U,9)
SET ENUSE=$$GET1^DIQ(6914,DA,20)
SET ENCOND=$$GET1^DIQ(6914,DA,53)
+5 IF ENLOC]""
Begin DoDot:1
+6 IF ENLOC=+ENLOC
IF $DATA(^ENG("SP",ENLOC,0))
Begin DoDot:2
+7 SET ENLOC=$PIECE(^ENG("SP",ENLOC,0),U)
SET ENWING=$PIECE(^(0),U,3)
+8 if ENWING=""
KILL ENWING
End DoDot:2
QUIT
+9 SET X=$ORDER(^ENG("SP","B",ENLOC,0))
+10 IF X>0
IF $DATA(^ENG("SP",X,0))
SET ENWING=$PIECE(^(0),U,3)
if ENWING=""
KILL ENWING
End DoDot:1
+11 SET ENSRVC=$$GET1^DIQ(6914,DA,21)
+12 IF $DATA(^ENG(6914,DA,1))
SET EN=^(1)
SET ENMAN=$$GET1^DIQ(6914,DA,1)
SET ENMOD=$PIECE(EN,U,2)
SET ENSN=$PIECE(EN,U,3)
SET ENDVTYP=$$GET1^DIQ(6914,DA,6)
+13 SET ENCRIT=$PIECE(^ENG(6914,DA,4,SE,0),U,4)
+14 SET ENLVL=$PIECE(^ENG(6914,DA,4,SE,2,MULT,0),U,4)
SET ENPRC=$PIECE(^(0),U,5)
SET ENHRS=$PIECE(^(0),U,2)
SET ENMAT=$PIECE(^(0),U,3)
if ENLVL=""
SET ENLVL="N/A"
IF ENPRC]""
IF $DATA(^ENG(6914.2,ENPRC,0))
SET ENPROC(1)=$PIECE(^(0),U)
SET ENPROC(2)=$PIECE(^(0),U,2)
+15 IF '$TEST
IF ENPRC]""
SET ENPROC(2)=ENPRC
+16 QUIT
+17 ;
POST ; Writes flagging notes (if any)
+1 ; Expects that a call has just been made to NOTES^ENWOD2(DA)
+2 IF ENX("T")>0
Begin DoDot:1
+3 NEW I
SET I=1
+4 IF $GET(ENX(1))>DT
Begin DoDot:2
+5 SET Y=ENX(1)
XECUTE ^DD("DD")
+6 SET X1(I)="Unexpired Warranty ("_Y_")"
SET I=I+1
End DoDot:2
+7 IF $GET(ENX(4))]""
SET X1(I)="Missed Last PMI"
Begin DoDot:2
+8 IF ENX(4)'="D0"
SET X1(I)=X1(I)_" ("_$SELECT(ENX(4)="D1":"could not locate",ENX(4)="D2":"in use",ENX(4)="D3":"out of service",1:"")_")"
End DoDot:2
SET I=I+1
+9 IF $GET(ENX(6))="O"
SET X1(I)="HAZARD ALERT("_ENX("HA")_")"
+10 IF $GET(ENX(3))=1
WRITE !," IMPORTANT: Device MUST be isolated & rendered inoperative before servicing."
SET ENY=ENY+1
+11 IF $GET(X1(1))]""
Begin DoDot:2
+12 WRITE !," NOTES: "_X1(1)
SET ENY=ENY+1
+13 SET I=1
FOR
SET I=$ORDER(X1(I))
if I'>0
QUIT
WRITE !,?8,X1(I)
SET ENY=ENY+1
End DoDot:2
End DoDot:1
+14 QUIT
+15 ;ENEQPMS7