1 | ENEQPMP ;(WASH ISC)/JED/DH-Establish PMI Parameters ;4.1.98
|
---|
2 | ;;7.0;ENGINEERING;**35,52**;Aug 17, 1993
|
---|
3 | ;
|
---|
4 | HDR W @IOF,!!,"PREVENTIVE MAINTENANCE PARAMETERS",!,"Version ",^ENG("VERSION") Q
|
---|
5 | PMSE ;DEVICE PM EDIT
|
---|
6 | I '$D(^XUSEC("ENEDPM",DUZ)) W !!,"Sorry, you need Security Key 'ENEDPM'." D HLD Q
|
---|
7 | W @IOF,!! S DIC(0)="AEQM",(DIC,DIE)="^ENG(6914," D ^DIC G:Y'>0 EXIT S DA=+Y
|
---|
8 | XNPMSE Q:'$D(DA) I $P($G(^ENG(6914,DA,4,0)),U,4)>0 W !,"Would you like to see the existing PM schedule for this device" S %=1 D YN^DICN G:%=0 XNPMSE I %=1 D DINV^ENEQPMP3 Q:$G(ENX)="^" G PMSE2
|
---|
9 | I $P($G(^ENG(6914,DA,1)),U)]"" G PMSE1
|
---|
10 | I $G(ENXP)=2 G PMSE1
|
---|
11 | W !,"There is no EQUIPMENT CATEGORY on file for this item. Would you",!,"like to enter one now" S %=1 D YN^DICN G:%=2 PMSE2 Q:%<1 S DR="6" D ^DIE I '$D(^ENG(6914,DA,1)) S ^ENG(6914,DA,1)=""
|
---|
12 | PMSE1 I $P($G(^ENG(6914,DA,1)),U)="" G PMSE2
|
---|
13 | S ENDTYP=$P($G(^ENG(6914,DA,1)),U),ENDVTYP=$P($G(^ENG(6911,ENDTYP,0)),U) W !,"Equipment Category is: ",ENDVTYP I '$D(^ENG(6911,ENDTYP,4)) W !,"There is no defined PM schedule for this category." G PMSE2
|
---|
14 | I $D(^ENG(6911,ENDTYP,4)) W !,"Would you like to see the standard PM schedule for this Equipment Category" S %=1 D YN^DICN G:%=-1 EXIT G:%=0 PMSE1 D:%=1 DDT^ENEQPMP3
|
---|
15 | PMSE10 I $D(^ENG(6911,ENDTYP,4)) W !,"Should this item be given the standard PM schedule for devices",!,"of category ",ENDVTYP S %=1 D YN^DICN G:%=2 PMSE2 I %=0 D PMSEH1 G PMSE10
|
---|
16 | I %'>0 G EXIT
|
---|
17 | D PMSE3 S I=0 F S I=$O(^ENG(6914,DA,4,I)) Q:I'>0 I '$D(^(I,1)) S J=0 F S J=$O(^ENG(6914,DA,4,I,2,J)) Q:J'>0 S ENA=$P(^(J,0),U) I ENA'="M",ENA'["W" D PMSESM Q
|
---|
18 | G:'$D(ENXP) PMSE G EXIT
|
---|
19 | PMSESM S ENSH=$P(^ENG(6914,DA,4,I,0),U),ENSHOP=$P(^DIC(6922,ENSH,0),U) W !!,"PM Schedule for ",ENSHOP," Shop may need a STARTING MONTH."
|
---|
20 | S DIE="^ENG(6914,"_DA_",4,",DA=1,DR="2" D ^DIE
|
---|
21 | Q
|
---|
22 | ;
|
---|
23 | PMSE2 S DR="[ENEQPMP]" D ^DIE G:'$D(ENXP) PMSE
|
---|
24 | G EXIT
|
---|
25 | ;
|
---|
26 | PMSE3 N ENX,DIE,DR
|
---|
27 | S I=0 F S I=$O(^ENG(6914,DA,4,I)) Q:I'>0 I $D(^ENG(6914,DA,4,I,0)),$D(^(1)) S ENB=$P(^ENG(6914,DA,4,I,0),U),ENB(ENB)=^ENG(6914,DA,4,I,1)
|
---|
28 | K ^ENG(6914,DA,4) S %X="^ENG(6911,ENDTYP,4,",%Y="^ENG(6914,DA,4," D %XY^%RCR K %X,%Y
|
---|
29 | S I=0 F S I=$O(^ENG(6914,"AB",I)) Q:I'>0 K ^ENG(6914,"AB",I,DA)
|
---|
30 | S I=0 F S I=$O(^ENG(6914,DA,4,I)) Q:I'>0 S ENA=$P(^ENG(6914,DA,4,I,0),U,1),^ENG(6914,"AB",ENA,DA,I)=""
|
---|
31 | I $D(^ENG(6914,DA,4,0)) S $P(^(0),U,2)="6914.04P" F I=0:0 S I=$O(^ENG(6914,DA,4,I)) Q:I'>0 S $P(^ENG(6914,DA,4,I,2,0),U,2)="6914.43SA"
|
---|
32 | I $D(ENB)\10 F I=0:0 S I=$O(ENB(I)) Q:I'>0 S J=$O(^ENG(6914,DA,4,"B",I,0)) I J>0 S:'$D(^ENG(6914,DA,4,J,1)) ^(1)=ENB(I) Q:'$D(^(1)) I ^(1)']"" S ^(1)=ENB(I)
|
---|
33 | S ENX=$P(^ENG(6911,ENDTYP,0),U,3) I ENX]"" D
|
---|
34 | . S DIE="^ENG(6914,"
|
---|
35 | . S DR="27///^S X=ENX" D ^DIE
|
---|
36 | K ENB Q
|
---|
37 | ;
|
---|
38 | PMSEH1 W !,"'YES' will cause the system to automatically assign the standard PM schedule.",!,"'NO' will enable you to enter a special schedule for this device." Q
|
---|
39 | HLD I $E(IOST,1,2)="C-" R !,"Press <RETURN> to continue...",ENX:DTIME
|
---|
40 | Q
|
---|
41 | EXIT Q:$G(ENXP)=2 G EXIT^ENEQPMP1
|
---|
42 | ;ENEQPMP
|
---|