source: FOIAVistA/trunk/r/ENGINEERING-EN/ENY2K2.m@ 1015

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1ENY2K2 ;(WASH ISC)/DH-Generate Y2K Worklists ;5.4.98
2 ;;7.0;ENGINEERING;**51**;Aug 17, 1993
3 ;
4Y2L ; produce Y2K worklist
5 W @IOF,?32,"GENERATE Y2K WORK LIST",!,?31,"VERSION ",^ENG("VERSION"),!!
6 W !!,"Print Y2K Work Orders for Equipment Records whose ESTIMATED Y2K COMPLIANCE"
7 S Y=$E(DT,1,5)_"00",%DT="AEF",%DT("A")="DATE is on or before what date: " D ^%DT G:Y'>0 OUT S ENY2DT=Y S ENPMYR=1700+$E(Y,1,3) X ^DD("DD") S ENY2DT("E")=Y
8 W !!,"NOTE: Equipment that is CONDITIONALLY COMPLIANT for Y2K and has no ESTIMATED",!," Y2K COMPLIANCE DATE will always appear on Y2K worklists."
9 ;
10LSTSRT K ENSRT
11 W !!,"Y2K work lists are collections of Y2K work orders for equipment whose Y2K",!,"CATEGORY is CONDITIONALLY COMPLIANT. They are always sorted by ASSIGNED SHOP"
12 W !,"with page breaks between each shop. If you request it, they will be sorted",!,"by ASSIGNED TECH (with page breaks) within each shop."
13 W !!,"Beyond that, how would you like your worklist to be sorted?"
14 S X="" R !!," (E,P,I,L,C,S or ? for Help) L// ",X:DTIME Q:$E(X)="^" S:X="" X="L" I $L(X)>1!("EPILCS"'[X) D LSTH1^ENEQPMS4 G LSTSRT
15 S ENSRT=X,ENSRT("ALL")=1 S:X="L" ENSRT("LOC")=1
16 ;
17LSTSRT1 S ENSRT("A")=$S(ENSRT="E":"ENTRY NUMBER",ENSRT="P":"PM NUMBER",ENSRT="I":"LOCAL ID",ENSRT="L":"LOCATION",ENSRT="C":"CATEGORY",ENSRT="S":"SERVICE",1:"")
18 G:ENSRT("A")="" OUT
19 I ENSRT'="P" S ENSRT("ALL")=0 D SPL0^ENEQPMS3 G:X=U OUT
20 I "EP"[ENSRT S ENSRT("LOC")=0
21 I "EPL"'[ENSRT D G:$D(DIRUT) OUT
22 . W !!,"Within "_ENSRT("A")_", shall worklist be sorted by LOCATION?"
23 . S DIR(0)="Y",DIR("B")="YES"
24 . S DIR("?",1)="If you want this list to be ordered by LOCATION within "_ENSRT("A")_","
25 . S DIR("?",2)="please enter 'YES', otherwise enter 'NO' and items will be ordered by"
26 . S DIR("?")="EQUIPMENT ENTRY NUMBER."
27 . D ^DIR K DIR Q:$D(DIRUT)
28 . S ENSRT("LOC")=$S(Y:1,1:0)
29 . I ENSRT("LOC") D
30 .. S DIR(0)="Y",DIR("A")="Shall all LOCATIONS be included",DIR("B")="YES"
31 .. S DIR("?",1)="Enter 'NO' if you want to screen your worklist by DIVISION, BUILDING, WING,"
32 .. S DIR("?",2)="and/or ROOM. If you enter 'YES' then all LOCATIONS will be included. The"
33 .. S DIR("?")="sort order will be DIVISION, BUILDING, WING, and finally ROOM."
34 .. D ^DIR K DIR Q:$D(DIRUT)
35 .. S ENSRT("LOC","ALL")=$S(Y:1,1:0) S:Y ENSRT("BY")="DBWR"
36 .. D:'ENSRT("LOC","ALL") GEN^ENSPSRT
37 ;
38LSTTEK S DIR(0)="Y",DIR("A")="Shall worklist be sorted by Y2K TECHNICIAN",DIR("B")="YES"
39 S DIR("?",1)="Enter 'YES' if you want your worklist sorted by Y2K TECHNICIAN, with page"
40 S DIR("?",2)="breaks between each TECH. If you enter 'NO' then equipment items will be"
41 S DIR("?")="selected without regard to RESPONSIBLE TECH."
42 D ^DIR K DIR G:$D(DIRUT) OUT
43 I 'Y S ENTECH=0,ENTECH("ALL")=1 G LSTOOS
44 ;
45LSTTEK1 W !,"For all TECH's: " S %=1 D YN^DICN G:%<0 OUT I %<1 W !,"You may select all TECH's or one specific TECH. Enter 'Y'es for a worklist",!,"which includes all equipment, regardless of Y2K TECHNICIAN." G LSTTEK1
46 I %=1 S ENTECH="ALL",ENTECH("ALL")=1 G LSTOOS
47 S DIC="^ENG(""EMP"",",DIC(0)="AEMQ" D ^DIC G:Y<0 OUT S ENTECH=+Y,ENTECH("ALL")=0
48 ;
49LSTOOS S DIR("A")="Shall 'OUT OF SERVICE' equipment be included in worklist"
50 S DIR(0)="Y",DIR("B")="YES"
51 S DIR("?",1)="Enter 'YES' if you want equipment entries with a USE STATUS of 'OUT OF"
52 S DIR("?")="SERVICE' to appear on this PM worklist. Otherwise enter 'NO'."
53 D ^DIR K DIR G:$D(DIRUT) OUT
54 S ENSRT("OOS")=Y
55 ;
56LST01 W !,"For all shops"
57 S ENSHKEY="ALL"
58 S DIR(0)="Y",DIR("B")="YES",DIR("?")="You may generate worklists for all shops or for one particular shop."
59 D ^DIR K DIR G:$D(DIRUT) OUT
60 I 'Y S ENSHKEY="" D SSHOP^ENWO G:ENSHKEY=-1 OUT
61 D DEV^ENLIB G:POP OUT I $D(IO("Q")) D G OUT
62 . K IO("Q")
63 . S ZTIO=ION,ZTRTN="ENTRY^ENY2K3",ZTSAVE("EN*")="",ZTDESC="Generate Y2K Worklist" D ^%ZTLOAD K ZTSK D HOME^%ZIS
64 D ENTRY^ENY2K3
65 ;
66OUT K K,ENY2DT,ENA,ENHZS,ENSHOP,ENSHKEY,ENEQDT,ENDA,ENSRT,ENTECH,ENMNTH,%DT,DIC,DNX,ENERR
67 Q
68 ;
69MSG R !,"Press <RETURN> to continue...",X:DTIME
70 Q
71 ;ENY2K2
Note: See TracBrowser for help on using the repository browser.