ENPROJF ;WISC/SAB-Project Tracking Enter/Edit Form Code ;9/12/97
;;7.0;ENGINEERING;**28**;Aug 17, 1993
Q
BASEPR ;Block ENPRBASE pre-action
; set up variables used by DD screens of fields on block
S ENFT=$$GET^DDSVAL(6925,DA,158)
S ENPR=$$GET^DDSVAL(6925,DA,155)
S ENPCI=$$GET^DDSVAL(6925,DA,158.1)
; check fields for applicability - If N/A then delete & make uneditable
; bonus category n/a?
I "^NR^SL^"'[(U_ENPR_U) D PUT^DDSVAL(6925,DA,158.8,"@"),UNED^DDSUTL("BONUS","","",1)
; epa reportable n/a?
I "NR"'=ENPR D PUT^DDSVAL(6925,DA,158.6,"@"),UNED^DDSUTL("EPAR","","",1)
; epa reporting category n/a?
I $$GET^DDSVAL(6925,DA,158.6)'="Y" D PUT^DDSVAL(6925,DA,158.7,"@"),UNED^DDSUTL("EPAC","","",1)
Q
;
PRPSC ;Block ENPRBASE Field PROGRAM post-action on change
; check fields for applicability - If N/A then delete & make uneditable
; bonus category field?
I "^NR^SL^"[(U_X_U) D UNED^DDSUTL("BONUS","","",0)
I "^NR^SL^"'[(U_X_U) D PUT^DDSVAL(6925,DA,158.8,"@"),UNED^DDSUTL("BONUS","","",1)
; epa reportable field?
I "NR"=X D UNED^DDSUTL("EPAR","","",0)
I "NR"'=X D
. D PUT^DDSVAL(6925,DA,158.6,"@"),UNED^DDSUTL("EPAR","","",1)
. D PUT^DDSVAL(6925,DA,158.7,"@"),UNED^DDSUTL("EPAC","","",1)
; if existing program changed, delete project & budget categories
I DDSOLD]"" D
. N ENTXT
. S ENTXT="Please enter appropriate Project and Budget Categories for the new Program."
. D HLP^DDSUTL(.ENTXT)
Q
;
PCPSC ;Block ENPRBASE Field PROJECT CATEGORY post-action on change
; trigger budget catgory field
I X]"",$G(ENPR)]"",$D(^OFM(7336.8,X,1))#10 D
. N ENBC,ENBCI,ENTXT
. S ENBCI=$P(^OFM(7336.8,X,1),U,$F("MA,MI,MM,NR,",ENPR)\3)
. S ENBCI(0)=$$GET^DDSVAL(6925,DA,158.2)
. Q:ENBCI=ENBCI(0)!'ENBCI
. S ENBC(0)=$$GET^DDSVAL(6925,DA,158.2,"","E")
. D PUT^DDSVAL(6925,DA,158.2,ENBCI,"","I")
. S ENTXT="The Budget Category has automatically been changed to the default value for the new project category."
. I ENBC(0)]"" S ENTXT=ENTXT_" (The previous value was "_ENBC(0)_")."
. D HLP^DDSUTL(.ENTXT)
Q
;
RPNPSC ;Block ENPRCH Field 'Reload Previous Progress Note' postaction on change
D:X
. S ENOTE=$$GET^DDSVAL(6925,DA,146.1)
. I ENOTE']"" D HLP^DDSUTL("Previous Progress Note not found.") Q
. D PUT^DDSVAL(6925,DA,146,ENOTE)
D PUT^DDSVALF("LOADNOTE","","","") ; clear form only field
Q
;
NHPR ;Page pre-action for pages contains blocks ENPRNHCU, ENPRNHCUCONV
; Inform user when this page must be populated
N ENCAT,ENFT,ENPR
S ENFT=$$GET^DDSVAL(6925,DA,158)
S ENCAT="",ENPR=$$GET^DDSVAL(6925,DA,155)
I "^NR^SL^"[(U_ENPR_U) S ENCAT=$$GET^DDSVAL(6925,DA,158.8,"","E")
I "^MA^MI^MM^"[(U_ENPR_U) S ENCAT=$$GET^DDSVAL(6925,DA,158.1,"","E")
I ENFT'="VHA"!(ENCAT'["NHCU") D HLP^DDSUTL("This page is optional since the project category is not NHCU.")
I ENFT="VHA",ENCAT["NHCU" D HLP^DDSUTL("The NHCU data must be entered since the project category is NHCU.")
Q
;
MSL(DA) ; Milestone List Extrinsic Function
; Returns value with pieces (true/false) which indicate applicability
; of the corresponding 22 milestones
N ENAM,ENCM,ENCAF,ENPR,ENX
S ENPR=$$GET^DDSVAL(6925,DA,155) ; program
S ENAM=$$GET^DDSVAL(6925,DA,7,"","E") ; a/e (design) method
S ENCM=$$GET^DDSVAL(6925,DA,8,"","E") ; construction method
S ENCAF=$$GET^DDSVAL(6925,DA,4,"","E") ; construction approved funding
D MSLAP^ENPRUTL
Q ENX
;
;ENPROJF
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPROJF 3430 printed Sep 02, 2024@18:40:39 Page 2
ENPROJF ;WISC/SAB-Project Tracking Enter/Edit Form Code ;9/12/97
+1 ;;7.0;ENGINEERING;**28**;Aug 17, 1993
+2 QUIT
BASEPR ;Block ENPRBASE pre-action
+1 ; set up variables used by DD screens of fields on block
+2 SET ENFT=$$GET^DDSVAL(6925,DA,158)
+3 SET ENPR=$$GET^DDSVAL(6925,DA,155)
+4 SET ENPCI=$$GET^DDSVAL(6925,DA,158.1)
+5 ; check fields for applicability - If N/A then delete & make uneditable
+6 ; bonus category n/a?
+7 IF "^NR^SL^"'[(U_ENPR_U)
DO PUT^DDSVAL(6925,DA,158.8,"@")
DO UNED^DDSUTL("BONUS","","",1)
+8 ; epa reportable n/a?
+9 IF "NR"'=ENPR
DO PUT^DDSVAL(6925,DA,158.6,"@")
DO UNED^DDSUTL("EPAR","","",1)
+10 ; epa reporting category n/a?
+11 IF $$GET^DDSVAL(6925,DA,158.6)'="Y"
DO PUT^DDSVAL(6925,DA,158.7,"@")
DO UNED^DDSUTL("EPAC","","",1)
+12 QUIT
+13 ;
PRPSC ;Block ENPRBASE Field PROGRAM post-action on change
+1 ; check fields for applicability - If N/A then delete & make uneditable
+2 ; bonus category field?
+3 IF "^NR^SL^"[(U_X_U)
DO UNED^DDSUTL("BONUS","","",0)
+4 IF "^NR^SL^"'[(U_X_U)
DO PUT^DDSVAL(6925,DA,158.8,"@")
DO UNED^DDSUTL("BONUS","","",1)
+5 ; epa reportable field?
+6 IF "NR"=X
DO UNED^DDSUTL("EPAR","","",0)
+7 IF "NR"'=X
Begin DoDot:1
+8 DO PUT^DDSVAL(6925,DA,158.6,"@")
DO UNED^DDSUTL("EPAR","","",1)
+9 DO PUT^DDSVAL(6925,DA,158.7,"@")
DO UNED^DDSUTL("EPAC","","",1)
End DoDot:1
+10 ; if existing program changed, delete project & budget categories
+11 IF DDSOLD]""
Begin DoDot:1
+12 NEW ENTXT
+13 SET ENTXT="Please enter appropriate Project and Budget Categories for the new Program."
+14 DO HLP^DDSUTL(.ENTXT)
End DoDot:1
+15 QUIT
+16 ;
PCPSC ;Block ENPRBASE Field PROJECT CATEGORY post-action on change
+1 ; trigger budget catgory field
+2 IF X]""
IF $GET(ENPR)]""
IF $DATA(^OFM(7336.8,X,1))#10
Begin DoDot:1
+3 NEW ENBC,ENBCI,ENTXT
+4 SET ENBCI=$PIECE(^OFM(7336.8,X,1),U,$FIND("MA,MI,MM,NR,",ENPR)\3)
+5 SET ENBCI(0)=$$GET^DDSVAL(6925,DA,158.2)
+6 if ENBCI=ENBCI(0)!'ENBCI
QUIT
+7 SET ENBC(0)=$$GET^DDSVAL(6925,DA,158.2,"","E")
+8 DO PUT^DDSVAL(6925,DA,158.2,ENBCI,"","I")
+9 SET ENTXT="The Budget Category has automatically been changed to the default value for the new project category."
+10 IF ENBC(0)]""
SET ENTXT=ENTXT_" (The previous value was "_ENBC(0)_")."
+11 DO HLP^DDSUTL(.ENTXT)
End DoDot:1
+12 QUIT
+13 ;
RPNPSC ;Block ENPRCH Field 'Reload Previous Progress Note' postaction on change
+1 if X
Begin DoDot:1
+2 SET ENOTE=$$GET^DDSVAL(6925,DA,146.1)
+3 IF ENOTE']""
DO HLP^DDSUTL("Previous Progress Note not found.")
QUIT
+4 DO PUT^DDSVAL(6925,DA,146,ENOTE)
End DoDot:1
+5 ; clear form only field
DO PUT^DDSVALF("LOADNOTE","","","")
+6 QUIT
+7 ;
NHPR ;Page pre-action for pages contains blocks ENPRNHCU, ENPRNHCUCONV
+1 ; Inform user when this page must be populated
+2 NEW ENCAT,ENFT,ENPR
+3 SET ENFT=$$GET^DDSVAL(6925,DA,158)
+4 SET ENCAT=""
SET ENPR=$$GET^DDSVAL(6925,DA,155)
+5 IF "^NR^SL^"[(U_ENPR_U)
SET ENCAT=$$GET^DDSVAL(6925,DA,158.8,"","E")
+6 IF "^MA^MI^MM^"[(U_ENPR_U)
SET ENCAT=$$GET^DDSVAL(6925,DA,158.1,"","E")
+7 IF ENFT'="VHA"!(ENCAT'["NHCU")
DO HLP^DDSUTL("This page is optional since the project category is not NHCU.")
+8 IF ENFT="VHA"
IF ENCAT["NHCU"
DO HLP^DDSUTL("The NHCU data must be entered since the project category is NHCU.")
+9 QUIT
+10 ;
MSL(DA) ; Milestone List Extrinsic Function
+1 ; Returns value with pieces (true/false) which indicate applicability
+2 ; of the corresponding 22 milestones
+3 NEW ENAM,ENCM,ENCAF,ENPR,ENX
+4 ; program
SET ENPR=$$GET^DDSVAL(6925,DA,155)
+5 ; a/e (design) method
SET ENAM=$$GET^DDSVAL(6925,DA,7,"","E")
+6 ; construction method
SET ENCM=$$GET^DDSVAL(6925,DA,8,"","E")
+7 ; construction approved funding
SET ENCAF=$$GET^DDSVAL(6925,DA,4,"","E")
+8 DO MSLAP^ENPRUTL
+9 QUIT ENX
+10 ;
+11 ;ENPROJF