source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSJXR23.m@ 1436

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

initial load of WorldVistAEHR

File size: 7.5 KB
Line 
1PSSJXR23 ; COMPILED XREF FOR FILE #55.06 ; 01/17/08
2 ;
3 S DA=0
4A1 ;
5 I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1
60 ;
7A S DA=$O(^PS(55,DA(1),5,DA)) I DA'>0 S DA=0 G END
81 ;
9 S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
10 S X=$P(DIKZ(0),U,1)
11 I X'="" I '$D(DIU(0)) D:$D(PSGAL(1))#2 KILL^PSGAL5:PSGAL(1)=X K PSGAL
12 S X=$P(DIKZ(0),U,1)
13 I X'="" S ^PS(55,DA(1),5,"B",$E(X,1,30),DA)=""
14 S X=$P(DIKZ(0),U,1)
15 I X'="" I '$D(DIU(0)) S ^PS(55,"AUE",DA(1),DA)=""
16 S X=$P(DIKZ(0),U,18)
17 I X'="" I '$D(DIU(0)) D:$D(PSGAL(55)) KILL^PSGAL5:PSGAL(55)=X K PSGAL
18 S X=$P(DIKZ(0),U,15)
19 I X'="" I '$D(DIU(0)) D:$D(PSGAL(2))#2 KILL^PSGAL5:PSGAL(2)=X K PSGAL
20 S X=$P(DIKZ(0),U,2)
21 I X'="" I '$D(DIU(0)) D:$D(PSGAL(3))#2 KILL^PSGAL5:PSGAL(3)=X K PSGAL
22 S X=$P(DIKZ(0),U,2)
23 I X'="" I $S('$D(^PS(55,DA(1),5.1)):1,1:$P(^(5.1),"^",2)'=X) S $P(^(5.1),"^",2)=X
24 S X=$P(DIKZ(0),U,3)
25 I X'="" I '$D(DIU(0)) D:$D(PSGAL(4))#2 KILL^PSGAL5:PSGAL(4)=X K PSGAL
26 S X=$P(DIKZ(0),U,4)
27 I X'="" I '$D(DIU(0)) D:$D(PSGAL(5))#2 KILL^PSGAL5:PSGAL(5)=X K PSGAL
28 S X=$P(DIKZ(0),U,5)
29 I X'="" I '$D(DIU(0)) D:$D(PSGAL(6))#2 KILL^PSGAL5:PSGAL(6)=X K PSGAL
30 S X=$P(DIKZ(0),U,5)
31 I X'="" D
32 .N DIK,DIV,DIU,DIN
33 .I 'X S DIU=$S($D(^PS(55,DA(1),5,DA,0)):$P(^(0),"^",6),1:"") I DIU S $P(^(0),"^",6)="" I $O(^DD(55.06,6,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV="",DIH=55.06,DIG=6 D ^DICR
34 S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
35 S X=$P(DIKZ(0),U,6)
36 I X'="" I '$D(DIU(0)) D:$D(PSGAL(7))#2 KILL^PSGAL5:PSGAL(7)=X K PSGAL
37 S X=$P(DIKZ(0),U,7)
38 I X'="" I '$D(DIU(0)) D:$D(PSGAL(8))#2 KILL^PSGAL5:PSGAL(8)=X K PSGAL
39 S X=$P(DIKZ(0),U,7)
40 I X'="" I $D(^PS(55,DA(1),5,DA,2)),$P(^(2),"^",4) S ^PS(55,DA(1),5,"AU",X,+$P(^(2),"^",4),DA)=""
41 S DIKZ(6)=$G(^PS(55,DA(1),5,DA,6))
42 S X=$P(DIKZ(6),U,1)
43 I X'="" I '$D(DIU(0)) D:$D(PSGAL(9))#2 KILL^PSGAL5:PSGAL(9)=X K PSGAL
44 S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
45 S X=$P(DIKZ(2),U,2)
46 I X'="" I '$D(DIU(0)) D:$D(PSGAL(41))#2 KILL^PSGAL5:PSGAL(41)=X K PSGAL
47 S X=$P(DIKZ(2),U,2)
48 I X'="" S ^PS(55,"AUDS",$E(X,1,30),DA(1),DA)=""
49 S X=$P(DIKZ(0),U,10)
50 I X'="" I '$D(DIU(0)) D:$D(PSGAL(11))#2 KILL^PSGAL5:PSGAL(11)=X K PSGAL
51 S X=$P(DIKZ(0),U,11)
52 I X'="" I '$D(DIU(0)) D:$D(PSGAL(12))#2 KILL^PSGAL5:PSGAL(12)=X K PSGAL
53 S X=$P(DIKZ(0),U,12)
54 I X'="" I '$D(DIU(0)) D:$D(PSGAL(13))#2 KILL^PSGAL5:PSGAL(13)=X K PSGAL
55 S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
56 S X=$P(DIKZ(5),U,6)
57 I X'="" I '$D(DIU(0)) D:$D(PSGAL(14))#2 KILL^PSGAL5:PSGAL(14)=X K PSGAL
58 S X=$P(DIKZ(5),U,6)
59 I X'="" ; I X S PSGAMSF=0 D ^PSGAMSA
60 S X=$P(DIKZ(5),U,6)
61 I X'="" D
62 .N DIK,DIV,DIU,DIN
63 .I X S DIU=$S($D(^PS(55,DA(1),5,DA,5)):$P(^(5),"^",9),1:0) S $P(^(5),"^",9)=DIU+X I $O(^DD(55.06,63,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV=DIU+X,DIH=55.06,DIG=63 D ^DICR
64 S DIKZ(4)=$G(^PS(55,DA(1),5,DA,4))
65 S X=$P(DIKZ(4),U,1)
66 I X'="" I '$D(DIU(0)) D:$D(PSGAL(15))#2 KILL^PSGAL5:PSGAL(15)=X K PSGAL
67 S X=$P(DIKZ(4),U,1)
68 I X'="" X:'$D(PSGNVF) "S PSGAL(""C"")=""VN"" D ^PSGAL5" K PSGNVF,PSGAL
69 S X=$P(DIKZ(4),U,2)
70 I X'="" I '$D(DIU(0)) D:$D(PSGAL(16))#2 KILL^PSGAL5:PSGAL(16)=X K PSGAL
71 S X=$P(DIKZ(4),U,3)
72 I X'="" I '$D(DIU(0)) D:$D(PSGAL(17))#2 KILL^PSGAL5:PSGAL(17)=X K PSGAL
73 S X=$P(DIKZ(4),U,3)
74 I X'="" X:'$D(PSGNVF) "S PSGAL(""C"")=""VP"" D ^PSGAL5" K PSGNVF,PSGAL
75 S X=$P(DIKZ(4),U,4)
76 I X'="" I '$D(DIU(0)) D:$D(PSGAL(18))#2 KILL^PSGAL5:PSGAL(18)=X K PSGAL
77 S X=$P(DIKZ(4),U,5)
78 I X'="" I '$D(DIU(0)) D:$D(PSGAL(19))#2 KILL^PSGAL5:PSGAL(19)=X K PSGAL
79 S X=$P(DIKZ(4),U,6)
80 I X'="" I '$D(DIU(0)) D:$D(PSGAL(20))#2 KILL^PSGAL5:PSGAL(20)=X K PSGAL
81 S X=$P(DIKZ(4),U,7)
82 I X'="" I '$D(DIU(0)) D:$D(PSGAL(21))#2 KILL^PSGAL5:PSGAL(21)=X K PSGAL
83 S X=$P(DIKZ(4),U,8)
84 I X'="" I '$D(DIU(0)) D:$D(PSGAL(22))#2 KILL^PSGAL5:PSGAL(22)=X K PSGAL
85 S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
86 S X=$P(DIKZ(0),U,17)
87 I X'="" I '$D(DIU(0)) D:$D(PSGAL(23))#2 KILL^PSGAL5:PSGAL(23)=X K PSGAL
88 S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
89 S X=$P(DIKZ(2),U,3)
90 I X'="" I '$D(DIU(0)) D:$D(PSGAL(24))#2 KILL^PSGAL5:PSGAL(24)=X K PSGAL
91 S X=$P(DIKZ(2),U,1)
92 I X'="" I '$D(DIU(0)) D:$D(PSGAL(43))#2 KILL^PSGAL5:PSGAL(43)=X K PSGAL
93 S X=$P(DIKZ(2),U,1)
94 I X'="" D
95 .N DIK,DIV,DIU,DIN
96 .I '$D(DIU(0)),$D(PSGS0Y) S DIU=$S($D(^PS(55,DA(1),5,DA,2)):$P(^(2),"^",5),1:"") I DIU'=PSGS0Y S $P(^(2),"^",5)=PSGS0Y I $O(^DD(55.06,41,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV=PSGS0Y,DIH=55.06,DIG=41 D ^DICR
97 S X=$P(DIKZ(2),U,1)
98 I X'="" D
99 .N DIK,DIV,DIU,DIN
100 .I $D(PSGS0XT) S DIU=$S($D(^PS(55,DA(1),5,DA,2)):$P(^(2),"^",6),1:"") I DIU'=PSGS0XT S $P(^(2),"^",6)=PSGS0XT I $O(^DD(55.06,42,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV=PSGS0XT,DIH=55.06,DIG=42 D ^DICR
101 S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
102 S X=$P(DIKZ(0),U,14)
103 I X'="" I '$D(DIU(0)) D:$D(PSGAL(26))#2 KILL^PSGAL5:PSGAL(26)=X K PSGAL
104 S X=$P(DIKZ(0),U,16)
105 I X'="" I '$D(DIU(0)) D:$D(PSGAL(27))#2 KILL^PSGAL5:PSGAL(27)=X K PSGAL
106 S X=$P(DIKZ(0),U,9)
107 I X'="" I '$D(DIU(0)) D:$D(PSGAL(28))#2 KILL^PSGAL5:PSGAL(28)=X K PSGAL
108 S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
109 S X=$P(DIKZ(5),U,2)
110 I X'="" I '$D(DIU(0)) D:$D(PSGAL(51))#2 KILL^PSGAL5:PSGAL(51)=X K PSGAL
111 S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
112 S X=$P(DIKZ(2),U,4)
113 I X'="" S ^PS(55,DA(1),5,"AUS",+X,DA)="" I $P($G(^PS(55,DA(1),5,DA,0)),"^",7)]"" S ^PS(55,DA(1),5,"AU",$P(^(0),"^",7),+X,DA)=""
114 S X=$P(DIKZ(2),U,4)
115 I X'="" I '$D(DIU(0)) D:$D(PSGAL(53))#2 KILL^PSGAL5:PSGAL(53)=X K PSGAL
116 S X=$P(DIKZ(2),U,4)
117 I X'="" S ^PS(55,"AUD",$E(X,1,30),DA(1),DA)=""
118 S X=$P(DIKZ(5),U,4)
119 I X'="" I '$D(DIU(0)) D:$D(PSGAL(61))#2 KILL^PSGAL5:PSGAL(61)=X K PSGAL
120 S X=$P(DIKZ(5),U,3)
121 I X'="" I '$D(DIU(0)) D:$D(PSGAL(54))#2 KILL^PSGAL5:PSGAL(54)=X K PSGAL
122 S X=$P(DIKZ(5),U,5)
123 I X'="" D
124 .N DIK,DIV,DIU,DIN
125 .I X S DIU=$S($D(^PS(55,DA(1),5,DA,5)):$P(^(5),"^",4),1:""),$P(^(5),"^",4)=DIU+X I $O(^DD(55.06,35,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV=DIU+X,DIH=55.06,DIG=35 D ^DICR
126 S X=$P(DIKZ(5),U,5)
127 I X'="" ; I X S PSGAMSF=2 D ^PSGAMSA
128 S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
129 S X=$P(DIKZ(2),U,5)
130 I X'="" I '$D(DIU(0)) D:$D(PSGAL(56))#2 KILL^PSGAL5:PSGAL(56)=X K PSGAL
131 S X=$P(DIKZ(2),U,5)
132 I X'="" I $P($G(^PS(55,DA(1),5,DA,2)),"^")["@" S $P(^(2),"^")=$P($P(^(2),"^"),"@")_"@"_X
133 S X=$P(DIKZ(2),U,6)
134 I X'="" I '$D(DIU(0)) D:$D(PSGAL(57))#2 KILL^PSGAL5:PSGAL(57)=X K PSGAL
135 S DIKZ(4)=$G(^PS(55,DA(1),5,DA,4))
136 S X=$P(DIKZ(4),U,15)
137 I X'="" I '$D(DIU(0)) D:$D(PSGAL(58)) KILL^PSGAL5:PSGAL(58)=X K PSGAL
138 S X=$P(DIKZ(4),U,16)
139 I X'="" I '$D(DIU(0)) D:$D(PSGAL(59))#2 KILL^PSGAL5:PSGAL(59)=X K PSGAL
140 S X=$P(DIKZ(4),U,17)
141 I X'="" I '$D(DIU(0)) D:$D(PSGAL(60))#2 KILL^PSGAL5:PSGAL(60)=X K PSGAL
142 S X=$P(DIKZ(4),U,12)
143 I X'="" I '$D(DIU(0)) D:$D(PSGAL(63)) KILL^PSGAL5:PSGAL(63)=X K PSGAL
144 S X=$P(DIKZ(4),U,13)
145 I X'="" I '$D(DIU(0)) D:$D(PSGAL(64)) KILL^PSGAL5:PSGAL(64)=X K PSGAL
146 S X=$P(DIKZ(4),U,14)
147 I X'="" I '$D(DIU(0)) D:$D(PSGAL(65)) KILL^PSGAL5:PSGAL(65)=X K PSGAL
148 S X=$P(DIKZ(4),U,11)
149 I X'="" I '$D(DIU(0)) D:$D(PSGAL(62))#2 KILL^PSGAL5:PSGAL(62)=X K PSGAL
150 S X=$P(DIKZ(4),U,9)
151 I X'="" I '$D(DIU(0)) D:$D(PSGAL(66)) KILL^PSGAL5:PSGAL(66)=X K PSGAL
152 S X=$P(DIKZ(4),U,9)
153 I X'="" K:X ^PS(55,"APV",DA(1),DA) S:'X ^PS(55,"APV",DA(1),DA)=""
154 S X=$P(DIKZ(4),U,10)
155 I X'="" I '$D(DIU(0)) D:$D(PSGAL(67)) KILL^PSGAL5:PSGAL(67)=X K PSGAL
156 S X=$P(DIKZ(4),U,10)
157 I X'="" K:X ^PS(55,"ANV",DA(1),DA) S:'X ^PS(55,"APV",DA(1),DA)=""
158 S DIKZ(7)=$G(^PS(55,DA(1),5,DA,7))
159 S X=$P(DIKZ(7),U,1)
160 I X'="" I '$D(DIU(0)) D:$D(PSGAL(68)) KILL^PSGAL5:PSGAL(68)=X K PSGAL
161 S X=$P(DIKZ(7),U,2)
162 I X'="" I '$D(DIU(0)) D:$D(PSGAL(69)) KILL^PSGAL5:PSGAL(69)=X K PSGAL
163 S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
164 S X=$P(DIKZ(5),U,7)
165 I X'="" I '$D(DIU(0)) D:$D(PSGAL(70)) KILL^PSGAL5:PSGAL(70)=X K PSGAL
166 S X=$P(DIKZ(5),U,8)
167 G ^PSSJXR24
168END G END^PSSJXR24
Note: See TracBrowser for help on using the repository browser.