EN ;(WASH ISC)/DLM-Engineering Driver ;8-24-94
V ;;7.0;ENGINEERING;**18**;Aug 17, 1993
;CAN BE RUN DIRECTLY OR OVERLAYED BY VA SECURITY
;CALLS ^%ZIS,DT^DICRW,^DIC,^DIE,^DII
; ENWO,ENINV,ENMAN,ENPROJ,ENSP,ENFSANOA,PRCSE,PRCSP,XM
;REQUIRES PROGRAMS : FILE MANAGER, VA KERNEL
;REQUIRES GLOBALS : %ZOSF,DIC(3) (USER FOR MAILMAN)
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),"^",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=";" D HOME^%ZIS W:$E(IOST,1,2)="C-" @IOF
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 G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,O D @($P($T(OPT+Y),S,4)) G PR
;
INIT ;INITIALIZE VARIABLES FOR ENGINEERING SYSTEM
S:$D(DTIME)<1 DTIME=600
D DT^DICRW S U="^"
ZIS D HOME^%ZIS I $D(^%ZIS(2)) S:$D(^%ZIS(2,IOST(0),7)) ENHI=$P(^(7),U,1),ENLO=$S($P(^(7),U,3)]"":$P(^(7),U,3),1:$P(^(7),U,2)) I $D(ENHI),$D(ENLO) Q
S ENLO="*0",ENHI="*0" Q
;
HDR W @IOF,!,?14,"AUTOMATED ENGINEERING MANAGEMENT SYSTEM"
N %,%H,%I,X
W !,?29,"VERSION ",^ENG("VERSION")
I $D(^DIC(6910,1,0)) S X=34-($L($P(^DIC(6910,1,0),"^",1))\2) W !,?X,$P(^DIC(6910,1,0),"^",1)
D NOW^%DTC W !,?22,$$FMTE^XLFDT(%,"1P")
W !!! Q
FM ;FILE MANAGER
K ^DISV($I) W @IOF,!!,"FILE MANAGER",!! D ^DII Q
XM ;TESTS FOR VALID USER CODE FOR MAILMAN
W @IOF,!! G:$D(^VA(200,DUZ,0))>0 ^XM W !!,"USER IDENTIFICATION (FILE 3) NEEDED FOR MAILMAN (ELECTRONIC MAIL)",!! R X:5 Q
EXIT K A,DA,DIC,ENHI,ENLO,ENERR,I,J,K,O,S,X,Y,Z Q
;
OPT ;;ENGINEERING MAIN MENU OPTIONS;Engineering MAIN MENU OPTION;EN;INIT
;;WORK ORDER + MERS;^ENWO
;;EQUIPMENT MANAGEMENT;^ENEQ
;;CONSTRUCTION PROJECT;^ENPROJ
;;SPACE MANAGEMENT;^ENSP
;;PROGRAM MANAGEMENT;^ENMAN
;;ACCIDENT REPORTING;^ENFSA
;;ASSIGN ELECTRONIC WORK ORDERS;^ENETRAN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEN 2209 printed Dec 13, 2024@01:51:24 Page 2
EN ;(WASH ISC)/DLM-Engineering Driver ;8-24-94
V ;;7.0;ENGINEERING;**18**;Aug 17, 1993
+1 ;CAN BE RUN DIRECTLY OR OVERLAYED BY VA SECURITY
+2 ;CALLS ^%ZIS,DT^DICRW,^DIC,^DIE,^DII
+3 ; ENWO,ENINV,ENMAN,ENPROJ,ENSP,ENFSANOA,PRCSE,PRCSP,XM
+4 ;REQUIRES PROGRAMS : FILE MANAGER, VA KERNEL
+5 ;REQUIRES GLOBALS : %ZOSF,DIC(3) (USER FOR MAILMAN)
+6 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
+7 KILL ^DOPT($PIECE(O,S,5))
+8 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),"^",1),I)=""
+9 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=";"
DO HOME^%ZIS
if $EXTRACT(IOST,1,2)="C-"
WRITE @IOF
+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)
GOTO EXIT
if Y<0
GOTO RE
KILL DIC,J,O
DO @($PIECE($TEXT(OPT+Y),S,4))
GOTO PR
+1 ;
INIT ;INITIALIZE VARIABLES FOR ENGINEERING SYSTEM
+1 if $DATA(DTIME)<1
SET DTIME=600
+2 DO DT^DICRW
SET U="^"
ZIS DO HOME^%ZIS
IF $DATA(^%ZIS(2))
if $DATA(^%ZIS(2,IOST(0),7))
SET ENHI=$PIECE(^(7),U,1)
SET ENLO=$SELECT($PIECE(^(7),U,3)]"":$PIECE(^(7),U,3),1:$PIECE(^(7),U,2))
IF $DATA(ENHI)
IF $DATA(ENLO)
QUIT
+1 SET ENLO="*0"
SET ENHI="*0"
QUIT
+2 ;
HDR WRITE @IOF,!,?14,"AUTOMATED ENGINEERING MANAGEMENT SYSTEM"
+1 NEW %,%H,%I,X
+2 WRITE !,?29,"VERSION ",^ENG("VERSION")
+3 IF $DATA(^DIC(6910,1,0))
SET X=34-($LENGTH($PIECE(^DIC(6910,1,0),"^",1))\2)
WRITE !,?X,$PIECE(^DIC(6910,1,0),"^",1)
+4 DO NOW^%DTC
WRITE !,?22,$$FMTE^XLFDT(%,"1P")
+5 WRITE !!!
QUIT
FM ;FILE MANAGER
+1 KILL ^DISV($IO)
WRITE @IOF,!!,"FILE MANAGER",!!
DO ^DII
QUIT
XM ;TESTS FOR VALID USER CODE FOR MAILMAN
+1 WRITE @IOF,!!
if $DATA(^VA(200,DUZ,0))>0
GOTO ^XM
WRITE !!,"USER IDENTIFICATION (FILE 3) NEEDED FOR MAILMAN (ELECTRONIC MAIL)",!!
READ X:5
QUIT
EXIT KILL A,DA,DIC,ENHI,ENLO,ENERR,I,J,K,O,S,X,Y,Z
QUIT
+1 ;
OPT ;;ENGINEERING MAIN MENU OPTIONS;Engineering MAIN MENU OPTION;EN;INIT
+1 ;;WORK ORDER + MERS;^ENWO
+2 ;;EQUIPMENT MANAGEMENT;^ENEQ
+3 ;;CONSTRUCTION PROJECT;^ENPROJ
+4 ;;SPACE MANAGEMENT;^ENSP
+5 ;;PROGRAM MANAGEMENT;^ENMAN
+6 ;;ACCIDENT REPORTING;^ENFSA
+7 ;;ASSIGN ELECTRONIC WORK ORDERS;^ENETRAN