source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENWOST.m@ 1154

Last change on this file since 1154 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1ENWOST ;(WASH ISC)/DLM/JED-Incomp Engineering Work Orders ;2.7.97
2 ;;7.0;ENGINEERING;**6,35**;Aug 17, 1993
3 ;
4V Q ;Option ENWO-STATUS-(HC) no longer supported
5 ;
6E ; By employee
7 D SSHOP^ENWO G:ENSHKEY'>0 EXIT
8 S DIC="^ENG(""EMP"",",DIC("A")="Select EMPLOYEE NAME (press <ENTER> for unassigned): ",DIC(0)="AEQM" D ^DIC S ENEMP=+Y
9 I ENEMP'>0 D
10 . R !,"Type 'NOT' to get unassigned work orders: EXIT// ",X:DTIME
11 . I "^NOT^Not^not^"[(U_X_U) S ENEMP=""
12 G:ENEMP<0 EXIT
13 S ENBY="EMP" G COMN
14 ;
15ROOM ; By specific room (from Space File #6928)
16 D SSHOP^ENWO G:ENSHKEY'>0 EXIT
17 S DIC="^ENG(""SP"",",DIC(0)="AEQM" D ^DIC G:Y'>0 EXIT S ENROOM=+Y
18 S ENBY="ROOM" G COMN
19 ;
20L ;By location
21 D SSHOP^ENWO G:ENSHKEY'>0 EXIT
22 S DIR(0)="Y",DIR("A")="Should all LOCATIONS be included",DIR("B")="YES"
23 S DIR("?",1)="Enter 'NO' if you want to screen your list by DIVISION, BUILDING, WING,"
24 S DIR("?",2)="and/or ROOM. If you enter 'YES' then all locations will be included and the"
25 S DIR("?")="sort order will be DIVISION, BUILDING, WING, and finally ROOM."
26 D ^DIR K DIR Q:$D(DIRUT)
27 S ENSRT("LOC","ALL")=Y S:Y ENSRT("BY")="DBWR"
28 D:'Y GEN^ENSPSRT
29 I '$D(ENSRT("BY")) G EXIT
30 S ENBY="LOC" G COMN
31 ;
32O ;By service
33 D SSHOP^ENWO G:ENSHKEY'>0 EXIT
34 S DIC="^DIC(49,",DIC(0)="AEQM" D ^DIC G:Y'>0 EXIT S ENONR=+Y
35 S ENBY="ONR" G COMN
36 ;
37S ;By shop
38 D SSHOP^ENWO G:ENSHKEY'>0 EXIT
39 S ENBY="SHOP"
40COMN D AGE G:ENDLQ="^" EXIT
41 D PM G:ENPMINC'?1N EXIT
42 D COUNT G:ENSUM'?1N EXIT
43ALL K ENSHKEY("ALL") W !,"For ALL shops (say 'NO' if you only want ",$P(^DIC(6922,ENSHKEY,0),U),")"
44 S %=2 D YN^DICN G:%<0 EXIT G:%=0 ALL
45 S:%=1 ENSHKEY("ALL")=1
46 D DEV^ENLIB G:POP EXIT
47 I $D(IO("Q")) S ZTION=ION,ZTRTN="CONT^ENWOST",ZTDESC="Print Incomplete Work Orders",ZTSAVE("EN*")="" D ^%ZTLOAD K IO("Q"),ZTSK D HOME^%ZIS G EXIT
48CONT U IO I ENSUM D ^ENWOP2 G EXIT
49 D ^ENWOP
50 G EXIT
51 ;
52AGE S DIR(0)="N^0:999:0",DIR("A")="At least how many days old?"
53 S DIR("B")=0
54 D ^DIR K DIR S ENDLQ=Y
55 Q
56 ;
57PM S DIR(0)="Y",DIR("A")="Include PM Work Orders",DIR("B")="NO"
58 S DIR("??")="^D HLPPM^ENWOST"
59 D ^DIR K DIR S ENPMINC=Y
60 Q
61 ;
62COUNT S DIR(0)="Y",DIR("A")="Count(s) only",DIR("B")="NO"
63 D ^DIR K DIR S ENSUM=Y
64 Q
65 ;
66EXIT K A,B,C,J,DIC,DIE,DA,DN,DNX,L,R,X,EN,ENDLQ,ENEMP,ENONR,ENRLOC,ENBY,ENSHKEY("ALL"),ENPMINC
67 K ENSUM,ENSRT,ENROOM
68 I $E(IOST,1,2)="P-",'$D(ZTQUEUED) D ^%ZISC
69 S:$D(ZTQUEUED) ZTREQ="@"
70 Q
71 ;
72HLPPM W !!,"If you answer 'YES' the Incomplete Work Order list will contain PM work",!,"orders. To get a list of 'regular' work orders only, just say 'NO'.",!!
73 Q
74 ;ENWOST
Note: See TracBrowser for help on using the repository browser.