ENPLX2 ;WISC/SAB-XMIT SEGMENTS FOR FYFP,APPLICATION ;7/7/95
;;7.0;ENGINEERING;**23**;Aug 17, 1993
; Input Variables
; ENDA - ien of project
; ENL - last line written in message text
; ENTY - type of xmit (F,A)
; XMZ - message number
EN ; entry
N ENC,ENFLD,ENI,ENT,ENX,ENY
S ENY0=$G(^ENG("PROJ",ENDA,0)) ; A,C
S ENY5=$G(^ENG("PROJ",ENDA,5)) ; C,D
S ENY15=$G(^ENG("PROJ",ENDA,15)) ; D,E,J,K
S ENY24=$G(^ENG("PROJ",ENDA,24)) ; C,D
S ENY52=$G(^ENG("PROJ",ENDA,52)) ; B,C
A ; seg A
S ENX="A^"_$P(ENY0,U)_U_$P(ENY0,U,3)_U_$$GET1^DIQ(6925,ENDA_",","3:99")
S ENX=ENX_U_$P(ENY0,U,6)_U_$$GET1^DIQ(6925,ENDA_",",6)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
B ; seg B
S ENX="B^"_$P($G(^ENG("PROJ",ENDA,52)),U,6)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.1)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.2)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",176)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.8)
S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,52)),U,10)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
C ; seg C
S ENX="C^"_$P(ENY5,U,7)
S ENX=ENX_U_$P(ENY0,U,7)
S ENX=ENX_U_$P(ENY52,U,3)_U_$P(ENY52,U,4)_U_$P(ENY52,U,5)_U_$P(ENY24,U)
S ENX=ENX_U_$P(ENY24,U,2)_U_$P(ENY24,U,3)_U_$P(ENY24,U,4)
S ENX=ENX_U_$P(ENY24,U,5)_U_$P(ENY24,U,6)_U_$P(ENY24,U,7)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D ; seg D
S ENY19=$G(^ENG("PROJ",ENDA,19))
S ENX="D^"_$P(ENY24,U,8)_U_""
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",212)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",181.1)
S ENX=ENX_U_$S($P(ENY15,U,19)]"":$P(ENY15,U,19)+17000000\1,1:"")
S ENX=ENX_U_$P(ENY5,U,2)
S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,1)),U,1)
S ENX=ENX_U_$P(ENY19,U,10)_U_$P(ENY19,U,11)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY19
E ; seg E
S ENY55=$G(^ENG("PROJ",ENDA,55))
S ENX="E^"_$P(ENY55,U)_U_$P(ENY55,U,2)_U_$P(ENY55,U,3)
S ENX=ENX_U_$P(ENY55,U,4)_U_$P(ENY55,U,5)_U_$P(ENY55,U,6)
S ENX=ENX_U_$P(ENY55,U,7)_U_$P(ENY55,U,8)_U_$P(ENY55,U,9)
S ENX=ENX_U_$P(ENY15,U,3)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY55
F ; seg F (citations)
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,21,ENI)) Q:'ENI
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,21,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENDA,21,ENI,0)) Q:ENY=""
. S ENX="F^"_ENC_U_ENT_U_$P(ENY,U)
. S ENX=ENX_U_$S($P(ENY,U,3)]"":$P(ENY,U,3)+17000000\1,1:"")
. S ENX=ENX_U_$$GET1^DIQ(6925.0164,ENI_","_ENDA_",",3)
. S ENX=ENX_U_$P(ENY,U,5)_U_$P(ENY,U,6)_U_$P(ENY,U,7)_U_$P(ENY,U,8)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
H ; seg H (equipment > $250K)
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,25,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENDA,25,ENI,0)) Q:ENY=""
. S ENX="H^"_ENC_U_ENT_U_$P(ENY,U)_U_$P(ENY,U,2)_U_$P(ENY,U,3)
. S ENX=ENX_U_$P(ENY,U,4)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
I ; seg I (word processing for FYFP)
F ENFLD=192,192.3 D WP
; additinal 5-Yr or Application Segments
I ENTY="F" D BLDG^ENPLX3
I ENTY="A" D EN^ENPLX3
EX ; exit
K ENY0,ENY5,ENY15,ENY24,ENY52
Q
WP ; (word processing field for ENFLD in seg I)
N DIWL,DIWR,DIWF,ENGBL,ENODE
K ^UTILITY($J,"W")
S DIWL=1,DIWR="",DIWF="|C76"
S ENODE=$P($$GET1^DID(6925,ENFLD,"","GLOBAL SUBSCRIPT LOCATION"),";")
S ENGBL="^ENG(""PROJ"",ENDA,ENODE,ENI)"
S ENI=0 F S ENI=$O(@ENGBL) Q:'ENI S X=$G(^(ENI,0)) D:X]"" ^DIWP
S ENT=$G(^UTILITY($J,"W",1))+0
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^UTILITY($J,"W",1,ENI)) Q:'ENI D
. S ENX="I^"_ENFLD_U_ENC_U_ENT_U_$E(^UTILITY($J,"W",1,ENI,0),1,220)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ^UTILITY($J,"W"),X
Q
;ENPLX2
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLX2 3649 printed Nov 22, 2024@17:05:25 Page 2
ENPLX2 ;WISC/SAB-XMIT SEGMENTS FOR FYFP,APPLICATION ;7/7/95
+1 ;;7.0;ENGINEERING;**23**;Aug 17, 1993
+2 ; Input Variables
+3 ; ENDA - ien of project
+4 ; ENL - last line written in message text
+5 ; ENTY - type of xmit (F,A)
+6 ; XMZ - message number
EN ; entry
+1 NEW ENC,ENFLD,ENI,ENT,ENX,ENY
+2 ; A,C
SET ENY0=$GET(^ENG("PROJ",ENDA,0))
+3 ; C,D
SET ENY5=$GET(^ENG("PROJ",ENDA,5))
+4 ; D,E,J,K
SET ENY15=$GET(^ENG("PROJ",ENDA,15))
+5 ; C,D
SET ENY24=$GET(^ENG("PROJ",ENDA,24))
+6 ; B,C
SET ENY52=$GET(^ENG("PROJ",ENDA,52))
A ; seg A
+1 SET ENX="A^"_$PIECE(ENY0,U)_U_$PIECE(ENY0,U,3)_U_$$GET1^DIQ(6925,ENDA_",","3:99")
+2 SET ENX=ENX_U_$PIECE(ENY0,U,6)_U_$$GET1^DIQ(6925,ENDA_",",6)_"^|"
+3 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
B ; seg B
+1 SET ENX="B^"_$PIECE($GET(^ENG("PROJ",ENDA,52)),U,6)
+2 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.1)
+3 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.2)
+4 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",176)
+5 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",158.8)
+6 SET ENX=ENX_U_$PIECE($GET(^ENG("PROJ",ENDA,52)),U,10)_"^|"
+7 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
C ; seg C
+1 SET ENX="C^"_$PIECE(ENY5,U,7)
+2 SET ENX=ENX_U_$PIECE(ENY0,U,7)
+3 SET ENX=ENX_U_$PIECE(ENY52,U,3)_U_$PIECE(ENY52,U,4)_U_$PIECE(ENY52,U,5)_U_$PIECE(ENY24,U)
+4 SET ENX=ENX_U_$PIECE(ENY24,U,2)_U_$PIECE(ENY24,U,3)_U_$PIECE(ENY24,U,4)
+5 SET ENX=ENX_U_$PIECE(ENY24,U,5)_U_$PIECE(ENY24,U,6)_U_$PIECE(ENY24,U,7)_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D ; seg D
+1 SET ENY19=$GET(^ENG("PROJ",ENDA,19))
+2 SET ENX="D^"_$PIECE(ENY24,U,8)_U_""
+3 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",212)
+4 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA_",",181.1)
+5 SET ENX=ENX_U_$SELECT($PIECE(ENY15,U,19)]"":$PIECE(ENY15,U,19)+17000000\1,1:"")
+6 SET ENX=ENX_U_$PIECE(ENY5,U,2)
+7 SET ENX=ENX_U_$PIECE($GET(^ENG("PROJ",ENDA,1)),U,1)
+8 SET ENX=ENX_U_$PIECE(ENY19,U,10)_U_$PIECE(ENY19,U,11)_"^|"
+9 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
+10 KILL ENY19
E ; seg E
+1 SET ENY55=$GET(^ENG("PROJ",ENDA,55))
+2 SET ENX="E^"_$PIECE(ENY55,U)_U_$PIECE(ENY55,U,2)_U_$PIECE(ENY55,U,3)
+3 SET ENX=ENX_U_$PIECE(ENY55,U,4)_U_$PIECE(ENY55,U,5)_U_$PIECE(ENY55,U,6)
+4 SET ENX=ENX_U_$PIECE(ENY55,U,7)_U_$PIECE(ENY55,U,8)_U_$PIECE(ENY55,U,9)
+5 SET ENX=ENX_U_$PIECE(ENY15,U,3)_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
+7 KILL ENY55
F ; seg F (citations)
+1 SET ENI=0
FOR ENT=0:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,21,ENI))
if 'ENI
QUIT
+2 IF ENT
SET ENI=0
FOR ENC=1:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,21,ENI))
if 'ENI
QUIT
Begin DoDot:1
+3 SET ENY=$GET(^ENG("PROJ",ENDA,21,ENI,0))
if ENY=""
QUIT
+4 SET ENX="F^"_ENC_U_ENT_U_$PIECE(ENY,U)
+5 SET ENX=ENX_U_$SELECT($PIECE(ENY,U,3)]"":$PIECE(ENY,U,3)+17000000\1,1:"")
+6 SET ENX=ENX_U_$$GET1^DIQ(6925.0164,ENI_","_ENDA_",",3)
+7 SET ENX=ENX_U_$PIECE(ENY,U,5)_U_$PIECE(ENY,U,6)_U_$PIECE(ENY,U,7)_U_$PIECE(ENY,U,8)_"^|"
+8 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
End DoDot:1
H ; seg H (equipment > $250K)
+1 SET ENI=0
FOR ENT=0:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,25,ENI))
if 'ENI
QUIT
+2 IF ENT
SET ENI=0
FOR ENC=1:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,25,ENI))
if 'ENI
QUIT
Begin DoDot:1
+3 SET ENY=$GET(^ENG("PROJ",ENDA,25,ENI,0))
if ENY=""
QUIT
+4 SET ENX="H^"_ENC_U_ENT_U_$PIECE(ENY,U)_U_$PIECE(ENY,U,2)_U_$PIECE(ENY,U,3)
+5 SET ENX=ENX_U_$PIECE(ENY,U,4)_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
End DoDot:1
I ; seg I (word processing for FYFP)
+1 FOR ENFLD=192,192.3
DO WP
+2 ; additinal 5-Yr or Application Segments
+3 IF ENTY="F"
DO BLDG^ENPLX3
+4 IF ENTY="A"
DO EN^ENPLX3
EX ; exit
+1 KILL ENY0,ENY5,ENY15,ENY24,ENY52
+2 QUIT
WP ; (word processing field for ENFLD in seg I)
+1 NEW DIWL,DIWR,DIWF,ENGBL,ENODE
+2 KILL ^UTILITY($JOB,"W")
+3 SET DIWL=1
SET DIWR=""
SET DIWF="|C76"
+4 SET ENODE=$PIECE($$GET1^DID(6925,ENFLD,"","GLOBAL SUBSCRIPT LOCATION"),";")
+5 SET ENGBL="^ENG(""PROJ"",ENDA,ENODE,ENI)"
+6 SET ENI=0
FOR
SET ENI=$ORDER(@ENGBL)
if 'ENI
QUIT
SET X=$GET(^(ENI,0))
if X]""
DO ^DIWP
+7 SET ENT=$GET(^UTILITY($JOB,"W",1))+0
+8 IF ENT
SET ENI=0
FOR ENC=1:1
SET ENI=$ORDER(^UTILITY($JOB,"W",1,ENI))
if 'ENI
QUIT
Begin DoDot:1
+9 SET ENX="I^"_ENFLD_U_ENC_U_ENT_U_$EXTRACT(^UTILITY($JOB,"W",1,ENI,0),1,220)_"^|"
+10 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
End DoDot:1
+11 KILL ^UTILITY($JOB,"W"),X
+12 QUIT
+13 ;ENPLX2