source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPLV5.m@ 1800

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

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1ENPLV5 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;4/28/97
2 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
3 ; project application specific checks
4 I "^MA^MI^NR^"'[(U_ENPR_U) S ENS=1,ENMSG="PROGRAM ("_ENPR_") not supported for Project Applications." D MSG Q
5 N ENY33,ENY55
6 S ENY33=$G(^ENG("PROJ",ENDA,33)),ENY55=$G(^ENG("PROJ",ENDA,55))
7 D ^ENPLV6
8 ;
9 I $P($G(^ENG("PROJ",ENDA,19)),U,7)>0,'$O(^ENG("PROJ",ENDA,54,0)) S ENS=1,ENMSG="IMPACT JUSTIFICATION required when IMPACT COST > 0." D MSG
10 ; H089 Chapters
11 S ENI=0 F S ENI=$O(^ENG("PROJ",ENDA,22,ENI)) Q:'ENI D
12 . S ENY=$G(^ENG("PROJ",ENDA,22,ENI,0)) Q:ENY=""
13 . S ENX=$$GET1^DIQ(7336.6,$P(ENY,U)_",",1) Q:ENX="999"
14 . I $P(ENY,U,3)+$P(ENY,U,5)'>0 S ENS=1,ENMSG="No gross sq ft listed for H089 CHAPTER ("_ENX_")." D MSG
15 I ENPR="NR" D
16 . I $P(ENY52,U,7)="" S ENS=1,ENMSG="EPA REPORTABLE (y/n) required for NRM applications." D MSG
17 . I $P(ENY52,U,7)="Y" D
18 . . I $P(ENY52,U,8)="" S ENS=1,ENMSG="EPA REPORTING CATEGORY is required for EPA REPORTABLE (YES)." D MSG
19 . . I $P(ENY52,U,8)]"",ENPCI]"" D
20 . . . D VAL^DIE(6925,ENDA_",",158.7,"","`"_$P(ENY52,U,8),.ENX)
21 . . . I ENX="^" S ENS=1,ENMSG="EPA REPORTING CATEGORY ("_$P($G(^ENG(6925.3,$P(ENY52,U,8),0)),U)_") inconsistent with PROJECT CATEGORY ("_$P($G(^OFM(7336.8,ENPCI,0)),U)_")." D MSG
22 I ENXMIT D
23 . I "^MA^MI^MM^NR^"[(U_ENPR_U) D
24 . . I ";5;6;8;9;10;11;12;13;14;15"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inappropriate for project application." D MSG
25 . I "^LE^"[(U_ENPR_U),";5;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inappropriate for project application." D MSG
26 . I $P(ENY33,U)'="Y" S ENS=1,ENMSG="Project Application must be approved by Chief Engineer." D MSG
27 . I $P(ENY33,U)="Y",$$FMDIFF^XLFDT(DT,$P(ENY33,U,3),1)>182 S ENS=1,ENMSG="Chief Engineer approval date ("_$$FMTE^XLFDT($P(ENY33,U,3),"D")_") is over 6 months old." D MSG
28 . I $P(ENY33,U,4)'="Y" S ENS=1,ENMSG="Project Application must be approved by VAMC Director." D MSG
29 . I $P(ENY33,U,4)="Y",$$FMDIFF^XLFDT(DT,$P(ENY33,U,6),1)>182 S ENS=1,ENMSG="VAMC Director approval date ("_$$FMTE^XLFDT($P(ENY33,U,6),"D")_") is over 6 months old." D MSG
30 Q
31MSG ; save message
32 ; ENL(ENS) - last line used in array
33 ; ENMSG - messsage
34 ; ENS - severity (1,2) 1 invalid, 2 warning
35 I ENV>ENS S ENV=ENS
36 S ENL(ENS)=ENL(ENS)+1,^TMP($J,"V",ENDA,ENS,ENL(ENS),0)=ENMSG
37 Q
38 ;ENPL5
Note: See TracBrowser for help on using the repository browser.