source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENEQPMP3.m@ 1150

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

initial load of WorldVistAEHR

File size: 3.7 KB
Line 
1ENEQPMP3 ;(WASH ISC)/DH-Display PMI Schedules ;6.5.97
2 ;;7.0;ENGINEERING;**35,42**;Aug 17, 1993
3DDT ; Display Equipment Category PM Data
4 ; Expects IEN of Equipment Category File as loc var ENDTYP
5 I '$D(^ENG(6911,ENDTYP,4,0)) W !!,"There is no defined PM schedule for this Equipment Category.",! D HLD Q
6 N X,IOINLOW,IOINHI,IOINORM D ZIS^ENUTL ;Get BOLD and UNBOLD for CRT
7 S ENY=2,ENRT="6911",ENDVTYP=$P(^ENG(6911,ENDTYP,0),U) W @IOF,"Equipment Category: " D W(ENDVTYP) W !
8 S X=^ENG(6911,ENDTYP,0),X(0)=0
9 I $P(X,U,2) W ?5,"Lockout Required?: " D W("YES") S X(0)=1
10 I $P(X,U,3)="Y" W ?40,"JCAHO Item: " D W("YES") S X(0)=1
11 I X(0) W ! S ENY=ENY+2
12 S I=0 F S I=$O(^ENG(6911,ENDTYP,4,I)) Q:I'>0 S ENSH=$P(^ENG(6911,ENDTYP,4,I,0),"^",1),ENEMP=$P(^(0),"^",2),ENSKP=$P(^(0),"^",3),ENCRIT=$P(^(0),U,4) S ENMN="" S:$D(^ENG(6911,ENDTYP,4,I,1)) ENMN=^(1) D MNTH^ENLIB1,DPM
13 G EXIT ;End DDT
14 ;
15DINV ; Display Equipment Record PM Data
16 ; Expects IEN of Equipment File as loc var DA
17 I '$D(^ENG(6914,DA,4)) W !!,"There is no defined PM schedule for this piece of equipment.",! D HLD Q
18 N X,IOINLOW,IOINHI,IOINORM D ZIS^ENUTL
19 S (ENPMN,ENLID,ENSN,ENDTYP,ENDVTYP)="" S:$D(^ENG(6914,DA,3)) ENPMN=$P(^(3),U,6),ENLID=$P(^(3),U,7) S:$D(^ENG(6914,DA,1)) ENSN=$P(^(1),U,3),ENDTYP=$P(^(1),U,1) I ENDTYP]"" S ENDVTYP=$P($G(^ENG(6911,ENDTYP,0)),U)
20 S ENY=3,ENRT=6914 W @IOF,"Equipment ID #: " D W(DA) W ?40 D W(ENDVTYP) W !,"PM #: " D W(ENPMN)
21 W ?25,"Local ID: " D W(ENLID) W ?60,"S/N: " D W(ENSN) W !
22 S X=0,X(0)=^ENG(6914,DA,0),X(3)=$G(^ENG(6914,DA,3))
23 I $P(X(0),U,5) W ?5,"Lockout Required? " D W("YES") S X=1
24 I $P(X(3),U,9)="Y" W ?40,"JCAHO Item: " D W("YES") S X=1
25 I X W ! S ENY=ENY+2
26 S I=0 F S I=$O(^ENG(6914,DA,4,I)) Q:I'>0 I $D(^ENG(6914,DA,4,I,0)) S ENSH=$P(^(0),U),ENEMP=$P(^(0),U,2),ENSKP=$P(^(0),U,3),ENCRIT=$P(^(0),U,4) S ENMN="" S:$D(^ENG(6914,DA,4,I,1)) ENMN=^(1) D MNTH^ENLIB1,DPM
27 G EXIT ;End DINV
28 ;
29DPM ; Print data from File 6911 or 6914
30 N ENDA S ENDA=$S(ENRT=6911:ENDTYP,1:DA)
31 S:ENSH]"" ENSHOP=$P(^DIC(6922,ENSH,0),U) I ENEMP]"",$D(^ENG("EMP",ENEMP)) S ENEMP=$P(^(ENEMP,0),U)
32 I ENY>(IOSL-10) R !,"Press <RETURN> to continue...",ENX:DTIME G:ENX="^" EXIT W @IOF,$S(ENRT=6911:"Equip Category (cont'd): ",ENRT=6914:"Entry Number (cont'd): ",1:"") D W($S(ENRT=6911:ENDVTYP,ENRT=6914:ENDA,1:"")) W !! S ENY=2
33 W !,?30 D W(ENSHOP_" SHOP") W !,"Tech: " D W(ENEMP) W ?50,"Starting Month: " D W(ENMNTH) W !,"Skip Months: " D W(ENSKP)
34 W ?50,"Criticality: " D W(ENCRIT) W !,"Frequency (multiple):" S ENY=ENY+4
35 S J=0 F S J=$O(@("^ENG("_ENRT_","_ENDA_",4,"_I_",2,"_J_")")) Q:J'>0 S ENSBSCR=$P(@("^ENG("_ENRT_","_ENDA_",4,"_I_",2,"_J_",0)"),U) I ENSBSCR]"" S EN(ENSBSCR)=^(0)
36 F J="TA","BA","A","S","Q","BM","M","BW","W","N" I $D(EN(J)) D DPM1
37 K EN W !! S ENY=ENY+2 Q
38 ;
39DPM1 I J="N" W !,?3 D W("NONE") S ENY=ENY+1 Q
40 I $P(EN(J),U,2)]"",$P(EN(J),U,2)'["." S $P(EN(J),U,2)=$P(EN(J),U,2)_".0"
41 W !,?5 D W($S(J="TA":"TRI-ANNUAL",J="BA":"BI-ANNUAL",J="A":"ANNUAL",J="S":"SEMI-ANNUAL",J="Q":"QUARTERLY",J="BM":"BI-MONTHLY",J="M":"MONTHLY",J="BW":"BI-WEEKLY",J="W":"WEEKLY",1:""))
42 W ?18 D W($J($P(EN(J),U,2),5,1)) W " hrs "
43 D W($J("$"_$S($P(EN(J),"^",3)]"":$P(EN(J),"^",3),1:0),6)) W " (est) Level: " D W($S($P(EN(J),"^",4)]"":$P(EN(J),"^",4),1:"N/A")) S ENY=ENY+1
44 I $P(EN(J),U,5)]"" W !,?5,"Proc Ref: " S ENA=$G(^ENG(6914.2,$P(EN(J),U,5),0)) D W($P(ENA,U)) W " Title: " D W($P(ENA,U,2)) K ENA S ENY=ENY+1
45 I "^BA^TA^"[(U_J_U) W !,?5,"Starting Year: " D W($P(EN(J),U,6)) S ENY=ENY+1
46 Q
47 ;
48W(ENDATA) ;Bold ENDATA
49 N X
50 S X=$X W IOINHI S $X=X W ENDATA
51 S X=$X W IOINLOW S $X=X
52 Q
53 ;
54EXIT D:'$D(ENNOHLD) HLD
55 K ENSH,ENSHOP,ENMN,ENMNTH,ENEMP,ENSKP,ENPRTCL,ENSBSCR,ENRT,ENY
56 K ENLID,ENPMN,ENSN,ENCRIT
57 Q
58 ;
59HLD I $E(IOST,1,2)="C-" R !,"Press <RETURN> to continue...",X:DTIME
60 Q
61 ;ENEQPMP3
Note: See TracBrowser for help on using the repository browser.