source: FOIAVistA/trunk/r/ENGINEERING-EN/ENEQLT1.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1ENEQLT1 ;;(WIRMFO)/DH-LOCKOUT FLAG ;12.18.97
2 ;;7.0;ENGINEERING;**35,47**;Aug 17, 1993
3LST ;Listing is done interactively (upon request) as part of the
4 ;equipment selection process. Reporting is done when changes are
5 ;actually made.
6 ;
7 ; NOTE: This is a list of Equipment Categories,
8 ; not Equipment Records
9 N LINE,COUNT,PAGE
10 S PAGE=0 D HDRLST
11 S CAT=0 F S CAT=$O(CATEGORY(CAT)) Q:'CAT D Q:ESCAPE
12 . W !,?10,CATEGORY(CAT) S LINE=LINE+1 D
13 .. S (COUNT,DA)=0 F S DA=$O(^ENG(6914,"G",CAT,DA)) Q:'DA S COUNT=COUNT+1
14 .. W " (",COUNT," Equipment Records)"
15 . I LINE>(IOSL-3),$O(CATEGORY(CAT)) D HOLD Q:ESCAPE D HDRLST
16 D HOLD
17 Q
18 ;
19HDRLST W:PAGE>0!($E(IOST,1,2)="C-") @IOF S PAGE=PAGE+1,LINE=3,$X=0
20 W "EQUIPMENT CATEGORIES SELECTED",?40,ENDATE,?65,"Page ",PAGE,!
21 Q
22 ;
23REPAT ; Report of edited Equipment Records (Action Taken)
24 ; Called by ^ENEQLT
25 K %IS("Q") S %ZIS="QM",%ZIS("A")="Select DEVICE for Action Taken Report: "
26 D ^%ZIS K %ZIS Q:POP I $D(IO("Q")) D D ^%ZISC Q
27 . S ZTRTN="DQAT^ENEQLT1",ZTSAVE("EN*")="",ZTDESC="Lockout/Tagout Report"
28 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
29DQAT N PAGE,LINE,ESCAPE,DA,X,T S (PAGE,ESCAPE)=0
30 U IO D TABS,HDRAT
31 I $D(ZTQUEUED),'$D(^XUTL("ENLT",ENDATE("I"))) D D ^%ZISC G EXIT
32 . W !!,?20,"No list to process."
33 S DA=0 F S DA=$O(^XUTL("ENLT",ENDATE("I"),DA)) Q:'DA D
34 . D PRTAT
35 . I LINE>(IOSL-4),$O(^XUTL("ENLT",ENDATE("I"),DA)) D HOLD,HDRAT
36 D HOLD,^%ZISC
37 G EXIT ;Design EXIT POINT
38 ;
39PRTAT ; Get and print equipment data
40 S X(1)=$$GET1^DIQ(6914,DA,6),X(2)=$$GET1^DIQ(6914,DA,3)
41 S X(3)=$$GET1^DIQ(6914,DA,24),X(4)=$$GET1^DIQ(6914,DA,1)
42 S X(5)=$$GET1^DIQ(6914,DA,4),X(6)=$$GET1^DIQ(6914,DA,5)
43 I T(13)=59 D
44 . S X(1)=$E(X(1),1,20),X(2)=$E(X(2),1,30),X(4)=$E(X(4),1,32)
45 . S X(5)=$E(X(5),1,21)
46 . I $L(X(6))>21 S X(6)=$E(X(6),1,20)_"*"
47 I T(13)=66 S X(1)=$E(X(1),1,30),X(2)=$E(X(2),1,36),X(4)=$E(X(4),1,32)
48 I T(13)=94 S X(4)=$E(X(4),1,60)
49 W !,DA,?T(1),X(1),?T(2),X(2),?T(3),X(3)
50 W !,?T(11),X(4),?T(12),X(5),?T(13),X(6)
51 S LINE=LINE+2
52 Q
53 ;
54TABS ; Store tabs in local array T
55 I IOM<96 S T(1)=12,T(2)=33,T(3)=64,T(11)=4,T(12)=37,T(13)=59
56 I IOM>95,IOM<128 S T(1)=12,T(2)=43,T(3)=80,T(11)=2,T(12)=35,T(13)=66
57 I IOM>127 S T(1)=12,T(2)=43,T(3)=112,T(11)=2,T(12)=63,T(13)=94
58 Q
59 ;
60HDRAT ; Header for Activity Report
61 W:PAGE>0!($E(IOST,1,2)="C-") @IOF S PAGE=PAGE+1,LINE=6,$X=0
62 W "'LOCKOUT REQUIRED?' Flag "_$S(ENACT="S":"SET",1:"CLEARED")_" for ... ",?(IOM-38),ENDATE,?(IOM-8),"Page "_PAGE
63 W !,"ENTRY #",?T(1),"Equipment Category",?T(2),"Manufacturer Equipment Name",?T(3),"Location"
64 W !,?T(11),"Manufacturer",?T(12),"Model",?T(13),"Serial Number"
65 K X S $P(X,"-",IOM)="-" W !,X,!
66 Q
67 ;
68HOLD Q:$E(IOST,1,2)'="C-"
69 W !!,"Press <RETURN> to continue, or '^' to escape..." R X:DTIME
70 S:$E(X)="^" ESCAPE=1
71 Q
72 ;
73EXIT K ^XUTL("ENLT",ENDATE("I"))
74 I $D(ZTQUEUED) S ZTREQ="@"
75 K ENACT,ENDATE
76 ;ENEQLT1
Note: See TracBrowser for help on using the repository browser.