source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPLV4.m@ 846

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1ENPLV4 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;9/15/97
2 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
3 ; Five Year Facility Plan (FYFP) specific checks
4 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
5 N ENCST,ENFYAE,ENFYCO,ENMAX,ENMIN,ENY55
6 S ENY55=$G(^ENG("PROJ",ENDA,55))
7 D ^ENPLV6
8 S ENFYAE=$P($G(^ENG("PROJ",ENDA,5)),U,7)
9 S ENFYCO=$P(ENY0,U,7)
10 I "^MA^MI^MM^NR^"[(U_ENPR_U) D
11 . 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
12 . I ENFYCO]"",$P(ENY19,U,11)'>0 S ENS=1,ENMSG="ESTIMATED CONST COST (FYFP) required for FUNDING YEAR - CONST ("_ENFYCO_")." D MSG
13 . I ENFT]"" D
14 . . S:ENFT="VHA" ENMIN=$S(ENPR="MA":3000000,ENPR="MI":500000,ENPR="MM":150000,ENPR="NR":0,1:0)
15 . . S:ENFT="VHA" ENMAX=$S(ENPR="MA":10000000000,ENPR="MI":4000000,ENPR="MM":750000,ENPR="NR":10000000000,1:0)
16 . . S:ENFT="NCS" ENMIN=$S(ENPR="MA":3000000,ENPR="MI":0,ENPR="MM":0,ENPR="NR":0,1:0)
17 . . S:ENFT="NCS" ENMAX=$S(ENPR="MA":10000000000,ENPR="MI":4000000,ENPR="MM":0,ENPR="NR":0,1:0)
18 . . S:ENFT="VBA" ENMIN=$S(ENPR="MA":0,ENPR="MI":5000,ENPR="MM":0,ENPR="NR":0,1:0)
19 . . S:ENFT="VBA" ENMAX=$S(ENPR="MA":0,ENPR="MI":200000,ENPR="MM":10000000000,ENPR="NR":10000000000,1:0)
20 . . S ENCST=$$GET1^DIQ(6925,ENDA_",",212)
21 . . I ENCST<ENMIN S ENS=1,ENMSG="ESTIMATED COST ("_ENCST_") must be >= ("_ENMIN_") for FACILITY TYPE ("_ENFT_") and PROGRAM ("_ENPR_")." D MSG
22 . . I ENCST'<ENMAX S ENS=1,ENMSG="ESTIMATED COST ("_ENCST_") must be < ("_ENMAX_") for FACILITY TYPE ("_ENFT_") and PROGRAM ("_ENPR_")." D MSG
23 . 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
24 . 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
25 . 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
26 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
27 ;
28 I ENXMIT D
29 . I "^MA^MI^MM^NR^"[(U_ENPR_U) D
30 . . 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
31 . . 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
32 . I "^LE^"[(U_ENPR_U) D
33 . . I ";3;5;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inconsistent for Plan." D MSG
34 Q
35MSG ; save message
36 ; ENL(ENS) - last line used in array
37 ; ENMSG - messsage
38 ; ENS - severity (1,2) 1 invalid, 2 warning
39 I ENV>ENS S ENV=ENS
40 S ENL(ENS)=ENL(ENS)+1,^TMP($J,"V",ENDA,ENS,ENL(ENS),0)=ENMSG
41 Q
42 ;ENPLV4
Note: See TracBrowser for help on using the repository browser.