ENWOME1 ;(WASH ISC)/SAB-WORK ORDER MULTIPLE ENTRY, EQUIPMENT LIST; 2-6-95
;;7.0;ENGINEERING;**35**;Aug 17, 1993
LST ;
; Input Variables
; ENWODA = ien of master work order
; ENEQDA = ien of equipment on master work order
; ^TMP($J,equip ien) selected equipment array
; = "" when wo not yet created by copying master
; = work order ien^work order number
; ENCOPY optional flag
; = 1 to indicate work order copy has been completed
S %ZIS="Q" D ^%ZIS Q:POP
I $D(IO("Q")) D Q
. S ZTRTN="QEN^ENWOME1",ZTDESC="Multiple Work Order Equipment List"
. S ZTSAVE("ENCOPY")="",ZTSAVE("ENEQDA")="",ZTSAVE("ENWODA")=""
. S ZTSAVE("^TMP($J,")=""
. D ^%ZTLOAD,HOME^%ZIS K ZTSK
QEN ; queued entry
U IO
S (END,ENPG)=0 S Y=$P(DT,".") D DD^%DT S ENDT=Y
S DIC="^ENG(6920,",DA=ENWODA,DR=".01;32",DIQ="ENDIQ",DIQ(0)="E"
D EN^DIQ1
S ENDASH="",$P(ENDASH,"-",IOM+1)="" D HD
S ENI=0 F S ENI=$O(^TMP($J,ENI)) Q:'ENI D D:$Y+4>IOSL HD Q:END
. W:$D(ENCOPY) !,$P($G(^TMP($J,ENI)),U,2),?24,ENDIQ(6920,ENWODA,32,"E")
. S DIC="^ENG(6914,",DA=ENI,DR=".01;6;1;4",DIQ="ENDIQ",DIQ(0)="E"
. D EN^DIQ1
. W !,?2,ENDIQ(6914,ENI,.01,"E")
. W ?14,$E(ENDIQ(6914,ENI,6,"E"),1,25)
. W ?41,$E(ENDIQ(6914,ENI,1,"E"),1,20)
. W ?63,$E(ENDIQ(6914,ENI,4,"E"),1,16)
. K ENDIQ(6914)
I $D(ZTQUEUED) S ZTREQ="Q" K ^TMP($J)
K DA,DIC,DIQ,DR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
K END,ENDASH,ENDIQ,ENDT,ENI,ENPG
D ^%ZISC
Q
HD ; header
I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
I $E(IOST,1,2)="C-"!ENPG W @IOF
S ENPG=ENPG+1
W "Multiple Work Order Equipment List",?50,ENDT,?70,"page ",ENPG,!
W:$G(ENCOPY) !,"Work Order #",?24,"Status"
W !,?2,"Control #",?14,"Equipment Category",?41,"Manufacturer"
W ?63,"Model"
W !,?2,$E(ENDASH,1,10),?14,$E(ENDASH,1,25),?41,$E(ENDASH,1,20)
W ?63,$E(ENDASH,1,16)
W !,"(Master Equipment Work Order)"
W !,ENDIQ(6920,ENWODA,.01,"E"),?24,ENDIQ(6920,ENWODA,32,"E")
S DIC="^ENG(6914,",DA=ENEQDA,DR=".01;6;1;4",DIQ="ENDIQ",DIQ(0)="E"
D EN^DIQ1
W !,?2,ENDIQ(6914,ENEQDA,.01,"E")
W ?14,$E(ENDIQ(6914,ENEQDA,6,"E"),1,25)
W ?41,$E(ENDIQ(6914,ENEQDA,1,"E"),1,20)
W ?63,$E(ENDIQ(6914,ENEQDA,4,"E"),1,16)
K ENDIQ(6914)
;W !,$E(ENDASH,1,10),?12,$E(ENDASH,1,25),?39,$E(ENDASH,1,20)
;W ?61,$E(ENDASH,1,18)
W !!,"(Equipment "
W $S($G(ENCOPY):"Work Orders Copied from Master",1:"Selected"),")"
Q
;ENWOME1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENWOME1 2422 printed Oct 16, 2024@17:57:07 Page 2
ENWOME1 ;(WASH ISC)/SAB-WORK ORDER MULTIPLE ENTRY, EQUIPMENT LIST; 2-6-95
+1 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
LST ;
+1 ; Input Variables
+2 ; ENWODA = ien of master work order
+3 ; ENEQDA = ien of equipment on master work order
+4 ; ^TMP($J,equip ien) selected equipment array
+5 ; = "" when wo not yet created by copying master
+6 ; = work order ien^work order number
+7 ; ENCOPY optional flag
+8 ; = 1 to indicate work order copy has been completed
+9 SET %ZIS="Q"
DO ^%ZIS
if POP
QUIT
+10 IF $DATA(IO("Q"))
Begin DoDot:1
+11 SET ZTRTN="QEN^ENWOME1"
SET ZTDESC="Multiple Work Order Equipment List"
+12 SET ZTSAVE("ENCOPY")=""
SET ZTSAVE("ENEQDA")=""
SET ZTSAVE("ENWODA")=""
+13 SET ZTSAVE("^TMP($J,")=""
+14 DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
End DoDot:1
QUIT
QEN ; queued entry
+1 USE IO
+2 SET (END,ENPG)=0
SET Y=$PIECE(DT,".")
DO DD^%DT
SET ENDT=Y
+3 SET DIC="^ENG(6920,"
SET DA=ENWODA
SET DR=".01;32"
SET DIQ="ENDIQ"
SET DIQ(0)="E"
+4 DO EN^DIQ1
+5 SET ENDASH=""
SET $PIECE(ENDASH,"-",IOM+1)=""
DO HD
+6 SET ENI=0
FOR
SET ENI=$ORDER(^TMP($JOB,ENI))
if 'ENI
QUIT
Begin DoDot:1
+7 if $DATA(ENCOPY)
WRITE !,$PIECE($GET(^TMP($JOB,ENI)),U,2),?24,ENDIQ(6920,ENWODA,32,"E")
+8 SET DIC="^ENG(6914,"
SET DA=ENI
SET DR=".01;6;1;4"
SET DIQ="ENDIQ"
SET DIQ(0)="E"
+9 DO EN^DIQ1
+10 WRITE !,?2,ENDIQ(6914,ENI,.01,"E")
+11 WRITE ?14,$EXTRACT(ENDIQ(6914,ENI,6,"E"),1,25)
+12 WRITE ?41,$EXTRACT(ENDIQ(6914,ENI,1,"E"),1,20)
+13 WRITE ?63,$EXTRACT(ENDIQ(6914,ENI,4,"E"),1,16)
+14 KILL ENDIQ(6914)
End DoDot:1
if $Y+4>IOSL
DO HD
if END
QUIT
+15 IF $DATA(ZTQUEUED)
SET ZTREQ="Q"
KILL ^TMP($JOB)
+16 KILL DA,DIC,DIQ,DR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+17 KILL END,ENDASH,ENDIQ,ENDT,ENI,ENPG
+18 DO ^%ZISC
+19 QUIT
HD ; header
+1 IF $EXTRACT(IOST,1,2)="C-"
IF ENPG
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF 'Y
SET END=1
QUIT
+2 IF $EXTRACT(IOST,1,2)="C-"!ENPG
WRITE @IOF
+3 SET ENPG=ENPG+1
+4 WRITE "Multiple Work Order Equipment List",?50,ENDT,?70,"page ",ENPG,!
+5 if $GET(ENCOPY)
WRITE !,"Work Order #",?24,"Status"
+6 WRITE !,?2,"Control #",?14,"Equipment Category",?41,"Manufacturer"
+7 WRITE ?63,"Model"
+8 WRITE !,?2,$EXTRACT(ENDASH,1,10),?14,$EXTRACT(ENDASH,1,25),?41,$EXTRACT(ENDASH,1,20)
+9 WRITE ?63,$EXTRACT(ENDASH,1,16)
+10 WRITE !,"(Master Equipment Work Order)"
+11 WRITE !,ENDIQ(6920,ENWODA,.01,"E"),?24,ENDIQ(6920,ENWODA,32,"E")
+12 SET DIC="^ENG(6914,"
SET DA=ENEQDA
SET DR=".01;6;1;4"
SET DIQ="ENDIQ"
SET DIQ(0)="E"
+13 DO EN^DIQ1
+14 WRITE !,?2,ENDIQ(6914,ENEQDA,.01,"E")
+15 WRITE ?14,$EXTRACT(ENDIQ(6914,ENEQDA,6,"E"),1,25)
+16 WRITE ?41,$EXTRACT(ENDIQ(6914,ENEQDA,1,"E"),1,20)
+17 WRITE ?63,$EXTRACT(ENDIQ(6914,ENEQDA,4,"E"),1,16)
+18 KILL ENDIQ(6914)
+19 ;W !,$E(ENDASH,1,10),?12,$E(ENDASH,1,25),?39,$E(ENDASH,1,20)
+20 ;W ?61,$E(ENDASH,1,18)
+21 WRITE !!,"(Equipment "
+22 WRITE $SELECT($GET(ENCOPY):"Work Orders Copied from Master",1:"Selected"),")"
+23 QUIT
+24 ;ENWOME1