ENPLV6 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;11/27/95
;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
; Project Planning (FYFP, APPL) specific checks
; check required fields
I '$P($G(^ENG("PROJ",ENDA,17,0)),U,4) S ENS=1,ENMSG="PROJECT DESCRIPTION (SHORT) is required." D MSG
I '$P($G(^ENG("PROJ",ENDA,26,0)),U,4) S ENS=1,ENMSG="JUSTIFICATION (SHORT) is required." D MSG
;
I "^NR^"[(U_ENPR_U) D ; NRM program checks
. I $P(ENY52,U,9)]"" D
. . S ENX=$P($G(^OFM(7336.8,$P(ENY52,U,9),0)),U)
. . I ENX="AMBULATORY CARE",$P(ENY52,U,10)<50 S ENS=1,ENMSG="AMBULATORY CARE PERCENTAGE ("_$P(ENY52,U,10)_") inconsistent with BONUS CATEGORY ("_ENX_")." D MSG
;
I "^MA^MI^MM^NR^SL^"[(U_ENPR_U) D ; construction checks
. S ENX=$P($G(^ENG("PROJ",ENDA,24)),U)
. I ENX]"",$P(ENY0,U,7)]"",ENX<$P(ENY0,U,7) S ENS=1,ENMSG="ACTIVATION YEAR ("_ENX_") is before FUNDING YEAR - CONST ("_$P(ENY0,U,7)_")." D MSG
;
I "^LE^"[(U_ENPR_U) D ; lease checks
. I $P(ENY55,U)="" S ENS=1,ENMSG="LEASE TYPE is required." D MSG
. I $P(ENY55,U,5)="" S ENS=1,ENMSG="ESTIMATED ANNUAL RENT COST is required." D MSG
. I $P(ENY55,U,6)="" S ENS=1,ENMSG="PROPOSED LEASE TERM is required." D MSG
. I $P(ENY55,U,7)="" S ENS=1,ENMSG="RENTABLE SQ FT is required." D MSG
. I "^NE^SU^"[(U_$P(ENY55,U)_U) D
. . I $P(ENY55,U,8)="" S ENS=1,ENMSG="EXISTING SPACE ANNUAL RENT is required for LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$P(ENY55,U))_")." D MSG
. . I $P(ENY55,U,9)="" S ENS=1,ENMSG="EXISTING SPACE RENTABLE SQ FT is required for LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$P(ENY55,U))_")." D MSG
. I ENBCI]"" D
. . S ENX=$P($G(^OFM(7336.9,ENBCI,0)),U)
. . I $P(ENY55,U)="EU"!(ENX="ENHANCED USE"),$P(ENY55,U)'="EU"!(ENX'="ENHANCED USE") S ENS=1,ENMSG="LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$P(ENY55,U))_") inconsistent with BUDGET CATEGORY ("_ENX_")." D MSG
. S ENX=$P($G(^ENG("PROJ",ENDA,24)),U)
. I ENX]"",$P(ENY55,U,3)]"",ENX<$P(ENY55,U,3) S ENS=1,ENMSG="ACTIVATION YEAR ("_ENX_") is before FY - RENT STARTS ("_$P(ENY55,U,3)_")." 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
;ENPLV6
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLV6 2316 printed Dec 13, 2024@01:55:12 Page 2
ENPLV6 ;(WASH ISC)/SAB-PROJECT VALIDATION, VALIDATE ONE ENTRY (cont) ;11/27/95
+1 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
+2 ; Project Planning (FYFP, APPL) specific checks
+3 ; check required fields
+4 IF '$PIECE($GET(^ENG("PROJ",ENDA,17,0)),U,4)
SET ENS=1
SET ENMSG="PROJECT DESCRIPTION (SHORT) is required."
DO MSG
+5 IF '$PIECE($GET(^ENG("PROJ",ENDA,26,0)),U,4)
SET ENS=1
SET ENMSG="JUSTIFICATION (SHORT) is required."
DO MSG
+6 ;
+7 ; NRM program checks
IF "^NR^"[(U_ENPR_U)
Begin DoDot:1
+8 IF $PIECE(ENY52,U,9)]""
Begin DoDot:2
+9 SET ENX=$PIECE($GET(^OFM(7336.8,$PIECE(ENY52,U,9),0)),U)
+10 IF ENX="AMBULATORY CARE"
IF $PIECE(ENY52,U,10)<50
SET ENS=1
SET ENMSG="AMBULATORY CARE PERCENTAGE ("_$PIECE(ENY52,U,10)_") inconsistent with BONUS CATEGORY ("_ENX_")."
DO MSG
End DoDot:2
End DoDot:1
+11 ;
+12 ; construction checks
IF "^MA^MI^MM^NR^SL^"[(U_ENPR_U)
Begin DoDot:1
+13 SET ENX=$PIECE($GET(^ENG("PROJ",ENDA,24)),U)
+14 IF ENX]""
IF $PIECE(ENY0,U,7)]""
IF ENX<$PIECE(ENY0,U,7)
SET ENS=1
SET ENMSG="ACTIVATION YEAR ("_ENX_") is before FUNDING YEAR - CONST ("_$PIECE(ENY0,U,7)_")."
DO MSG
End DoDot:1
+15 ;
+16 ; lease checks
IF "^LE^"[(U_ENPR_U)
Begin DoDot:1
+17 IF $PIECE(ENY55,U)=""
SET ENS=1
SET ENMSG="LEASE TYPE is required."
DO MSG
+18 IF $PIECE(ENY55,U,5)=""
SET ENS=1
SET ENMSG="ESTIMATED ANNUAL RENT COST is required."
DO MSG
+19 IF $PIECE(ENY55,U,6)=""
SET ENS=1
SET ENMSG="PROPOSED LEASE TERM is required."
DO MSG
+20 IF $PIECE(ENY55,U,7)=""
SET ENS=1
SET ENMSG="RENTABLE SQ FT is required."
DO MSG
+21 IF "^NE^SU^"[(U_$PIECE(ENY55,U)_U)
Begin DoDot:2
+22 IF $PIECE(ENY55,U,8)=""
SET ENS=1
SET ENMSG="EXISTING SPACE ANNUAL RENT is required for LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$PIECE(ENY55,U))_")."
DO MSG
+23 IF $PIECE(ENY55,U,9)=""
SET ENS=1
SET ENMSG="EXISTING SPACE RENTABLE SQ FT is required for LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$PIECE(ENY55,U))_")."
DO MSG
End DoDot:2
+24 IF ENBCI]""
Begin DoDot:2
+25 SET ENX=$PIECE($GET(^OFM(7336.9,ENBCI,0)),U)
+26 IF $PIECE(ENY55,U)="EU"!(ENX="ENHANCED USE")
IF $PIECE(ENY55,U)'="EU"!(ENX'="ENHANCED USE")
SET ENS=1
SET ENMSG="LEASE TYPE ("_$$EXTERNAL^DILFD(6925,285,"",$PIECE(ENY55,U))_") inconsistent with BUDGET CATEGORY ("_ENX_")."
DO MSG
End DoDot:2
+27 SET ENX=$PIECE($GET(^ENG("PROJ",ENDA,24)),U)
+28 IF ENX]""
IF $PIECE(ENY55,U,3)]""
IF ENX<$PIECE(ENY55,U,3)
SET ENS=1
SET ENMSG="ACTIVATION YEAR ("_ENX_") is before FY - RENT STARTS ("_$PIECE(ENY55,U,3)_")."
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 ;ENPLV6