123 lines
5.2 KiB
Mathematica
123 lines
5.2 KiB
Mathematica
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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