VistA-WorldVistAEHR/r/ENGINEERING-EN/ENPL5B.m

91 lines
4.6 KiB
Mathematica

ENPL5B ;(WIRMFO)/LKG,SAB-FYFP REPORT: PROJECT DETAIL PAGE ;5/15/96
;;7.0;ENGINEERING;**3,11,23,28**;Aug 17, 1993
PD ; detail page for project ENDA
N ENBO,ENCSTA,ENCSTCA,ENCSTDA,ENEQPL,ENEQPT,ENI,ENPC,ENPN,ENPR,ENX,ENY,ENY0,ENY19,ENY24,ENY52,ENY55
F ENX=0,19,24,52,55 S @("ENY"_ENX)=$G(^ENG("PROJ",ENDA,ENX))
S ENPN=$P(ENY0,U),ENPR=$P(ENY0,U,6),ENPC=$$GET1^DIQ(6925,ENDA_",",158.1)
S ENBO=$$GET1^DIQ(6925,ENDA_",",158.8)
D HD
W !!,?5,"PROJECT NUMBER: ",ENPN
W ?35,"TITLE: ",$P(ENY0,U,3)
W ?95,"FACILITY TYPE: ",$P(ENY52,U,6)
W ! W:ENMDA ?5,"DIVISION: ",$$GET1^DIQ(6925,ENDA_",",176)
W !,?5,"PROGRAM: ",$$GET1^DIQ(6925,ENDA_",",155)
I "^MA^MI^MM^NR^"[(U_ENPR_U) D
. W ?60,"MCPS SCORE: ",$S(ENPR'="MA":"N/A",1:$P(ENY24,U,8))
W !,?5,"PROJECT CATEGORY: ",ENPC
I "^MA^MI^MM^NR^"[(U_ENPR_U) D
. W ?60,"# NEW NHCU BEDS:"
. W ?83,$S(ENPR'="NR"&(ENPC'="NHCU"):"N/A",ENPR="NR"&(ENBO'="NHCU"):"N/A",1:$FN(+$P(ENY52,U,3),","))
I "^MA^MI^MM^NR^"[(U_ENPR_U) D
. W !,?5,"BONUS CATEGORY: "
. W $S(ENPR="NR":ENBO,1:"N/A")
. W ?60,"# NHCU BEDS RENOVATED:"
. W ?83,$S(ENPR'="NR"&(ENPC'="NHCU"):"N/A",ENPR="NR"&(ENBO'="NHCU"):"N/A",1:$FN(+$P(ENY52,U,4),","))
. W !,?5,"AMBULATORY CARE PERCENTAGE: "
. W $S(ENPR="NR":$$GET1^DIQ(6925,ENDA_",",158.9),1:"N/A")
. W ?60,"# NHCU BEDS CONVERTED:"
. W ?83,$S(ENPR'="NR"&(ENPC'="NHCU"):"N/A",ENPR="NR"&(ENBO'="NHCU"):"N/A",1:$FN(+$P(ENY52,U,5),","))
W !,?5,"BUDGET CATEGORY: ",$$GET1^DIQ(6925,ENDA_",",158.2)
I "^MA^MI^MM^NR^"[(U_ENPR_U) D
. W !!,?20,"FUNDING YEAR",?35,"ESTIMATED COST (in $000)"
. S ENCSTDA=$P($G(^ENG("PROJ",ENDA,5)),U,2)+500\1000
. S ENCSTCA=$P($G(^ENG("PROJ",ENDA,1)),U)+500\1000
. S ENCSTA=ENCSTDA+ENCSTCA
. W:ENCSTA ?67,"",?81,"APPROVED COST (in $000)"
. W !,?5,"DESIGN",?23,$P($G(^ENG("PROJ",ENDA,5)),U,7),?38,"$",$J($FN($P(ENY19,U,10)+500\1000,","),9)
. W:ENCSTA ?84,"$",$J($FN(ENCSTDA,","),9)
. W !,?5,"CONSTRUCTION",?23,$P(ENY0,U,7),?38,"$",$J($FN($P(ENY19,U,11)+500\1000,","),9)
. W:ENCSTA ?84,"$",$J($FN(ENCSTCA,","),9)
. W !,?5,"TOTAL",?38,"$",$J($FN($P(ENY19,U,10)+500\1000+($P(ENY19,U,11)+500\1000),","),9)
. W:ENCSTA ?84,"$",$J($FN(ENCSTA,","),9)
;
I "^LE^"[(U_ENPR_U) D
. W !!,?5,"LEASE TYPE: ",$$GET1^DIQ(6925,ENDA_",",285)
. W !,?5,"PROPOSED LEASE TERM: ",+$P(ENY55,U,6)," YEARS"
. W !,?5,"RENTABLE SQ FT: ",$FN(+$P(ENY55,U,7),",")
. W !,?5,"NET PARKING: ",$FN($P($G(^ENG("PROJ",ENDA,15)),U,3),",")
. W !!,?20,"FUNDING YEAR",?35,"ESTIMATED COST (in $000)"
. W !,?5,"AWARD LEASE",?23,$P(ENY55,U,2),?38,"$",$J($FN($P(ENY55,U,4)+500\1000,","),9)," (Lump Sum)"
. W !,?5,"RENT STARTS",?23,$P(ENY55,U,3),?38,"$",$J($FN($P(ENY55,U,5)+500\1000,","),9)," (Annual Rent)"
. W !,?5,"TOTAL",?38,"$",$J($FN($P(ENY55,U,4)+500\1000+($P(ENY55,U,5)+500\1000),","),9)
. W !!,?5,"EXISTING SPACE RENTABLE SQ FT: ",$S($P(ENY55,U)'="NE":"N/A",1:$FN(+$P(ENY55,U,9),","))
. W !,?5,"EXISTING SPACE ANNUAL RENT: ",$S($P(ENY55,U)'="NE":"N/A",1:"$"_$FN(+$P(ENY55,U,8),","))
I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1 Q:END
W !!,?5,"ACTIVATIONS: FISCAL YEAR REQUIRED: ",$P(ENY24,U)
W ?60,"(costs in $000)"
W !,?10,"ADD'L FTEE REQUIRED:",?42,$J($FN($P(ENY24,U,3)+0,","),6,2),?53,"EQUIPMENT:",?78,"$",$J($FN($P(ENY24,U,5)+500\1000,","),7)
W !,?10,"RECURRING PS:",?40,"$",$J($FN($P(ENY24,U,4)+500\1000,","),7),?53,"RECURRING ALL OTHER:",?78,"$",$J($FN($P(ENY24,U,2)+500\1000,","),7)
W !,?10,"NON-RECURRING ALL OTHER:",?40,"$",$J($FN($P(ENY24,U,6)+500\1000,","),7),?53,"TRAVEL .007:",?78,"$",$J($FN($P(ENY24,U,7)+500\1000,","),7)
;
S ENEQPT=0
W !!,?5,"EQUIPMENT OVER $250K:",?27,"NAME",?60,"ADD/REPL",?73,"QUANTITY",?84,"TOTAL COST (in $000)"
I '$O(^ENG("PROJ",ENDA,20,0)) W !,?27,"none listed"
E D W !,?10,"TOTAL COST",?84,"$",$J($FN(ENEQPT,","),7)
. S ENI=0 F S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI D
. . S ENY=$G(^ENG("PROJ",ENDA,25,ENI,0)) Q:ENY=""
. . S ENEQPL=$P(ENY,U,2)*$P(ENY,U,3)+500\1000
. . W !,?27,$P(ENY,U),?60,$S($P(ENY,U,4)="A":"ADDITIONAL",$P(ENY,U,4)="R":"REPLACEMENT",1:"UNKNOWN"),?75,$J($P(ENY,U,2),3),?84,"$",$J($FN(ENEQPL,","),7)
. . S ENEQPT=ENEQPT+ENEQPL
;
I "^MA^MI^MM^NR^"[(U_ENPR_U) W !!,?5,"BUILDINGS: ",$$GET1^DIQ(6925,ENDA_",",178)
;
W !!,?5,"CITED DEFICIENCY: ",$$CD^ENPL5A(ENDA)
;
I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1 Q:END
;
D WP^ENPL5C
S ENPG=ENPG+1
;F ENI=$Y+6:1:IOSL W !
F ENI=$Y+6:1:$S(IOSL>254:$Y+9,1:IOSL) W ! ; for long page length
W !,?64,"Page ",ENPG,?100,ENRDT
I $E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:'Y END=1 Q:END
Q
HD ; page header
D FYFPHD^ENPL5A
S ENX=$S("^MA^MI^MM^NR^"[(U_ENPR_U):"CONSTRUCTION","LE"=ENPR:"LEASE",1:"")
S ENX=ENX_" PROJECT DETAIL"
W !,?(125-$L(ENX)\2+5),ENX
Q
;ENPL5B