ENWO ;(WASH ISC)/DLM/DH-Work Order Driver ;5-28-93
V ;;7.0;ENGINEERING;;Aug 17, 1993
;OVERLAYS EN
D SSHOP Q:ENSHKEY<1
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:$T(OPT+I)="" S ^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),U,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 S O=$T(OPT),S=";" S IOP="HOME" D ^%ZIS W:IOST'["PK-" @IOF K IOP
D HDR F J=1:1 Q:'$D(^DOPT($P(O,S,5),J,0)) W !,?15,J,". ",$P(^DOPT($P(O,S,5),J,0),U,1)
RE W ! S DIC("A")="Select "_$P($T(OPT),S,4)_": EXIT// ",DIC="^DOPT("_""""_$P($T(OPT),S,5)_""""_",",DIC(0)="AEQMN" D ^DIC K:X=""!(X=U) ENSHKEY G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,O D @($P($T(OPT+Y),S,4)) G PR
HDR W @IOF,!!,?17,"ENGINEERING WORK ORDER MODULE",! S X=$P(^DIC(6910,1,0),U) W ?((65-$L(X))/2)\1,X,!! K X Q
SSHOP ;SEL SHOP
I $D(ENSHKEY),ENSHKEY>0 S DIC("B")=$P(^DIC(6922,ENSHKEY,0),U)
K DIC("S") S DIC="^DIC(6922,",DIC(0)="AEQM" D ^DIC S ENSHKEY=+Y K DIC
I '$D(ENLO) D ZIS^EN
Q
SHOP S DIC("S")="I $D(^(2)),$P(^(2),U,1)=ENSHKEY" Q
EXIT K %IS,DIC,DIE,DA,Y,DR,N,I,J,K,O,S,X,Y,Z
S:$D(ZTQUEUED) ZTREQ="@"
Q
;
OPT ;;WORK ORDER OPTION;WORK ORDER OPTION;ENWO;
;;ENTER NEW WORK ORDER;^ENWONEW
;;EDIT WORK ORDER DATA;ENT^ENWO1
;;CLOSE OUT WORK ORDER;CLSOUT^ENWO1
;;INCOMPLETE WORK ORDER STATUS;^ENWOST
;;DISPLAY WORK ORDER;EDIT^ENWOD
;;PRINT EQUIPMENT HISTORY BY ENTRY NUMBER;EQHI^ENWO1
;;TRANSFER WORK ORDER TO NEW SHOP;TRANS^ENWONEW1
;;DISAPPROVE WORK ORDER;DISAP^ENWO2
;;REPRINT WORK ORDERS;^ENWOREP
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENWO 1723 printed Dec 13, 2024@01:56:09 Page 2
ENWO ;(WASH ISC)/DLM/DH-Work Order Driver ;5-28-93
V ;;7.0;ENGINEERING;;Aug 17, 1993
+1 ;OVERLAYS EN
+2 DO SSHOP
if ENSHKEY<1
QUIT
+3 if '$DATA(DT)
DO DT^DICRW
SET U="^"
SET S=";"
SET O=$TEXT(OPT)
IF $DATA(^DOPT($PIECE(O,S,5),"VERSION"))
IF ($PIECE($TEXT(V),S,3)=^DOPT($PIECE(O,S,5),"VERSION"))
GOTO IN
+4 KILL ^DOPT($PIECE(O,S,5))
+5 FOR I=1:1
if $TEXT(OPT+I)=""
QUIT
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),U,1),I)=""
+6 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 SET O=$TEXT(OPT)
SET S=";"
SET IOP="HOME"
DO ^%ZIS
if IOST'["PK-"
WRITE @IOF
KILL IOP
+1 DO HDR
FOR J=1:1
if '$DATA(^DOPT($PIECE(O,S,5),J,0))
QUIT
WRITE !,?15,J,". ",$PIECE(^DOPT($PIECE(O,S,5),J,0),U,1)
RE WRITE !
SET DIC("A")="Select "_$PIECE($TEXT(OPT),S,4)_": EXIT// "
SET DIC="^DOPT("_""""_$PIECE($TEXT(OPT),S,5)_""""_","
SET DIC(0)="AEQMN"
DO ^DIC
if X=""!(X=U)
KILL ENSHKEY
if X=""!(X=U)
GOTO EXIT
if Y<0
GOTO RE
KILL DIC,J,O
DO @($PIECE($TEXT(OPT+Y),S,4))
GOTO PR
HDR WRITE @IOF,!!,?17,"ENGINEERING WORK ORDER MODULE",!
SET X=$PIECE(^DIC(6910,1,0),U)
WRITE ?((65-$LENGTH(X))/2)\1,X,!!
KILL X
QUIT
SSHOP ;SEL SHOP
+1 IF $DATA(ENSHKEY)
IF ENSHKEY>0
SET DIC("B")=$PIECE(^DIC(6922,ENSHKEY,0),U)
+2 KILL DIC("S")
SET DIC="^DIC(6922,"
SET DIC(0)="AEQM"
DO ^DIC
SET ENSHKEY=+Y
KILL DIC
+3 IF '$DATA(ENLO)
DO ZIS^EN
+4 QUIT
SHOP SET DIC("S")="I $D(^(2)),$P(^(2),U,1)=ENSHKEY"
QUIT
EXIT KILL %IS,DIC,DIE,DA,Y,DR,N,I,J,K,O,S,X,Y,Z
+1 if $DATA(ZTQUEUED)
SET ZTREQ="@"
+2 QUIT
+3 ;
OPT ;;WORK ORDER OPTION;WORK ORDER OPTION;ENWO;
+1 ;;ENTER NEW WORK ORDER;^ENWONEW
+2 ;;EDIT WORK ORDER DATA;ENT^ENWO1
+3 ;;CLOSE OUT WORK ORDER;CLSOUT^ENWO1
+4 ;;INCOMPLETE WORK ORDER STATUS;^ENWOST
+5 ;;DISPLAY WORK ORDER;EDIT^ENWOD
+6 ;;PRINT EQUIPMENT HISTORY BY ENTRY NUMBER;EQHI^ENWO1
+7 ;;TRANSFER WORK ORDER TO NEW SHOP;TRANS^ENWONEW1
+8 ;;DISAPPROVE WORK ORDER;DISAP^ENWO2
+9 ;;REPRINT WORK ORDERS;^ENWOREP