source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPLX4.m@ 1501

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

initial load of WorldVistAEHR

File size: 5.2 KB
Line 
1ENPLX4 ;WISC/SAB-XMIT SEGMENTS FOR PROGRESS REPORT ;8/5/97
2 ;;7.0;ENGINEERING;**28**;Aug 17, 1993
3 ; Input Variables
4 ; ENDA - ien of project
5 ; ENL - last line written in message text
6 ; ENTY - type of xmit (R)
7 ; XMZ - message number
8EN ; entry
9 N ENC,ENI,ENMS,ENT,ENX,ENY
10 S ENY0=$G(^ENG("PROJ",ENDA,0)) ; P1,P2
11 S ENY5=$G(^ENG("PROJ",ENDA,5)) ; P2,A1,A2
12 S ENY6=$G(^ENG("PROJ",ENDA,6)) ; A1,A2
13 S ENY51=$G(^ENG("PROJ",ENDA,51)) ; A1,A2,C1
14 S ENY52=$G(^ENG("PROJ",ENDA,52)) ; P1,P2,P3
15P1 ; seg P1
16 S ENX="P1^"_$P(ENY0,U)_U_$$GET1^DIQ(6925,ENDA,3)_U_$P(ENY52,U,6)
17 S ENX=ENX_U_$E($$DC($P(ENY0,U,2)),1,6)_U_$P(ENY0,U,3)_U_$P(ENY0,U,6)
18 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,6)_"^|"
19 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
20P2 ; seg P2
21 S ENX="P2^"_$P(ENY52,U,3)_U_$$GET1^DIQ(6925,ENDA,158.1)_U_$P(ENY52,U,4)
22 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.2)_U_$P(ENY52,U,5)_U_$P(ENY5,U,7)
23 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,7)_U_$P(ENY5,U,2)
24 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,82)_U_$P(ENY0,U,7)
25 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,8)_U_$P($G(^ENG("PROJ",ENDA,1)),U)
26 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,129)
27 S ENX=ENX_U_$P($G(^ENG("PROJ",ENDA,53)),U,4)_"^|"
28 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
29P3 ; seg P3
30 S ENY=$S($P(ENY52,U,6)="VHA":"",1:$G(^DIC(6910,1,0)))
31 S ENX="P3^"_$P(ENY,U,1)_U_$P(ENY,U,2)_U_$$GET1^DIQ(6925,ENDA,.05)
32 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,158.8)
33 S ENX=ENX_U_$P(ENY52,U,7)_U_$$GET1^DIQ(6925,ENDA,158.7)
34 S ENX=ENX_U_$$GET1^DIQ(6925,ENDA,176)_"^|"
35 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
36N1 ; seg N1
37 S ENI=0 F ENT=0:1 S ENI=$O(^ENG("PROJ",ENDA,57,ENI)) Q:'ENI
38 I ENT S ENI=0 F ENC=1:1 S ENI=$O(^ENG("PROJ",ENDA,57,ENI)) Q:'ENI D
39 . S ENY=$G(^ENG("PROJ",ENDA,57,ENI,0)) Q:ENY=""
40 . S ENX="N1^"_ENC_U_ENT_U_$$EXTERNAL^DILFD(6925.0166,.01,"",$P(ENY,U))
41 . S ENX=ENX_U_$P(ENY,U,2)_"^|"
42 . S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
43 ;
44 ; retrieve milestone dates for D* segments
45 D MSD^ENPRUTL(ENDA)
46 ; set n/a milestones blank
47 S ENY=$$MSL^ENPRUTL(ENDA) F ENI=1:1:22 I '$P(ENY,U,ENI) D
48 . S ENMS("P",ENI)="",ENMS("R",ENI)="",ENMS("A",ENI)=""
49 . I $D(ENMS("%",ENI)) S ENMS("%",ENI)=""
50D1 ; seg D1
51 S ENX="D1^"_$$DC(ENMS("P",1))_U_$$DC(ENMS("R",1))_U_$$DC(ENMS("A",1))
52 S ENX=ENX_U_$$DC(ENMS("P",2))_U_$$DC(ENMS("R",2))_U_$$DC(ENMS("A",2))
53 S ENX=ENX_U_ENMS("%",2)_"^|"
54 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
55D2 ; seg D2
56 S ENX="D2^"_$$DC(ENMS("A",3))
57 S ENX=ENX_U_$$DC(ENMS("P",4))_U_$$DC(ENMS("R",4))_U_$$DC(ENMS("A",4))
58 S ENX=ENX_U_$$DC(ENMS("P",5))_U_$$DC(ENMS("R",5))_U_$$DC(ENMS("A",5))
59 S ENX=ENX_U_$$DC(ENMS("P",6))_U_$$DC(ENMS("R",6))_U_$$DC(ENMS("A",6))
60 S ENX=ENX_"^|"
61 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
62D3 ; seg D3
63 S ENX="D3^"_$$DC(ENMS("P",7))_U_$$DC(ENMS("R",7))_U_$$DC(ENMS("A",7))
64 S ENX=ENX_U_$$DC(ENMS("P",8))_U_$$DC(ENMS("R",8))_U_$$DC(ENMS("A",8))
65 S ENX=ENX_U_ENMS("%",8)
66 S ENX=ENX_U_$$DC(ENMS("P",9))_U_$$DC(ENMS("R",9))_U_$$DC(ENMS("A",9))
67 S ENX=ENX_U_$$DC(ENMS("P",10))_U_$$DC(ENMS("R",10))_U_$$DC(ENMS("A",10))
68 S ENX=ENX_U_ENMS("%",10)_"^|"
69 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
70D4 ; seg D4
71 S ENX="D4^"_$$DC(ENMS("P",11))_U_$$DC(ENMS("R",11))_U_$$DC(ENMS("A",11))
72 S ENX=ENX_U_$$DC(ENMS("P",12))_U_$$DC(ENMS("R",12))_U_$$DC(ENMS("A",12))
73 S ENX=ENX_U_ENMS("%",12)
74 S ENX=ENX_U_$$DC(ENMS("P",15))_U_$$DC(ENMS("R",15))_U_$$DC(ENMS("A",15))
75 S ENX=ENX_U_$$DC(ENMS("P",18))_U_$$DC(ENMS("R",18))_U_$$DC(ENMS("A",18))
76 S ENX=ENX_"^|"
77 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
78D5 ; seg D5
79 S ENX="D5^"_$$DC(ENMS("P",19))_U_$$DC(ENMS("R",19))_U_$$DC(ENMS("A",19))
80 S ENX=ENX_U_$$DC(ENMS("P",20))_U_$$DC(ENMS("R",20))_U_$$DC(ENMS("A",20))
81 S ENX=ENX_U_$$DC(ENMS("P",21))_U_$$DC(ENMS("R",21))_U_$$DC(ENMS("A",21))
82 S ENX=ENX_U_ENMS("%",21)
83 S ENX=ENX_U_$$DC(ENMS("P",22))_U_$$DC(ENMS("R",22))_U_$$DC(ENMS("A",22))
84 S ENX=ENX_"^|"
85 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
86D6 ; seg D6
87 S ENX="D6^"_$$DC(ENMS("P",13))_U_$$DC(ENMS("R",13))_U_$$DC(ENMS("A",13))
88 S ENX=ENX_U_$$DC(ENMS("P",14))_U_$$DC(ENMS("R",14))_U_$$DC(ENMS("A",14))
89 S ENX=ENX_U_$$DC(ENMS("P",16))_U_$$DC(ENMS("R",16))_U_$$DC(ENMS("A",16))
90 S ENX=ENX_U_$$DC(ENMS("P",17))_U_$$DC(ENMS("R",17))_U_$$DC(ENMS("A",17))
91 S ENX=ENX_"^|"
92 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
93 K ENMS
94A1 ; seg A1
95 S ENX="A1^"_$P(ENY5,U)_U_$P(ENY5,U,9)_U_$P(ENY51,U,4)_U_$P(ENY6,U)
96 S ENX=ENX_U_$P(ENY6,U,2)_U_$P(ENY6,U,3)_"^|"
97 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
98A2 ; seg A2
99 S ENX="A2^"_$P(ENY51,U,6)_U_$P(ENY5,U,3)_U_$P(ENY51,U,7)_U_$P(ENY5,U,4)
100 S ENX=ENX_U_$P(ENY5,U,10)_U_$P(ENY5,U,6)_U_$P(ENY51,U,8)_U_$P(ENY51,U,9)
101 S ENX=ENX_U_$P(ENY51,U,10)_U_$P(ENY51,U,11)_U_$P(ENY51,U,12)
102 S ENX=ENX_U_$P(ENY5,U,5)_"^|"
103 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
104C1 ; seg C1
105 S ENY8=$G(^ENG("PROJ",ENDA,8)),ENY9=$G(^ENG("PROJ",ENDA,9))
106 S ENY10=$G(^ENG("PROJ",ENDA,10)),ENY53=$G(^ENG("PROJ",ENDA,53))
107 S ENX="C1^"_$P(ENY8,U)_U_$P(ENY8,U,2)_U_$P(ENY51,U,5)_U_$P(ENY9,U)
108 S ENX=ENX_U_$P(ENY9,U,2)_U_$P(ENY9,U,3)_U_$P(ENY53,U)_U_$P(ENY53,U,2)
109 S ENX=ENX_U_$P(ENY10,U)_U_$P(ENY10,U,2)_U_$P(ENY10,U,3)_U_$P(ENY10,U,4)
110 S ENX=ENX_U_$P(ENY53,U,3)_"^|"
111 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
112 K ENY8,ENY9,ENY10,ENY53
113PN ; seg PN
114 S ENX="PN^"_$P($G(^ENG("PROJ",ENDA,13)),U)_"^|"
115 S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENX
116EX ; exit
117 K ENY0,ENY5,ENY6,ENY51,ENY52
118 Q
119DC(ENDT) ; date convert
120 S:ENDT]"" ENDT=ENDT+17000000\1
121 Q ENDT
122 ;ENPLX4
Note: See TracBrowser for help on using the repository browser.