ENY2K7 ;(WIRMFO)/DH-Print Y2K Worklist ;9.14.98
;;7.0;ENGINEERING;**51,55**;Aug 17, 1993
; Physically prints the Y2K worklist
LN80 ; 10 pitch worklist
N X
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 !," Estimated Y2K Compliance Date: "_$$GET1^DIQ(6914,DA,72)_" Est. Cost: $"_$P($P($G(^ENG(6914,DA,11)),U,3),".") I ENJCAHO="Y" W ?68,"JCAHO=YES"
S ENX=$P(^ENG(6914,DA,11),U,12) D:ENX]""
. W ! S ENY=ENY+1
. W:$L(ENX)<80 " " W ENX
K ENX D NOTES^ENWOD2(DA),POST
W !!,ENWOX,?16,"Initials:_______ Date:________ Hrs:______ Materials:_______"
W !," Y2K Status (circle): FC NC NA CNL TI Vendor Cost:______"
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,30),?61,$E(ENSRVC,1,35)
W !," Estimated Y2K Compliance Date: "_$$GET1^DIQ(6914,DA,72)_" Estimated Cost: $"_$P($P($G(^ENG(6914,DA,11)),U,3),".") I ENJCAHO="Y" W ?72,"JCAHO=YES"
S ENX=$P(^ENG(6914,DA,11),U,12) D:ENX]""
. W ! S ENY=ENY+1
. W:$L(ENX)<80 " " W ENX
K ENX D NOTES^ENWOD2(DA),POST
W !!,ENWOX,?17,"Initials:________ Date___________ Hours:_______ Materials:_______"
W !," Y2K Status (circle): FC NC NA CNL TI Vendor Cost:__________"
W !! S ENY=ENY+9
Q
;
DATA ; Get data from the equipment record (file #6914)
; Expects DA as the IEN for file #6914
S (ENMAN,ENMANF,ENMOD,ENSN,ENLID,ENLOC,ENDTYP,ENDVTYP,ENLVL,ENSRVC,ENWING,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)
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(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
;ENY2K7
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENY2K7 3280 printed Nov 22, 2024@17:07:27 Page 2
ENY2K7 ;(WIRMFO)/DH-Print Y2K Worklist ;9.14.98
+1 ;;7.0;ENGINEERING;**51,55**;Aug 17, 1993
+2 ; Physically prints the Y2K worklist
LN80 ; 10 pitch worklist
+1 NEW X
+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 !," Estimated Y2K Compliance Date: "_$$GET1^DIQ(6914,DA,72)_" Est. Cost: $"_$PIECE($PIECE($GET(^ENG(6914,DA,11)),U,3),".")
IF ENJCAHO="Y"
WRITE ?68,"JCAHO=YES"
+9 SET ENX=$PIECE(^ENG(6914,DA,11),U,12)
if ENX]""
Begin DoDot:1
+10 WRITE !
SET ENY=ENY+1
+11 if $LENGTH(ENX)<80
WRITE " "
WRITE ENX
End DoDot:1
+12 KILL ENX
DO NOTES^ENWOD2(DA)
DO POST
+13 WRITE !!,ENWOX,?16,"Initials:_______ Date:________ Hrs:______ Materials:_______"
+14 WRITE !," Y2K Status (circle): FC NC NA CNL TI Vendor Cost:______"
+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,30),?61,$EXTRACT(ENSRVC,1,35)
+8 WRITE !," Estimated Y2K Compliance Date: "_$$GET1^DIQ(6914,DA,72)_" Estimated Cost: $"_$PIECE($PIECE($GET(^ENG(6914,DA,11)),U,3),".")
IF ENJCAHO="Y"
WRITE ?72,"JCAHO=YES"
+9 SET ENX=$PIECE(^ENG(6914,DA,11),U,12)
if ENX]""
Begin DoDot:1
+10 WRITE !
SET ENY=ENY+1
+11 if $LENGTH(ENX)<80
WRITE " "
WRITE ENX
End DoDot:1
+12 KILL ENX
DO NOTES^ENWOD2(DA)
DO POST
+13 WRITE !!,ENWOX,?17,"Initials:________ Date___________ Hours:_______ Materials:_______"
+14 WRITE !," Y2K Status (circle): FC NC NA CNL TI Vendor Cost:__________"
+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 (ENMAN,ENMANF,ENMOD,ENSN,ENLID,ENLOC,ENDTYP,ENDVTYP,ENLVL,ENSRVC,ENWING,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 QUIT
+14 ;
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(6))="O"
SET X1(I)="HAZARD ALERT("_ENX("HA")_")"
+8 IF $GET(ENX(3))=1
WRITE !," IMPORTANT: Device MUST be isolated & rendered inoperative before servicing."
SET ENY=ENY+1
+9 IF $GET(X1(1))]""
Begin DoDot:2
+10 WRITE !," NOTES: "_X1(1)
SET ENY=ENY+1
+11 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
+12 QUIT
+13 ;ENY2K7