source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPLX2.m@ 862

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

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1ENPLX2 ;WISC/SAB-XMIT SEGMENTS FOR FYFP,APPLICATION ;7/7/95
2 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
3 ; Input Variables
4 ; ENDA - ien of project
5 ; ENL - last line written in message text
6 ; ENTY - type of xmit (F,A)
7 ; XMZ - message number
8EN ; entry
9 N ENC,ENFLD,ENI,ENT,ENX,ENY
10 S ENY0=$G(^ENG("PROJ",ENDA,0)) ; A,C
11 S ENY5=$G(^ENG("PROJ",ENDA,5)) ; C,D
12 S ENY15=$G(^ENG("PROJ",ENDA,15)) ; D,E,J,K
13 S ENY24=$G(^ENG("PROJ",ENDA,24)) ; C,D
14 S ENY52=$G(^ENG("PROJ",ENDA,52)) ; B,C
15A ; seg A
16 S ENX="A^"_$P(ENY0,U)_U_$P(ENY0,U,3)_U_$$GET1^DIQ(6925,ENDA_",","3:99")
17 S ENX=ENX_U_$P(ENY0,U,6)_U_$$GET1^DIQ(6925,ENDA_",",6)_"^|"
18 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
19B ; seg B
20 S ENX="B^"_$P($G(^ENG("PROJ",ENDA,52)),U,6)
21 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.1)
22 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.2)
23 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",176)
24 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.8)
25 S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,52)),U,10)_"^|"
26 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
27C ; seg C
28 S ENX="C^"_$P(ENY5,U,7)
29 S ENX=ENX_U_$P(ENY0,U,7)
30 S ENX=ENX_U_$P(ENY52,U,3)_U_$P(ENY52,U,4)_U_$P(ENY52,U,5)_U_$P(ENY24,U)
31 S ENX=ENX_U_$P(ENY24,U,2)_U_$P(ENY24,U,3)_U_$P(ENY24,U,4)
32 S ENX=ENX_U_$P(ENY24,U,5)_U_$P(ENY24,U,6)_U_$P(ENY24,U,7)_"^|"
33 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
34D ; seg D
35 S ENY19=$G(^ENG("PROJ",ENDA,19))
36 S ENX="D^"_$P(ENY24,U,8)_U_""
37 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",212)
38 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",181.1)
39 S ENX=ENX_U_$S($P(ENY15,U,19)]"":$P(ENY15,U,19)+17000000\1,1:"")
40 S ENX=ENX_U_$P(ENY5,U,2)
41 S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,1)),U,1)
42 S ENX=ENX_U_$P(ENY19,U,10)_U_$P(ENY19,U,11)_"^|"
43 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
44 K ENY19
45E ; seg E
46 S ENY55=$G(^ENG("PROJ",ENDA,55))
47 S ENX="E^"_$P(ENY55,U)_U_$P(ENY55,U,2)_U_$P(ENY55,U,3)
48 S ENX=ENX_U_$P(ENY55,U,4)_U_$P(ENY55,U,5)_U_$P(ENY55,U,6)
49 S ENX=ENX_U_$P(ENY55,U,7)_U_$P(ENY55,U,8)_U_$P(ENY55,U,9)
50 S ENX=ENX_U_$P(ENY15,U,3)_"^|"
51 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
52 K ENY55
53F ; seg F (citations)
54 S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,21,ENI)) Q:'ENI
55 I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,21,ENI)) Q:'ENI D
56 . S ENY=$G(^ENG("PROJ",ENDA,21,ENI,0)) Q:ENY=""
57 . S ENX="F^"_ENC_U_ENT_U_$P(ENY,U)
58 . S ENX=ENX_U_$S($P(ENY,U,3)]"":$P(ENY,U,3)+17000000\1,1:"")
59 . S ENX=ENX_U_$$GET1^DIQ(6925.0164,ENI_","_ENDA_",",3)
60 . S ENX=ENX_U_$P(ENY,U,5)_U_$P(ENY,U,6)_U_$P(ENY,U,7)_U_$P(ENY,U,8)_"^|"
61 . S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
62H ; seg H (equipment > $250K)
63 S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI
64 I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI D
65 . S ENY=$G(^ENG("PROJ",ENDA,25,ENI,0)) Q:ENY=""
66 . S ENX="H^"_ENC_U_ENT_U_$P(ENY,U)_U_$P(ENY,U,2)_U_$P(ENY,U,3)
67 . S ENX=ENX_U_$P(ENY,U,4)_"^|"
68 . S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
69I ; seg I (word processing for FYFP)
70 F ENFLD=192,192.3 D WP
71 ; additinal 5-Yr or Application Segments
72 I ENTY="F" D BLDG^ENPLX3
73 I ENTY="A" D EN^ENPLX3
74EX ; exit
75 K ENY0,ENY5,ENY15,ENY24,ENY52
76 Q
77WP ; (word processing field for ENFLD in seg I)
78 N DIWL,DIWR,DIWF,ENGBL,ENODE
79 K ^UTILITY($J,"W")
80 S DIWL=1,DIWR="",DIWF="|C76"
81 S ENODE=$P($$GET1^DID(6925,ENFLD,"","GLOBAL SUBSCRIPT LOCATION"),";")
82 S ENGBL="^ENG(""PROJ"",ENDA,ENODE,ENI)"
83 S ENI=0 F S ENI=$O(@ENGBL) Q:'ENI S X=$G(^(ENI,0)) D:X]"" ^DIWP
84 S ENT=$G(^UTILITY($J,"W",1))+0
85 I ENT S ENI=0 F ENC=1:1 S ENI=$O(^UTILITY($J,"W",1,ENI)) Q:'ENI D
86 . S ENX="I^"_ENFLD_U_ENC_U_ENT_U_$E(^UTILITY($J,"W",1,ENI,0),1,220)_"^|"
87 . S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
88 K ^UTILITY($J,"W"),X
89 Q
90 ;ENPLX2
Note: See TracBrowser for help on using the repository browser.