source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENEQRP4.m@ 975

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1ENEQRP4 ;(WASH ISC)/DH-Report of High Failure Items ;1.14.98
2 ;;7.0;ENGINEERING;**48**;Aug 17, 1993
3 Q
4FAP ;REPORT PRINT SECTION
5 I $D(^TMP($J,"ENEQFA")) G FAPC
6 W !!,"There is no equipment" W:ENDVTYP'=0 " of type ",ENDVTYP W " with ",ENN," or more failures",!,"from ",$E(ENFR,4,5),"-",$E(ENFR,6,7),"-",$E(ENFR,2,3)," to ",$E(ENTO,4,5),"-",$E(ENTO,6,7),"-",$E(ENTO,2,3),".",!!
7 G DONE
8 ;
9FAPC W:IO'=IO(0) !,"beginning report..." U IO S ENPG=0 D T F I=1:1:9 S ENT(I)=0
10 W:$E(IOST,1,2)="C-" @IOF
11 D FAP1 S DA="" D FAP2,FAP3 G DONE
12 ;
13FAP1 W:ENPG @IOF S ENPG=ENPG+1 W "EQUIPMENT REPAIRS (",$S(ENDVTYP=0:"ALL EQUIPMENT",1:ENDVTYP),")",?45,ENDATE,?70,"Page ",ENPG
14 W !,?10,"From: ",$E(ENFR,4,5),"-",$E(ENFR,6,7),"-",$E(ENFR,2,3)," To: ",$E(ENTO,4,5),"-",$E(ENTO,6,7),"-",$E(ENTO,2,3)
15 W !,"Reference",?12,"Entry #",?29,"Hrs",?35,"Labor$",?43,"Mat'l$",?52,"Vndr$",?62,"Total$",?70,"Worker",! F K=1:1:79 W "-"
16 S ENY=5
17 Q
18FAP2 S DA=$O(^TMP($J,"ENEQFA",DA)),I=1,ENA=0 Q:DA="" ;S ENPMN="" I $D(^ENG(6914,DA,3)) S ENPMN=$P(^(3),U,6)
19 ;S:ENPMN="" ENPMN="None"
20FAP21 S ENR=$P(^TMP($J,"ENEQFA",DA,ENA),"^",I) I ENR="" S ENA=$O(^TMP($J,"ENEQFA",DA,ENA)) G:ENA'>0 FAP2 S I=1 G FAP21
21 S ENHS=^ENG(6914,DA,6,ENR,0) S I=I+1 F J=1:1:8 S E(J)=$P(ENHS,U,J)
22 S:E(1)]"" E(1)=$E(E(1),2,30)
23 S E(9)=E(5)+E(6)+E(7),ENT(9)=ENT(9)+E(9) F J=4:1:7 S ENT(J)=ENT(J)+E(J)
24 W !,E(1),?12,DA,?27,$J(E(4),5,1),?33,$J(E(5),8,2),?41,$J(E(6),8,2),?50,$J(E(7),8,2),?60,$J(E(9),8,2),?70,$E(E(8),1,9) S ENY=ENY+1
25 G:ENY'>(IOSL-4) FAP21 D FAP4 I $D(R),$E(R)="^" K R Q
26 G FAP21
27FAP3 I $D(R),$E(R)="^" Q
28 W ! F I=1:1:79 W "_"
29 W !,"TOTAL",?27,$J(ENT(4),5,1),?35,$J(ENT(5),6,2),?43,$J(ENT(6),6,2),?52,$J(ENT(7),6,2),?62,$J(ENT(9),6,2)
30 Q
31FAP4 D:$E(IOST,1,2)="C-" HOLD I $D(R),$E(R)="^" G DONE
32 D FAP1 Q
33 ;
34T S %DT="T",X="N" D ^%DT S ENNDATE=Y X ^DD("DD") S ENDATE=Y K X,Y Q
35HOLD W !!,"Press <RETURN> to continue or ""^"" to escape " R R:DTIME S:'$T R="^"
36 Q
37DONE D:$E(IOST,1,2)="C-" HOLD W @IOF
38 I '$D(ZTQUEUED),$E(IOST,1,2)="P-" D ^%ZISC
39 K E,ENDA,ENDVTYP,ENFR,ENTO,ENH,ENFY,ENQT,ENHS,ENN,ENNDATE,ENPMN,ENR,ENSTR,ENT,ENVEND,ENY,ENDATE,ENA,R,ENERR,ENPG
40 S:$D(ZTQUEUED) ZTREQ="@"
41 Q
42 ;ENEQRP4
Note: See TracBrowser for help on using the repository browser.