ENPLV5 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;4/28/97
;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
; project application specific checks
I "^MA^MI^NR^"'[(U_ENPR_U) S ENS=1,ENMSG="PROGRAM ("_ENPR_") not supported for Project Applications." D MSG Q
N ENY33,ENY55
S ENY33=$G(^ENG("PROJ",ENDA,33)),ENY55=$G(^ENG("PROJ",ENDA,55))
D ^ENPLV6
;
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
; H089 Chapters
S ENI=0 F S ENI=$O(^ENG("PROJ",ENDA,22,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENDA,22,ENI,0)) Q:ENY=""
. S ENX=$$GET1^DIQ(7336.6,$P(ENY,U)_",",1) Q:ENX="999"
. 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
I ENPR="NR" D
. I $P(ENY52,U,7)="" S ENS=1,ENMSG="EPA REPORTABLE (y/n) required for NRM applications." D MSG
. I $P(ENY52,U,7)="Y" D
. . I $P(ENY52,U,8)="" S ENS=1,ENMSG="EPA REPORTING CATEGORY is required for EPA REPORTABLE (YES)." D MSG
. . I $P(ENY52,U,8)]"",ENPCI]"" D
. . . D VAL^DIE(6925,ENDA_",",158.7,"","`"_$P(ENY52,U,8),.ENX)
. . . 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
I ENXMIT D
. I "^MA^MI^MM^NR^"[(U_ENPR_U) D
. . 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
. I "^LE^"[(U_ENPR_U),";5;"'[(";"_ENSTATI_";") S ENS=1,ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inappropriate for project application." D MSG
. I $P(ENY33,U)'="Y" S ENS=1,ENMSG="Project Application must be approved by Chief Engineer." D MSG
. 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
. I $P(ENY33,U,4)'="Y" S ENS=1,ENMSG="Project Application must be approved by VAMC Director." D MSG
. 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
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
;ENPL5
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLV5 2487 printed Oct 16, 2024@17:55:59 Page 2
ENPLV5 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;4/28/97
+1 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
+2 ; project application specific checks
+3 IF "^MA^MI^NR^"'[(U_ENPR_U)
SET ENS=1
SET ENMSG="PROGRAM ("_ENPR_") not supported for Project Applications."
DO MSG
QUIT
+4 NEW ENY33,ENY55
+5 SET ENY33=$GET(^ENG("PROJ",ENDA,33))
SET ENY55=$GET(^ENG("PROJ",ENDA,55))
+6 DO ^ENPLV6
+7 ;
+8 IF $PIECE($GET(^ENG("PROJ",ENDA,19)),U,7)>0
IF '$ORDER(^ENG("PROJ",ENDA,54,0))
SET ENS=1
SET ENMSG="IMPACT JUSTIFICATION required when IMPACT COST > 0."
DO MSG
+9 ; H089 Chapters
+10 SET ENI=0
FOR
SET ENI=$ORDER(^ENG("PROJ",ENDA,22,ENI))
if 'ENI
QUIT
Begin DoDot:1
+11 SET ENY=$GET(^ENG("PROJ",ENDA,22,ENI,0))
if ENY=""
QUIT
+12 SET ENX=$$GET1^DIQ(7336.6,$PIECE(ENY,U)_",",1)
if ENX="999"
QUIT
+13 IF $PIECE(ENY,U,3)+$PIECE(ENY,U,5)'>0
SET ENS=1
SET ENMSG="No gross sq ft listed for H089 CHAPTER ("_ENX_")."
DO MSG
End DoDot:1
+14 IF ENPR="NR"
Begin DoDot:1
+15 IF $PIECE(ENY52,U,7)=""
SET ENS=1
SET ENMSG="EPA REPORTABLE (y/n) required for NRM applications."
DO MSG
+16 IF $PIECE(ENY52,U,7)="Y"
Begin DoDot:2
+17 IF $PIECE(ENY52,U,8)=""
SET ENS=1
SET ENMSG="EPA REPORTING CATEGORY is required for EPA REPORTABLE (YES)."
DO MSG
+18 IF $PIECE(ENY52,U,8)]""
IF ENPCI]""
Begin DoDot:3
+19 DO VAL^DIE(6925,ENDA_",",158.7,"","`"_$PIECE(ENY52,U,8),.ENX)
+20 IF ENX="^"
SET ENS=1
SET ENMSG="EPA REPORTING CATEGORY ("_$PIECE($GET(^ENG(6925.3,$PIECE(ENY52,U,8),0)),U)_") inconsistent with PROJECT CATEGORY ("_$PIECE($GET(^OFM(7336.8,ENPCI,0)),U)_")."
DO MSG
End DoDot:3
End DoDot:2
End DoDot:1
+21 IF ENXMIT
Begin DoDot:1
+22 IF "^MA^MI^MM^NR^"[(U_ENPR_U)
Begin DoDot:2
+23 IF ";5;6;8;9;10;11;12;13;14;15"'[(";"_ENSTATI_";")
SET ENS=1
SET ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inappropriate for project application."
DO MSG
End DoDot:2
+24 IF "^LE^"[(U_ENPR_U)
IF ";5;"'[(";"_ENSTATI_";")
SET ENS=1
SET ENMSG="STATUS ("_$$EXTERNAL^DILFD(6925,6,"",ENSTATI)_") inappropriate for project application."
DO MSG
+25 IF $PIECE(ENY33,U)'="Y"
SET ENS=1
SET ENMSG="Project Application must be approved by Chief Engineer."
DO MSG
+26 IF $PIECE(ENY33,U)="Y"
IF $$FMDIFF^XLFDT(DT,$PIECE(ENY33,U,3),1)>182
SET ENS=1
SET ENMSG="Chief Engineer approval date ("_$$FMTE^XLFDT($PIECE(ENY33,U,3),"D")_") is over 6 months old."
DO MSG
+27 IF $PIECE(ENY33,U,4)'="Y"
SET ENS=1
SET ENMSG="Project Application must be approved by VAMC Director."
DO MSG
+28 IF $PIECE(ENY33,U,4)="Y"
IF $$FMDIFF^XLFDT(DT,$PIECE(ENY33,U,6),1)>182
SET ENS=1
SET ENMSG="VAMC Director approval date ("_$$FMTE^XLFDT($PIECE(ENY33,U,6),"D")_") is over 6 months old."
DO MSG
End DoDot:1
+29 QUIT
MSG ; save message
+1 ; ENL(ENS) - last line used in array
+2 ; ENMSG - messsage
+3 ; ENS - severity (1,2) 1 invalid, 2 warning
+4 IF ENV>ENS
SET ENV=ENS
+5 SET ENL(ENS)=ENL(ENS)+1
SET ^TMP($JOB,"V",ENDA,ENS,ENL(ENS),0)=ENMSG
+6 QUIT
+7 ;ENPL5