source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPL5A.m@ 1211

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

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1ENPL5A ;(WIRMFO)/LKG,SAB-FYFP REPORT: YEAR SUMMARY PAGE ;5/15/96
2 ;;7.0;ENGINEERING;**3,11,23,28**;Aug 17, 1993
3YS ; year summary page for ENYR
4 N ENAE,ENCO,ENCST,ENCSTC,ENCSTCA,ENCSTD,ENCSTDA,ENDA,ENPN,ENPR,ENPRE,ENX
5 D HD
6 F ENPR="LE","MA","MI","MM","NR" D Q:END
7 . Q:$O(^TMP($J,"Y",ENYR,ENPR,""))']""
8 . S ENPRE=$S(ENPR="LE":"LEASE",ENPR="MA":"MAJOR",ENPR="MI":"MINOR",ENPR="MM":"MI-MISC",ENPR="NR":"NRM",1:"")
9 . W:$E(IOST,1,2)'="C-" !
10 . S ENPN=""
11 . F S ENPN=$O(^TMP($J,"Y",ENYR,ENPR,ENPN)) Q:ENPN="" D Q:END
12 . . S ENX=^TMP($J,"Y",ENYR,ENPR,ENPN)
13 . . S ENDA=$P(ENX,U),ENAE=$P(ENX,U,2),ENCO=$P(ENX,U,3)
14 . . I "^MA^MI^MM^NR^"[(U_ENPR_U) D
15 . . . S ENX=$G(^ENG("PROJ",ENDA,19))
16 . . . S ENCSTD=$P(ENX,U,10)+999\1000
17 . . . S ENCSTC=$P(ENX,U,11)+999\1000
18 . . . S ENCST=$S(ENAE:ENCSTD,1:0)+$S(ENCO:ENCSTC,1:0)
19 . . I "^LE^"[(U_ENPR_U) D
20 . . . S ENCST=$P($G(^ENG("PROJ",ENDA,55)),U,5)+999\1000
21 . . I ENPR'="LE"!($P($G(^ENG("PROJ",ENDA,55)),U)'="EX") D SUM^ENPL5D
22 . . I $Y+10>IOSL D FT Q:END D HD
23 . . W !
24 . . W:ENMDA $$GET1^DIQ(6925,ENDA_",",176)
25 . . W ?12,$P(ENPN,"-",2,3)
26 . . W ?21,$E($P($G(^ENG("PROJ",ENDA,0)),U,3),1,30)
27 . . W ?54,"$",$J($FN(ENCST,","),9)
28 . . I "^MA^MI^MM^NR^"[(U_ENPR_U) D
29 . . . I '(ENAE&ENCO) W $S(ENAE:" D",ENCO:" C",1:"")
30 . . . ;S ENCSTDA=$P($G(^ENG("PROJ",ENDA,5)),U,2)+999\1000
31 . . . ;S ENCSTCA=$P($G(^ENG("PROJ",ENDA,1)),U,1)+999\1000
32 . . . ;I ENCSTDA>0&(ENCSTD'=ENCSTDA)!(ENCSTCA>0&(ENCSTC'=ENCSTCA)) W ?66,"!"
33 . . W ?70,ENPRE
34 . . W ?83,$E($$GET1^DIQ(6925,ENDA_",",158.1),1,20)
35 . . ; W:$O(^ENG("PROJ",ENDA,20,0)) ?106,"YES"
36 . . I ENYR'="F" D
37 . . . W:ENPR="MA" ?111,$J($P($G(^ENG("PROJ",ENDA,24)),U,8),5)
38 . . . W ?118,$$CD(ENDA)
39 W !,?54,"----------"
40 W !,?5,"TOTAL COST (Excluding Expedited Leases)",?54,"$",$J($FN($P($G(ENT(ENYR,"LE")),U)+$P($G(ENT(ENYR,"MA")),U)+$P($G(ENT(ENYR,"MI")),U)+$P($G(ENT(ENYR,"MM")),U)+$P($G(ENT(ENYR,"NR")),U),","),9)
41 F ENI=$Y+10:1:$S(IOSL>254:$Y+13,1:IOSL) W ! ; for long page length
42 ;F ENI=$Y+10:1:IOSL W !
43 W !,?10,"Project Count"
44 W " LEASE (excludes Expedited) = ",$P($G(ENT(ENYR,"LE")),U,2)+0
45 W " MAJOR = ",$P($G(ENT(ENYR,"MA")),U,2)+0
46 W " MINOR = ",$P($G(ENT(ENYR,"MI")),U,2)+0
47 W " MINOR MISC = ",$P($G(ENT(ENYR,"MM")),U,2)+0
48 W " NRM = ",$P($G(ENT(ENYR,"NR")),U,2)+0
49 D FT
50 Q
51HD ; page header
52 D FYFPHD
53 S ENX=$S(ENFY=ENYR:"CURRENT YEAR APPROVED",ENYR="F":"FUTURE YEARS",1:"BUDGET YEAR")
54 S:ENFY+1<ENYR ENX=ENX_" PLUS "_$P("ONE^TWO^THREE^FOUR",U,ENYR-(ENFY+1))
55 S ENX=ENX_" PROJECT LIST"
56 S:ENYR'="F" ENX=ENX_" (FY "_ENYR_")"
57 W !,?(125-$L(ENX)\2+5),ENX,!!
58 W:ENMDA "DIVISION"
59 W ?12,"PROJ #",?21,"TITLE",?56,"COST",?65,"*",?70,"PROGRAM"
60 W ?83,"PROJECT" ;,?104,"DOMINO"
61 W:ENYR'="F" ?111,"MCPS",?118,"CITED"
62 W !,?54,"(in $000)",?83,"CATEGORY"
63 W:ENYR'="F" ?111,"SCORE",?118,"DEFICIENCY"
64 W !
65 Q
66FT ; page footer
67 W !!,?5,"* C = Construction dollars only D = Design dollars only"
68 S ENPG=$G(ENPG)+1 W !!,?64,"Page ",ENPG,?100,ENRDT
69 I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1
70 Q
71FYFPHD ; FYFP Header
72 W:$E(IOST,1,2)="C-"!ENPG @IOF
73 W !,?56,"FIVE YEAR FACILITY PLAN",!,?ENPGHC,ENPGH
74 Q
75CD(ENDA) ; Cited Deficiencies Text Extrinsic Variable
76 N ENCA,ENCD,ENI
77 S ENCD="",ENI=0
78 F S ENI=$O(^ENG("PROJ",ENDA,21,ENI)) Q:'ENI D
79 . S ENCA=$$GET1^DIQ(6925.0164,ENI_","_ENDA_",","3:1")
80 . I "^JCAHO^RSFPE^"[(U_ENCA_U) S $P(ENCD,",",ENCA="RSFPE"+1)=ENCA
81 I $E(ENCD)="," S ENCD=$E(ENCD,2,99)
82 I ENCD="",$O(^ENG("PROJ",ENDA,21,0)) S ENCD="OTHER"
83 I ENCD="" S ENCD="NONE"
84 Q ENCD
85 ;ENPL5A
Note: See TracBrowser for help on using the repository browser.