ENWARD1 ;(WASH ISC)/DH-Incomplete Work Orders for End Users ;2.17.97
;;7.0;ENGINEERING;**35**;Aug 17, 1993
; Check for incomplete work orders
;
EN S DIR(0)="S^E:Entered By;L:Locations (multiple);R:Room (specific);S:Service/Section",DIR("B")="Room (specific)",DIR("A")="List incomplete work orders by"
D ^DIR K DIR G:$D(DIRUT) EXIT G @$E(Y)
;
E ;By user (ENTERED BY)
S DIC="^VA(200,",DIC(0)="AEQMN" D ^DIC G:Y'>0 EXIT S ENEB=+Y,ENBY="E"
G DEV
;
L ;By location
S DIR(0)="Y",DIR("A")="Should all LOCATIONS be included",DIR("B")="YES"
S DIR("?",1)="Enter 'NO' if you want to screen your list by DIVISION, BUILDING, WING,"
S DIR("?",2)="and/or ROOM. If you enter 'YES' then all locations will be included and the"
S DIR("?")="sort order will be DIVISION, BUILDING, WING, and finally ROOM."
D ^DIR K DIR Q:$D(DIRUT)
S ENSRT("LOC","ALL")=Y S:Y ENSRT("BY")="DBWR"
D:'Y GEN^ENSPSRT
I '$D(ENSRT("BY")) G EXIT
S ENBY="L" G DEV
;
R ; One specific room
S DIC="^ENG(""SP"",",DIC(0)="AEQM" D ^DIC G:Y'>0 EXIT S ENROOM=+Y,ENBY="R" G DEV
;
S ;By service
S DIC="^DIC(49,",DIC(0)="AEQM" D ^DIC G:Y'>0 EXIT S ENSRVC=+Y,ENBY="S"
DEV K IOP("P") S %ZIS="Q" D ^%ZIS G:POP EXIT
I $D(IO("Q")) K IO("Q") S ZTIO=ION,ZTRTN="EN^ENWARD2",ZTSAVE("EN*")="",ZTSAVE("D*")="",ZTDESC="Incomp Work Orders (Elect WO Module)" D ^%ZTLOAD K ZTSK D ^%ZISC G EXIT
G EN^ENWARD2
;
EXIT K A,B,C,I,J,K,DIC,DIE,DA,DN,DNX,L,R,X,ENBY,ENEB,ENRLOC,ENSRT,ENROOM
Q
;ENWARD1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENWARD1 1481 printed Apr 09, 2024@20:58:12 Page 2
ENWARD1 ;(WASH ISC)/DH-Incomplete Work Orders for End Users ;2.17.97
+1 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
+2 ; Check for incomplete work orders
+3 ;
EN SET DIR(0)="S^E:Entered By;L:Locations (multiple);R:Room (specific);S:Service/Section"
SET DIR("B")="Room (specific)"
SET DIR("A")="List incomplete work orders by"
+1 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO EXIT
GOTO @$EXTRACT(Y)
+2 ;
E ;By user (ENTERED BY)
+1 SET DIC="^VA(200,"
SET DIC(0)="AEQMN"
DO ^DIC
if Y'>0
GOTO EXIT
SET ENEB=+Y
SET ENBY="E"
+2 GOTO DEV
+3 ;
L ;By location
+1 SET DIR(0)="Y"
SET DIR("A")="Should all LOCATIONS be included"
SET DIR("B")="YES"
+2 SET DIR("?",1)="Enter 'NO' if you want to screen your list by DIVISION, BUILDING, WING,"
+3 SET DIR("?",2)="and/or ROOM. If you enter 'YES' then all locations will be included and the"
+4 SET DIR("?")="sort order will be DIVISION, BUILDING, WING, and finally ROOM."
+5 DO ^DIR
KILL DIR
if $DATA(DIRUT)
QUIT
+6 SET ENSRT("LOC","ALL")=Y
if Y
SET ENSRT("BY")="DBWR"
+7 if 'Y
DO GEN^ENSPSRT
+8 IF '$DATA(ENSRT("BY"))
GOTO EXIT
+9 SET ENBY="L"
GOTO DEV
+10 ;
R ; One specific room
+1 SET DIC="^ENG(""SP"","
SET DIC(0)="AEQM"
DO ^DIC
if Y'>0
GOTO EXIT
SET ENROOM=+Y
SET ENBY="R"
GOTO DEV
+2 ;
S ;By service
+1 SET DIC="^DIC(49,"
SET DIC(0)="AEQM"
DO ^DIC
if Y'>0
GOTO EXIT
SET ENSRVC=+Y
SET ENBY="S"
DEV KILL IOP("P")
SET %ZIS="Q"
DO ^%ZIS
if POP
GOTO EXIT
+1 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTIO=ION
SET ZTRTN="EN^ENWARD2"
SET ZTSAVE("EN*")=""
SET ZTSAVE("D*")=""
SET ZTDESC="Incomp Work Orders (Elect WO Module)"
DO ^%ZTLOAD
KILL ZTSK
DO ^%ZISC
GOTO EXIT
+2 GOTO EN^ENWARD2
+3 ;
EXIT KILL A,B,C,I,J,K,DIC,DIE,DA,DN,DNX,L,R,X,ENBY,ENEB,ENRLOC,ENSRT,ENROOM
+1 QUIT
+2 ;ENWARD1