43 lines
3.1 KiB
Mathematica
43 lines
3.1 KiB
Mathematica
ENPLV4 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;9/15/97
|
|
;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
|
|
; Five Year Facility Plan (FYFP) specific checks
|
|
I "^MA^MI^MM^NR^LE^"'[(U_ENPR_U) S ENS=1,ENMSG="PROGRAM ("_ENPR_") not supported for the 5-Yr Plan." D MSG Q
|
|
N ENCST,ENFYAE,ENFYCO,ENMAX,ENMIN,ENY55
|
|
S ENY55=$G(^ENG("PROJ",ENDA,55))
|
|
D ^ENPLV6
|
|
S ENFYAE=$P($G(^ENG("PROJ",ENDA,5)),U,7)
|
|
S ENFYCO=$P(ENY0,U,7)
|
|
I "^MA^MI^MM^NR^"[(U_ENPR_U) D
|
|
. I ENFYAE]"",$P(ENY19,U,10)'>0 S ENS=1,ENMSG="ESTIMATED A/E COST (FYFP) required for FUNDING YEAR - A/E ("_ENFYAE_")." D MSG
|
|
. I ENFYCO]"",$P(ENY19,U,11)'>0 S ENS=1,ENMSG="ESTIMATED CONST COST (FYFP) required for FUNDING YEAR - CONST ("_ENFYCO_")." D MSG
|
|
. I ENFT]"" D
|
|
. . S:ENFT="VHA" ENMIN=$S(ENPR="MA":3000000,ENPR="MI":500000,ENPR="MM":150000,ENPR="NR":0,1:0)
|
|
. . S:ENFT="VHA" ENMAX=$S(ENPR="MA":10000000000,ENPR="MI":4000000,ENPR="MM":750000,ENPR="NR":10000000000,1:0)
|
|
. . S:ENFT="NCS" ENMIN=$S(ENPR="MA":3000000,ENPR="MI":0,ENPR="MM":0,ENPR="NR":0,1:0)
|
|
. . S:ENFT="NCS" ENMAX=$S(ENPR="MA":10000000000,ENPR="MI":4000000,ENPR="MM":0,ENPR="NR":0,1:0)
|
|
. . S:ENFT="VBA" ENMIN=$S(ENPR="MA":0,ENPR="MI":5000,ENPR="MM":0,ENPR="NR":0,1:0)
|
|
. . S:ENFT="VBA" ENMAX=$S(ENPR="MA":0,ENPR="MI":200000,ENPR="MM":10000000000,ENPR="NR":10000000000,1:0)
|
|
. . S ENCST=$$GET1^DIQ(6925,ENDA_",",212)
|
|
. . I ENCST<ENMIN S ENS=1,ENMSG="ESTIMATED COST ("_ENCST_") must be >= ("_ENMIN_") for FACILITY TYPE ("_ENFT_") and PROGRAM ("_ENPR_")." D MSG
|
|
. . I ENCST'<ENMAX S ENS=1,ENMSG="ESTIMATED COST ("_ENCST_") must be < ("_ENMAX_") for FACILITY TYPE ("_ENFT_") and PROGRAM ("_ENPR_")." D MSG
|
|
. S ENX=$P($G(^ENG("PROJ",ENDA,5)),U,2) I ENX>0,ENX+999\1000*1000'=$P(ENY19,U,10) S ENS=2,ENMSG="ESTIMATED A/E COST ("_$P(ENY19,U,10)_") does not match APPROVED A/E FUNDING ("_ENX_")" D MSG
|
|
. S ENX=$P(ENY1,U) I ENX>0,ENX+999\1000*1000'=$P(ENY19,U,11) S ENS=2,ENMSG="ESTIMATED CONST COST ("_$P(ENY19,U,11)_") does not match APPROVED CONSTRUCTION ("_ENX_")" D MSG
|
|
. I ENFYAE<ENFY,ENFYCO<ENFY S ENS=1,ENMSG="A least one FUNDING YEAR (A/E or CONST) must be the Plan's current year ("_ENFY_") or later." D MSG
|
|
I "^LE^"[(U_ENPR_U),$P(ENY55,U,2)<ENFY,$P(ENY55,U,3)<ENFY S ENS=1,ENMSG="A least one FY (AWARD LEASE or RENT STARTS) must be the Plan's current year ("_ENFY_") or later." D MSG
|
|
;
|
|
I ENXMIT D
|
|
. I "^MA^MI^MM^NR^"[(U_ENPR_U) D
|
|
. . I ENFYAE>ENFY!(ENFYCO>ENFY),";3;5;6;8;9;10;11;12;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inconsistent for Plan's budget year ("_(ENFY+1)_") or later." D MSG
|
|
. . I ENFYAE=ENFY!(ENFYCO=ENFY),ENFYAE'>ENFY,ENFYCO'>ENFY,";6;8;9;10;11;12;13;14;15;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inconsistent for Plan's current year ("_(ENFY)_")." D MSG
|
|
. I "^LE^"[(U_ENPR_U) D
|
|
. . I ";3;5;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inconsistent for Plan." D MSG
|
|
Q
|
|
MSG ; save message
|
|
; ENL(ENS) - last line used in array
|
|
; ENMSG - messsage
|
|
; ENS - severity (1,2) 1 invalid, 2 warning
|
|
I ENV>ENS S ENV=ENS
|
|
S ENL(ENS)=ENL(ENS)+1,^TMP($J,"V",ENDA,ENS,ENL(ENS),0)=ENMSG
|
|
Q
|
|
;ENPLV4
|