VistA-WorldVistAEHR/r/ENGINEERING-EN/ENPLX3.m

85 lines
3.5 KiB
Mathematica

ENPLX3 ;WISC/SAB-XMIT SEGMENTS FOR APPLICATION (cont) ;4/28/97
;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
EN ; entry from ENPLX2
I ; (word processing on application)
F ENFLD=192.6,277,278,282 D WP^ENPLX2
J ; seg J
S ENX="J^"_$P(ENY15,U,2)_U_""_U_$$GET1^DIQ(6925,ENDA_",",179)
S ENX=ENX_U_""_U_$P(ENY15,U,6)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",182)_U_$P(ENY15,U,9)
S ENX=ENX_U_""_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ; seg K
S ENY18=$G(^ENG("PROJ",ENDA,18))
S ENX="K^"_$P(ENY15,U,11)_U_$P(ENY15,U,12)_U_$P(ENY15,U,13)
S ENX=ENX_U_$P(ENY15,U,14)_U_""_U_$P(ENY15,U,18)
S ENX=ENX_U_$P(ENY18,U)_U_$$GET1^DIQ(6925,ENDA_",",264)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",265)_U_$P(ENY18,U,4)
S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,52)),U,7)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.7)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY18
L ; seg L
S ENY19=$G(^ENG("PROJ",ENDA,19))
S ENX="L^"_$P(ENY19,U)_U_$P(ENY19,U,2)_U_$P(ENY19,U,3)_U_$P(ENY19,U,4)
S ENX=ENX_U_$P(ENY19,U,5)_U_$P(ENY19,U,6)_U_$P(ENY19,U,7)
S ENX=ENX_U_$P(ENY19,U,8)_U_U_U_U_$P(ENY19,U,12)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY19
M ; seg M (H089 Chapters)
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,22,ENI)) Q:'ENI
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,22,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENDA,22,ENI,0)) Q:ENY=""
. S ENX="M^"_ENC_U_ENT_U_$$GET1^DIQ(6925.03,ENI_","_ENDA_",",.01)
. S ENX=ENX_U_$P(ENY,U,2)_U_$P(ENY,U,3)_U_$P(ENY,U,4)_U_$P(ENY,U,5)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
N ; seg N
F ENFLD=237,238,239,240,241,242,238.5,195.1,196.1,197.1,198.1,199.1,200.1,201.1,202.1,203.1,204.1,205.1,206.1,207.1,208.1 S ENY=$$GET1^DIQ(6925,ENDA_",",ENFLD) S:ENY]"" ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)="N^"_ENFLD_U_ENY_"^|"
O ; seg O (buildings)
D BLDG
P ; seg P (dependent projects)
D DEPEND
Q ; seg Q
S ENY33=$G(^ENG("PROJ",ENDA,33))
S ENX="Q^"_$$GET1^DIQ(6925,ENDA_",",245)
S ENX=ENX_U_$S($P(ENY33,U,3)]"":$P(ENY33,U,3)+17000000\1,1:"")
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",248)
S ENX=ENX_U_$S($P(ENY33,U,6)]"":$P(ENY33,U,6)+17000000\1,1:"")
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY33
R ; seg R
S ENY16=$G(^ENG("PROJ",ENDA,16))
I $P($G(^ENG("PROJ",ENDA,15)),U,12)="Y",ENY16]"" D
. S ENX="R^"_$P(ENY16,U)_U_$P(ENY16,U,2)
. S ENX=ENX_U_$S($P(ENY16,U,3)]"":$P(ENY16,U,3)+17000000\1,1:"")
. S ENX=ENX_U_$P(ENY16,U,5)_U_$P(ENY16,U,6)_U_$P(ENY16,U,7)
. S ENX=ENX_U_$P(ENY16,U,8)_U_$P(ENY16,U,9)_U_$P(ENY16,U,10)
. S ENX=ENX_U_$P(ENY16,U,11)_U_$P(ENY16,U,12)_U_$P(ENY16,U,13)
. S ENX=ENX_U_$P(ENY16,U,14)_U_$P(ENY16,U,15)_U_$P(ENY16,U,16)
. S ENX=ENX_U_$P(ENY16,U,17)_U_$P(ENY16,U,18)_U_$P(ENY16,U,19)
. S ENX=ENX_U_$P(ENY16,U,20)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY16
; end of application segments
Q
BLDG ; seg O (buildings)
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,34,ENI)) Q:'ENI
S ENX=""
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,34,ENI)) Q:'ENI D
. S ENX=ENX_U_$$GET1^DIQ(6925.0177,ENI_","_ENDA_",",.01)
. I '(ENC#10)!(ENC=ENT) D
. . S ENX="O^"_(ENC+9\10)_U_(ENT+9\10)_ENX_$E("^^^^^^^^^^",1,11-$L(ENX,U))
. . S ENX=ENX_"^|"
. . S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
. . S ENX=""
Q
DEPEND ; seg P (dependent projects)
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ","AB",ENDA,ENI)) Q:'ENI
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ","AB",ENDA,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENI,0)) Q:ENY=""
. S ENX="P^"_ENC_U_ENT_U_$P(ENY,U)_U_$P(ENY,U,3)_U_$P(ENY,U,6)
. S ENX=ENX_U_$$GET1^DIQ(6925,ENI_",",6)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
Q
;ENPLX3