source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPL1.m@ 1432

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1ENPL1 ;(WASH ISC)/LKG,SAB-UTILITY FXS ;6/10/97
2 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
3A ;Create string of Building Nos. from multiple for display
4 N Y S Y=0,X=""
5 F S Y=$O(^ENG("PROJ",D0,34,Y)) Q:Y'?1.N!($L(X)>235) S X=X_$S(X]"":",",1:"")_$P($G(^ENG(6928.3,$P(^ENG("PROJ",D0,34,Y,0),U),0)),U)
6 Q
7V ;Validate format for name
8 X ^%ZOSF("UPPERCASE") S X=Y
9 I $TR(X,"-' .")'?1.U1","1.U K X Q
10 I X[" ,"!(X[", ") K X Q
11 Q
12SH(ENPR) ; executable help for STATUS field
13 ; ENPR - program (internal value)
14 N ENI,ENY0
15 I $G(ENPR)]"" S ENI=0 F S ENI=$O(^ENG(6925.2,"AC",ENI)) Q:'ENI D
16 . S ENY0=$G(^ENG(6925.2,$O(^ENG(6925.2,"AC",ENI,0)),0))
17 . I $P(ENY0,U,5)[ENPR W ?3,$P(ENY0,U),!
18 ;R " Press RETURN to continue",ENI:DTIME
19 Q
20ECS ; File 6925, Field 158.7 Environmental Category - Screen
21 S DIC("S")="I $S('$D(ENDA):1,$P($G(^(0)),U,5)=$P($G(^ENG(""PROJ"",ENDA,52)),U):1,'$P($G(^ENG(""PROJ"",ENDA,52)),U):1,'$O(^ENG(6925.3,""AC"",$P(^ENG(""PROJ"",ENDA,52),U),0)):1,1:0)"
22 Q
23XA ; File 6925, Field 233.1 MI/MM CITATION POINTS computed expression
24 N ENDA,ENF
25 I $D(D0)#10'=1 S X="" G XAE
26 I ",MI,MM,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XAE
27 S ENDA=D0 D A^ENPL3 S X=$P(ENF,U)+$P(ENF,U,2)
28XAE Q
29XB ; File 6925, Field 233.2 MI/MM SPACE POINTS computed expression
30 N ENDA,ENG
31 I $D(D0)#10'=1 S X="" G XBE
32 I ",MI,MM,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XBE
33 S ENDA=D0 D B^ENPL3 S X=ENG+0
34XBE Q
35XC ; File 6925, Field 233.3 MI/MM ENERGY POINTS computed expression
36 N ENDA,ENH
37 I $D(D0)#10'=1 S X="" G XCE
38 I ",MI,MM,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XCE
39 S ENDA=D0 D C^ENPL3 S X=ENH+0
40XCE Q
41XD ; File 6925, Field 233.4 MI/MM CATEGORY POINTS computed expression
42 N ENDA,ENI
43 I $D(D0)#10'=1 S X="" G XDE
44 I ",MI,MM,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XDE
45 D XB I X>0 S X=0 G XDE ; If space points then no points here
46 S ENDA=D0 D D^ENPL3 S X=ENI+0
47XDE Q
48XE ; File 6925, Field 233.5 MI/MM VAMC PRIORITY POINTS computed expression
49 N ENDA,ENJ
50 I $D(D0)#10'=1 S X="" G XEE
51 I ",MI,MM,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XEE
52 S ENDA=D0 D E^ENPL3 S X=ENJ+0
53XEE Q
54XF ; File 6925, Field 262.4 NRM CITATION POINTS computed expression
55 N ENI,ENP,ENY
56 I $D(D0)#10'=1 S X="" G XFE
57 I ",NR,"'[(","_$P($G(^ENG("PROJ",D0,0)),U,6)_",") S X="" G XFE
58 S (ENI,ENP)=0 F S ENI=$O(^ENG("PROJ",D0,21,ENI)) Q:ENI'>0 D
59 . N %Y,X,X1,X2,Y
60 . S ENY=$G(^ENG("PROJ",D0,21,ENI,0))
61 . I '$P(ENY,U,8) Q
62 . ; base 6-yr limit on 1/15 of current year
63 . S X1=$E(DT,1,3)_"0115",X2=$P(ENY,U,3) D ^%DTC I X>2190 Q
64 . S ENP=1
65 . Q
66 S X=$S(ENP:12,1:0)
67XFE Q
68 ;ENPL1
Note: See TracBrowser for help on using the repository browser.