source: FOIAVistA/tag/r/ENGINEERING-EN/ENPLS1.m@ 628

Last change on this file since 628 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1ENPLS1 ;(WASH ISC)/SAB-DETERMINE PROJECTS ON FYFP ;5/24/95
2 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
3FYFP(ENSN,ENFY,ENFYB,ENFYE,ENDV,ENRET) ; Five Year Facility Plan Projects
4 ; Selects construction and lease projects which are part of the FYFP
5 ; based on station, funding years, division, and status.
6 ;
7 ; required
8 ; ENSN - station number
9 ; ENFY - current year of FYFP (budget year - 1)
10 ; optional
11 ; ENBYB - beginning offset from current year (default 0)
12 ; ENBYE - ending offset from current year (default F)
13 ; ENDV - division screen or * for all (default *)
14 ; ENRET - contains array code(s) to return (default L)
15 ; L return projects by number
16 ; ^TMP($J,"L")=count^current year of FYFP
17 ; ^TMP($J,"L",number)=ien
18 ; Y return projects in fiscal year format
19 ; ^TMP($J,"Y",fiscal year or "F",program,number)
20 ; =ien^a/e this year^const this year
21 ; E return projects with equipment over $250K
22 ; ^TMP($J,"E",program,fiscal year,number)=ien
23 N ENC,ENDA,ENIDX,ENPN,ENPR,ENPY,ENSTAT,ENSTC,ENSTL,ENX,ENY0,ENYR
24 S:$G(ENFYB)="" ENFYB=0
25 S:$G(ENFYE)="" ENFYE="F"
26 S:$G(ENDV)="" ENDV="*"
27 S:$G(ENRET)="" ENRET="L"
28 I ENRET["L" K ^TMP($J,"L") S ENC=0
29 I ENRET["Y" K ^TMP($J,"Y")
30 I ENRET["E" K ^TMP($J,"E")
31 Q:$G(ENSN)=""
32 Q:$G(ENFY)=""
33 I ENFYB="F",ENFYE'="F" Q
34 I ENFYE'="F",ENFYB>ENFYE Q
35 ; find current and plan year projects
36 I ENFYB'="F" F ENYR=ENFY+ENFYB:1:ENFY+$S(ENFYE="F":5,1:ENFYE) D
37 . S ENPY=ENYR
38 . S ENSTC=$S(ENFY=ENYR:";6;8;9;10;11;12;13;14;15;",ENFY<ENYR:";3;5;6;8;9;10;11;12;",1:"") ; construction status list
39 . S ENSTL=$S(ENFY=ENYR:"",ENFY<ENYR:";3;5;",1:"") ; lease status list
40 . F ENIDX="F","G","L" D FYIDX
41 ; find future year projects
42 I ENFYE="F" S ENPY="F" F ENIDX="F","G","L" D
43 . S ENSTC=";3;5;6;8;9;10;11;12;" ; construction status list
44 . S ENSTL=";3;5;" ; lease status list
45 . S ENYR=ENFY+5
46 . F S ENYR=$O(^ENG("PROJ",ENIDX,ENYR)) Q:ENYR="" D FYIDX
47 I ENRET["L",ENC S ^TMP($J,"L")=ENC_U_ENFY
48 Q
49FYIDX ; Get Projects for a Funding Year A/E or CONST or RENT STARTS
50 S ENDA="" F S ENDA=$O(^ENG("PROJ",ENIDX,ENYR,ENDA)) Q:ENDA="" D
51 . S ENY0=$G(^ENG("PROJ",ENDA,0))
52 . S ENPN=$P(ENY0,U) I ENPN="" Q
53 . S ENPR=$P(ENY0,U,6)
54 . I $P(ENPN,"-")'=ENSN Q
55 . I "FG"[ENIDX,"^MA^MI^MM^NR^"'[(U_ENPR_U) Q
56 . I "L"[ENIDX,"^LE^"'[(U_ENPR_U) Q
57 . I ENDV'="*",ENDV'=$P($G(^ENG("PROJ",ENDA,15)),U) Q
58 . S ENSTAT=$P($G(^ENG("PROJ",ENDA,1)),U,3)
59 . I "^MA^MI^MM^NR^"[(U_ENPR_U),ENSTC'[(";"_ENSTAT_";") Q
60 . I "^LE^"[(U_ENPR_U),ENSTL'[(";"_ENSTAT_";") Q
61 . I ENRET["L",'$D(^TMP($J,"L",ENPN)) S ^TMP($J,"L",ENPN)=ENDA,ENC=ENC+1
62 . I ENRET["Y" D
63 . . S ENX=$G(^TMP($J,"Y",ENPY,ENPR,ENPN))
64 . . S $P(ENX,U)=ENDA
65 . . S:ENIDX="F" $P(ENX,U,2)=1
66 . . S:ENIDX="G" $P(ENX,U,3)=1
67 . . S ^TMP($J,"Y",ENPY,ENPR,ENPN)=ENX
68 . I ENRET["E",ENPY'="F",ENFY'=ENYR,"GL"[ENIDX,$O(^ENG("PROJ",ENDA,25,0)) S ^TMP($J,"E",ENPR,ENPY,ENPN)=ENDA
69 Q
70 ;ENPLS1
Note: See TracBrowser for help on using the repository browser.