ENPLX4 ;WISC/SAB-XMIT SEGMENTS FOR PROGRESS REPORT ;8/5/97
;;7.0;ENGINEERING;**28**;Aug 17, 1993
; Input Variables
; ENDA - ien of project
; ENL - last line written in message text
; ENTY - type of xmit (R)
; XMZ - message number
EN ; entry
N ENC,ENI,ENMS,ENT,ENX,ENY
S ENY0=$G(^ENG("PROJ",ENDA,0)) ; P1,P2
S ENY5=$G(^ENG("PROJ",ENDA,5)) ; P2,A1,A2
S ENY6=$G(^ENG("PROJ",ENDA,6)) ; A1,A2
S ENY51=$G(^ENG("PROJ",ENDA,51)) ; A1,A2,C1
S ENY52=$G(^ENG("PROJ",ENDA,52)) ; P1,P2,P3
P1 ; seg P1
S ENX="P1^"_$P(ENY0,U)_U_$$GET1^DIQ(6925,ENDA,3)_U_$P(ENY52,U,6)
S ENX=ENX_U_$E($$DC($P(ENY0,U,2)),1,6)_U_$P(ENY0,U,3)_U_$P(ENY0,U,6)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,6)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
P2 ; seg P2
S ENX="P2^"_$P(ENY52,U,3)_U_$$GET1^DIQ(6925,ENDA,158.1)_U_$P(ENY52,U,4)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.2)_U_$P(ENY52,U,5)_U_$P(ENY5,U,7)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,7)_U_$P(ENY5,U,2)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,82)_U_$P(ENY0,U,7)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,8)_U_$P($G(^ENG("PROJ",ENDA,1)),U)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,129)
S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,53)),U,4)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
P3 ; seg P3
S ENY=$S($P(ENY52,U,6)="VHA":"",1:$G(^DIC(6910,1,0)))
S ENX="P3^"_$P(ENY,U,1)_U_$P(ENY,U,2)_U_$$GET1^DIQ(6925,ENDA,.05)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.8)
S ENX=ENX_U_$P(ENY52,U,7)_U_$$GET1^DIQ(6925,ENDA,158.7)
S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,176)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
N1 ; seg N1
S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,57,ENI)) Q:'ENI
I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,57,ENI)) Q:'ENI D
. S ENY=$G(^ENG("PROJ",ENDA,57,ENI,0)) Q:ENY=""
. S ENX="N1^"_ENC_U_ENT_U_$$EXTERNAL^DILFD(6925.0166,.01,"",$P(ENY,U))
. S ENX=ENX_U_$P(ENY,U,2)_"^|"
. S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
;
; retrieve milestone dates for D* segments
D MSD^ENPRUTL(ENDA)
; set n/a milestones blank
S ENY=$$MSL^ENPRUTL(ENDA) F ENI=1:1:22 I '$P(ENY,U,ENI) D
. S ENMS("P",ENI)="",ENMS("R",ENI)="",ENMS("A",ENI)=""
. I $D(ENMS("%",ENI)) S ENMS("%",ENI)=""
D1 ; seg D1
S ENX="D1^"_$$DC(ENMS("P",1))_U_$$DC(ENMS("R",1))_U_$$DC(ENMS("A",1))
S ENX=ENX_U_$$DC(ENMS("P",2))_U_$$DC(ENMS("R",2))_U_$$DC(ENMS("A",2))
S ENX=ENX_U_ENMS("%",2)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D2 ; seg D2
S ENX="D2^"_$$DC(ENMS("A",3))
S ENX=ENX_U_$$DC(ENMS("P",4))_U_$$DC(ENMS("R",4))_U_$$DC(ENMS("A",4))
S ENX=ENX_U_$$DC(ENMS("P",5))_U_$$DC(ENMS("R",5))_U_$$DC(ENMS("A",5))
S ENX=ENX_U_$$DC(ENMS("P",6))_U_$$DC(ENMS("R",6))_U_$$DC(ENMS("A",6))
S ENX=ENX_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D3 ; seg D3
S ENX="D3^"_$$DC(ENMS("P",7))_U_$$DC(ENMS("R",7))_U_$$DC(ENMS("A",7))
S ENX=ENX_U_$$DC(ENMS("P",8))_U_$$DC(ENMS("R",8))_U_$$DC(ENMS("A",8))
S ENX=ENX_U_ENMS("%",8)
S ENX=ENX_U_$$DC(ENMS("P",9))_U_$$DC(ENMS("R",9))_U_$$DC(ENMS("A",9))
S ENX=ENX_U_$$DC(ENMS("P",10))_U_$$DC(ENMS("R",10))_U_$$DC(ENMS("A",10))
S ENX=ENX_U_ENMS("%",10)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D4 ; seg D4
S ENX="D4^"_$$DC(ENMS("P",11))_U_$$DC(ENMS("R",11))_U_$$DC(ENMS("A",11))
S ENX=ENX_U_$$DC(ENMS("P",12))_U_$$DC(ENMS("R",12))_U_$$DC(ENMS("A",12))
S ENX=ENX_U_ENMS("%",12)
S ENX=ENX_U_$$DC(ENMS("P",15))_U_$$DC(ENMS("R",15))_U_$$DC(ENMS("A",15))
S ENX=ENX_U_$$DC(ENMS("P",18))_U_$$DC(ENMS("R",18))_U_$$DC(ENMS("A",18))
S ENX=ENX_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D5 ; seg D5
S ENX="D5^"_$$DC(ENMS("P",19))_U_$$DC(ENMS("R",19))_U_$$DC(ENMS("A",19))
S ENX=ENX_U_$$DC(ENMS("P",20))_U_$$DC(ENMS("R",20))_U_$$DC(ENMS("A",20))
S ENX=ENX_U_$$DC(ENMS("P",21))_U_$$DC(ENMS("R",21))_U_$$DC(ENMS("A",21))
S ENX=ENX_U_ENMS("%",21)
S ENX=ENX_U_$$DC(ENMS("P",22))_U_$$DC(ENMS("R",22))_U_$$DC(ENMS("A",22))
S ENX=ENX_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
D6 ; seg D6
S ENX="D6^"_$$DC(ENMS("P",13))_U_$$DC(ENMS("R",13))_U_$$DC(ENMS("A",13))
S ENX=ENX_U_$$DC(ENMS("P",14))_U_$$DC(ENMS("R",14))_U_$$DC(ENMS("A",14))
S ENX=ENX_U_$$DC(ENMS("P",16))_U_$$DC(ENMS("R",16))_U_$$DC(ENMS("A",16))
S ENX=ENX_U_$$DC(ENMS("P",17))_U_$$DC(ENMS("R",17))_U_$$DC(ENMS("A",17))
S ENX=ENX_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENMS
A1 ; seg A1
S ENX="A1^"_$P(ENY5,U)_U_$P(ENY5,U,9)_U_$P(ENY51,U,4)_U_$P(ENY6,U)
S ENX=ENX_U_$P(ENY6,U,2)_U_$P(ENY6,U,3)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
A2 ; seg A2
S ENX="A2^"_$P(ENY51,U,6)_U_$P(ENY5,U,3)_U_$P(ENY51,U,7)_U_$P(ENY5,U,4)
S ENX=ENX_U_$P(ENY5,U,10)_U_$P(ENY5,U,6)_U_$P(ENY51,U,8)_U_$P(ENY51,U,9)
S ENX=ENX_U_$P(ENY51,U,10)_U_$P(ENY51,U,11)_U_$P(ENY51,U,12)
S ENX=ENX_U_$P(ENY5,U,5)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
C1 ; seg C1
S ENY8=$G(^ENG("PROJ",ENDA,8)),ENY9=$G(^ENG("PROJ",ENDA,9))
S ENY10=$G(^ENG("PROJ",ENDA,10)),ENY53=$G(^ENG("PROJ",ENDA,53))
S ENX="C1^"_$P(ENY8,U)_U_$P(ENY8,U,2)_U_$P(ENY51,U,5)_U_$P(ENY9,U)
S ENX=ENX_U_$P(ENY9,U,2)_U_$P(ENY9,U,3)_U_$P(ENY53,U)_U_$P(ENY53,U,2)
S ENX=ENX_U_$P(ENY10,U)_U_$P(ENY10,U,2)_U_$P(ENY10,U,3)_U_$P(ENY10,U,4)
S ENX=ENX_U_$P(ENY53,U,3)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
K ENY8,ENY9,ENY10,ENY53
PN ; seg PN
S ENX="PN^"_$P($G(^ENG("PROJ",ENDA,13)),U)_"^|"
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
EX ; exit
K ENY0,ENY5,ENY6,ENY51,ENY52
Q
DC(ENDT) ; date convert
S:ENDT]"" ENDT=ENDT+17000000\1
Q ENDT
;ENPLX4
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLX4 5409 printed Dec 13, 2024@01:55:18 Page 2
ENPLX4 ;WISC/SAB-XMIT SEGMENTS FOR PROGRESS REPORT ;8/5/97
+1 ;;7.0;ENGINEERING;**28**;Aug 17, 1993
+2 ; Input Variables
+3 ; ENDA - ien of project
+4 ; ENL - last line written in message text
+5 ; ENTY - type of xmit (R)
+6 ; XMZ - message number
EN ; entry
+1 NEW ENC,ENI,ENMS,ENT,ENX,ENY
+2 ; P1,P2
SET ENY0=$GET(^ENG("PROJ",ENDA,0))
+3 ; P2,A1,A2
SET ENY5=$GET(^ENG("PROJ",ENDA,5))
+4 ; A1,A2
SET ENY6=$GET(^ENG("PROJ",ENDA,6))
+5 ; A1,A2,C1
SET ENY51=$GET(^ENG("PROJ",ENDA,51))
+6 ; P1,P2,P3
SET ENY52=$GET(^ENG("PROJ",ENDA,52))
P1 ; seg P1
+1 SET ENX="P1^"_$PIECE(ENY0,U)_U_$$GET1^DIQ(6925,ENDA,3)_U_$PIECE(ENY52,U,6)
+2 SET ENX=ENX_U_$EXTRACT($$DC($PIECE(ENY0,U,2)),1,6)_U_$PIECE(ENY0,U,3)_U_$PIECE(ENY0,U,6)
+3 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,6)_"^|"
+4 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
P2 ; seg P2
+1 SET ENX="P2^"_$PIECE(ENY52,U,3)_U_$$GET1^DIQ(6925,ENDA,158.1)_U_$PIECE(ENY52,U,4)
+2 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.2)_U_$PIECE(ENY52,U,5)_U_$PIECE(ENY5,U,7)
+3 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,7)_U_$PIECE(ENY5,U,2)
+4 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,82)_U_$PIECE(ENY0,U,7)
+5 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,8)_U_$PIECE($GET(^ENG("PROJ",ENDA,1)),U)
+6 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,129)
+7 SET ENX=ENX_U_$PIECE($GET(^ENG("PROJ",ENDA,53)),U,4)_"^|"
+8 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
P3 ; seg P3
+1 SET ENY=$SELECT($PIECE(ENY52,U,6)="VHA":"",1:$GET(^DIC(6910,1,0)))
+2 SET ENX="P3^"_$PIECE(ENY,U,1)_U_$PIECE(ENY,U,2)_U_$$GET1^DIQ(6925,ENDA,.05)
+3 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.8)
+4 SET ENX=ENX_U_$PIECE(ENY52,U,7)_U_$$GET1^DIQ(6925,ENDA,158.7)
+5 SET ENX=ENX_U_$$GET1^DIQ(6925,ENDA,176)_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
N1 ; seg N1
+1 SET ENI=0
FOR ENT=0:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,57,ENI))
if 'ENI
QUIT
+2 IF ENT
SET ENI=0
FOR ENC=1:1
SET ENI=$ORDER(^ENG("PROJ",ENDA,57,ENI))
if 'ENI
QUIT
Begin DoDot:1
+3 SET ENY=$GET(^ENG("PROJ",ENDA,57,ENI,0))
if ENY=""
QUIT
+4 SET ENX="N1^"_ENC_U_ENT_U_$$EXTERNAL^DILFD(6925.0166,.01,"",$PIECE(ENY,U))
+5 SET ENX=ENX_U_$PIECE(ENY,U,2)_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
End DoDot:1
+7 ;
+8 ; retrieve milestone dates for D* segments
+9 DO MSD^ENPRUTL(ENDA)
+10 ; set n/a milestones blank
+11 SET ENY=$$MSL^ENPRUTL(ENDA)
FOR ENI=1:1:22
IF '$PIECE(ENY,U,ENI)
Begin DoDot:1
+12 SET ENMS("P",ENI)=""
SET ENMS("R",ENI)=""
SET ENMS("A",ENI)=""
+13 IF $DATA(ENMS("%",ENI))
SET ENMS("%",ENI)=""
End DoDot:1
D1 ; seg D1
+1 SET ENX="D1^"_$$DC(ENMS("P",1))_U_$$DC(ENMS("R",1))_U_$$DC(ENMS("A",1))
+2 SET ENX=ENX_U_$$DC(ENMS("P",2))_U_$$DC(ENMS("R",2))_U_$$DC(ENMS("A",2))
+3 SET ENX=ENX_U_ENMS("%",2)_"^|"
+4 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D2 ; seg D2
+1 SET ENX="D2^"_$$DC(ENMS("A",3))
+2 SET ENX=ENX_U_$$DC(ENMS("P",4))_U_$$DC(ENMS("R",4))_U_$$DC(ENMS("A",4))
+3 SET ENX=ENX_U_$$DC(ENMS("P",5))_U_$$DC(ENMS("R",5))_U_$$DC(ENMS("A",5))
+4 SET ENX=ENX_U_$$DC(ENMS("P",6))_U_$$DC(ENMS("R",6))_U_$$DC(ENMS("A",6))
+5 SET ENX=ENX_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D3 ; seg D3
+1 SET ENX="D3^"_$$DC(ENMS("P",7))_U_$$DC(ENMS("R",7))_U_$$DC(ENMS("A",7))
+2 SET ENX=ENX_U_$$DC(ENMS("P",8))_U_$$DC(ENMS("R",8))_U_$$DC(ENMS("A",8))
+3 SET ENX=ENX_U_ENMS("%",8)
+4 SET ENX=ENX_U_$$DC(ENMS("P",9))_U_$$DC(ENMS("R",9))_U_$$DC(ENMS("A",9))
+5 SET ENX=ENX_U_$$DC(ENMS("P",10))_U_$$DC(ENMS("R",10))_U_$$DC(ENMS("A",10))
+6 SET ENX=ENX_U_ENMS("%",10)_"^|"
+7 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D4 ; seg D4
+1 SET ENX="D4^"_$$DC(ENMS("P",11))_U_$$DC(ENMS("R",11))_U_$$DC(ENMS("A",11))
+2 SET ENX=ENX_U_$$DC(ENMS("P",12))_U_$$DC(ENMS("R",12))_U_$$DC(ENMS("A",12))
+3 SET ENX=ENX_U_ENMS("%",12)
+4 SET ENX=ENX_U_$$DC(ENMS("P",15))_U_$$DC(ENMS("R",15))_U_$$DC(ENMS("A",15))
+5 SET ENX=ENX_U_$$DC(ENMS("P",18))_U_$$DC(ENMS("R",18))_U_$$DC(ENMS("A",18))
+6 SET ENX=ENX_"^|"
+7 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D5 ; seg D5
+1 SET ENX="D5^"_$$DC(ENMS("P",19))_U_$$DC(ENMS("R",19))_U_$$DC(ENMS("A",19))
+2 SET ENX=ENX_U_$$DC(ENMS("P",20))_U_$$DC(ENMS("R",20))_U_$$DC(ENMS("A",20))
+3 SET ENX=ENX_U_$$DC(ENMS("P",21))_U_$$DC(ENMS("R",21))_U_$$DC(ENMS("A",21))
+4 SET ENX=ENX_U_ENMS("%",21)
+5 SET ENX=ENX_U_$$DC(ENMS("P",22))_U_$$DC(ENMS("R",22))_U_$$DC(ENMS("A",22))
+6 SET ENX=ENX_"^|"
+7 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
D6 ; seg D6
+1 SET ENX="D6^"_$$DC(ENMS("P",13))_U_$$DC(ENMS("R",13))_U_$$DC(ENMS("A",13))
+2 SET ENX=ENX_U_$$DC(ENMS("P",14))_U_$$DC(ENMS("R",14))_U_$$DC(ENMS("A",14))
+3 SET ENX=ENX_U_$$DC(ENMS("P",16))_U_$$DC(ENMS("R",16))_U_$$DC(ENMS("A",16))
+4 SET ENX=ENX_U_$$DC(ENMS("P",17))_U_$$DC(ENMS("R",17))_U_$$DC(ENMS("A",17))
+5 SET ENX=ENX_"^|"
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
+7 KILL ENMS
A1 ; seg A1
+1 SET ENX="A1^"_$PIECE(ENY5,U)_U_$PIECE(ENY5,U,9)_U_$PIECE(ENY51,U,4)_U_$PIECE(ENY6,U)
+2 SET ENX=ENX_U_$PIECE(ENY6,U,2)_U_$PIECE(ENY6,U,3)_"^|"
+3 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
A2 ; seg A2
+1 SET ENX="A2^"_$PIECE(ENY51,U,6)_U_$PIECE(ENY5,U,3)_U_$PIECE(ENY51,U,7)_U_$PIECE(ENY5,U,4)
+2 SET ENX=ENX_U_$PIECE(ENY5,U,10)_U_$PIECE(ENY5,U,6)_U_$PIECE(ENY51,U,8)_U_$PIECE(ENY51,U,9)
+3 SET ENX=ENX_U_$PIECE(ENY51,U,10)_U_$PIECE(ENY51,U,11)_U_$PIECE(ENY51,U,12)
+4 SET ENX=ENX_U_$PIECE(ENY5,U,5)_"^|"
+5 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
C1 ; seg C1
+1 SET ENY8=$GET(^ENG("PROJ",ENDA,8))
SET ENY9=$GET(^ENG("PROJ",ENDA,9))
+2 SET ENY10=$GET(^ENG("PROJ",ENDA,10))
SET ENY53=$GET(^ENG("PROJ",ENDA,53))
+3 SET ENX="C1^"_$PIECE(ENY8,U)_U_$PIECE(ENY8,U,2)_U_$PIECE(ENY51,U,5)_U_$PIECE(ENY9,U)
+4 SET ENX=ENX_U_$PIECE(ENY9,U,2)_U_$PIECE(ENY9,U,3)_U_$PIECE(ENY53,U)_U_$PIECE(ENY53,U,2)
+5 SET ENX=ENX_U_$PIECE(ENY10,U)_U_$PIECE(ENY10,U,2)_U_$PIECE(ENY10,U,3)_U_$PIECE(ENY10,U,4)
+6 SET ENX=ENX_U_$PIECE(ENY53,U,3)_"^|"
+7 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
+8 KILL ENY8,ENY9,ENY10,ENY53
PN ; seg PN
+1 SET ENX="PN^"_$PIECE($GET(^ENG("PROJ",ENDA,13)),U)_"^|"
+2 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENX
EX ; exit
+1 KILL ENY0,ENY5,ENY6,ENY51,ENY52
+2 QUIT
DC(ENDT) ; date convert
+1 if ENDT]""
SET ENDT=ENDT+17000000\1
+2 QUIT ENDT
+3 ;ENPLX4