PSJXR516 ; COMPILED XREF FOR FILE #55.06 ; 11/17/04
;
S DA=0
A1 ;
I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1
0 ;
A S DA=$O(^PS(55,DA(1),5,DA)) I DA'>0 S DA=0 G END
1 ;
S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X=$P(DIKZ(0),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(1))#2 KILL^PSGAL5:PSGAL(1)=X K PSGAL
S X=$P(DIKZ(0),U,1)
I X'="" S ^PS(55,DA(1),5,"B",$E(X,1,30),DA)=""
S X=$P(DIKZ(0),U,1)
I X'="" I '$D(DIU(0)) S ^PS(55,"AUE",DA(1),DA)=""
S X=$P(DIKZ(0),U,18)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(55)) KILL^PSGAL5:PSGAL(55)=X K PSGAL
S X=$P(DIKZ(0),U,15)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(2))#2 KILL^PSGAL5:PSGAL(2)=X K PSGAL
S X=$P(DIKZ(0),U,15)
I X'="" S ^PS(55,"APA",$E(X,1,30),DA(1),DA)=""
S X=$P(DIKZ(0),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(3))#2 KILL^PSGAL5:PSGAL(3)=X K PSGAL
S X=$P(DIKZ(0),U,2)
I X'="" I $S('$D(^PS(55,DA(1),5.1)):1,1:$P(^(5.1),"^",2)'=X) S $P(^(5.1),"^",2)=X
S X=$P(DIKZ(0),U,3)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(4))#2 KILL^PSGAL5:PSGAL(4)=X K PSGAL
S X=$P(DIKZ(0),U,4)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(5))#2 KILL^PSGAL5:PSGAL(5)=X K PSGAL
S X=$P(DIKZ(0),U,5)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(6))#2 KILL^PSGAL5:PSGAL(6)=X K PSGAL
S X=$P(DIKZ(0),U,5)
I X'="" D
.N DIK,DIV,DIU,DIN
.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
S X=$P(DIKZ(0),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(7))#2 KILL^PSGAL5:PSGAL(7)=X K PSGAL
S X=$P(DIKZ(0),U,7)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(8))#2 KILL^PSGAL5:PSGAL(8)=X K PSGAL
S X=$P(DIKZ(0),U,7)
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)=""
S DIKZ(6)=$G(^PS(55,DA(1),5,DA,6))
S X=$P(DIKZ(6),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(9))#2 KILL^PSGAL5:PSGAL(9)=X K PSGAL
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X=$P(DIKZ(2),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(41))#2 KILL^PSGAL5:PSGAL(41)=X K PSGAL
S X=$P(DIKZ(2),U,2)
I X'="" S ^PS(55,"AUDS",$E(X,1,30),DA(1),DA)=""
S X=$P(DIKZ(0),U,10)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(11))#2 KILL^PSGAL5:PSGAL(11)=X K PSGAL
S X=$P(DIKZ(0),U,11)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(12))#2 KILL^PSGAL5:PSGAL(12)=X K PSGAL
S X=$P(DIKZ(0),U,12)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(13))#2 KILL^PSGAL5:PSGAL(13)=X K PSGAL
S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
S X=$P(DIKZ(5),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(14))#2 KILL^PSGAL5:PSGAL(14)=X K PSGAL
S X=$P(DIKZ(5),U,6)
I X'="" ; I X S PSGAMSF=0 D ^PSGAMSA
S X=$P(DIKZ(5),U,6)
I X'="" D
.N DIK,DIV,DIU,DIN
.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
S DIKZ(4)=$G(^PS(55,DA(1),5,DA,4))
S X=$P(DIKZ(4),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(15))#2 KILL^PSGAL5:PSGAL(15)=X K PSGAL
S X=$P(DIKZ(4),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(16))#2 KILL^PSGAL5:PSGAL(16)=X K PSGAL
S X=$P(DIKZ(4),U,3)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(17))#2 KILL^PSGAL5:PSGAL(17)=X K PSGAL
S X=$P(DIKZ(4),U,4)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(18))#2 KILL^PSGAL5:PSGAL(18)=X K PSGAL
S X=$P(DIKZ(4),U,5)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(19))#2 KILL^PSGAL5:PSGAL(19)=X K PSGAL
S X=$P(DIKZ(4),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(20))#2 KILL^PSGAL5:PSGAL(20)=X K PSGAL
S X=$P(DIKZ(4),U,7)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(21))#2 KILL^PSGAL5:PSGAL(21)=X K PSGAL
S X=$P(DIKZ(4),U,8)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(22))#2 KILL^PSGAL5:PSGAL(22)=X K PSGAL
S X=$P(DIKZ(0),U,17)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(23))#2 KILL^PSGAL5:PSGAL(23)=X K PSGAL
S X=$P(DIKZ(2),U,3)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(24))#2 KILL^PSGAL5:PSGAL(24)=X K PSGAL
S X=$P(DIKZ(2),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(43))#2 KILL^PSGAL5:PSGAL(43)=X K PSGAL
S X=$P(DIKZ(2),U,1)
I X'="" D
.N DIK,DIV,DIU,DIN
.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
S X=$P(DIKZ(2),U,1)
I X'="" D
.N DIK,DIV,DIU,DIN
.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
S X=$P(DIKZ(0),U,14)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(26))#2 KILL^PSGAL5:PSGAL(26)=X K PSGAL
S X=$P(DIKZ(0),U,16)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(27))#2 KILL^PSGAL5:PSGAL(27)=X K PSGAL
S X=$P(DIKZ(0),U,9)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(28))#2 KILL^PSGAL5:PSGAL(28)=X K PSGAL
S X=$P(DIKZ(0),U,9)
I X'="" I $P($G(^PS(55,DA(1),5,DA,0)),"^",21) S ORIFN=$P(^(0),"^",21),XX=X,X="ORX" X ^%ZOSF("TEST") I S X=XX D ENSC^PSGORU K ORIFN,XX
S X=$P(DIKZ(5),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(51))#2 KILL^PSGAL5:PSGAL(51)=X K PSGAL
S X=$P(DIKZ(2),U,4)
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)=""
S X=$P(DIKZ(2),U,4)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(53))#2 KILL^PSGAL5:PSGAL(53)=X K PSGAL
S X=$P(DIKZ(2),U,4)
I X'="" S ^PS(55,"AUD",$E(X,1,30),DA(1),DA)=""
S X=$P(DIKZ(5),U,4)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(61))#2 KILL^PSGAL5:PSGAL(61)=X K PSGAL
S X=$P(DIKZ(5),U,3)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(54))#2 KILL^PSGAL5:PSGAL(54)=X K PSGAL
S X=$P(DIKZ(5),U,5)
I X'="" D
.N DIK,DIV,DIU,DIN
.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
S X=$P(DIKZ(5),U,5)
I X'="" ; I X S PSGAMSF=2 D ^PSGAMSA
S X=$P(DIKZ(2),U,5)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(56))#2 KILL^PSGAL5:PSGAL(56)=X K PSGAL
S X=$P(DIKZ(2),U,5)
I X'="" I $P($G(^PS(55,DA(1),5,DA,2)),"^")["@" S $P(^(2),"^")=$P($P(^(2),"^"),"@")_"@"_X
S X=$P(DIKZ(2),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(57))#2 KILL^PSGAL5:PSGAL(57)=X K PSGAL
S X=$P(DIKZ(4),U,15)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(58)) KILL^PSGAL5:PSGAL(58)=X K PSGAL
S X=$P(DIKZ(4),U,16)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(59))#2 KILL^PSGAL5:PSGAL(59)=X K PSGAL
S X=$P(DIKZ(4),U,17)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(60))#2 KILL^PSGAL5:PSGAL(60)=X K PSGAL
S X=$P(DIKZ(4),U,12)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(63)) KILL^PSGAL5:PSGAL(63)=X K PSGAL
S X=$P(DIKZ(4),U,13)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(64)) KILL^PSGAL5:PSGAL(64)=X K PSGAL
S X=$P(DIKZ(4),U,14)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(65)) KILL^PSGAL5:PSGAL(65)=X K PSGAL
S X=$P(DIKZ(4),U,11)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(62))#2 KILL^PSGAL5:PSGAL(62)=X K PSGAL
S X=$P(DIKZ(4),U,9)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(66)) KILL^PSGAL5:PSGAL(66)=X K PSGAL
S X=$P(DIKZ(4),U,10)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(67)) KILL^PSGAL5:PSGAL(67)=X K PSGAL
S DIKZ(7)=$G(^PS(55,DA(1),5,DA,7))
S X=$P(DIKZ(7),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(68)) KILL^PSGAL5:PSGAL(68)=X K PSGAL
S X=$P(DIKZ(7),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(69)) KILL^PSGAL5:PSGAL(69)=X K PSGAL
S X=$P(DIKZ(5),U,7)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(70)) KILL^PSGAL5:PSGAL(70)=X K PSGAL
S X=$P(DIKZ(5),U,8)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X S DIU=$S($D(^PS(55,DA(1),5,DA,5)):$P(^(5),"^",7),1:""),$P(^(5),"^",7)=DIU+X I $O(^DD(55.06,54,1,0)) K DIV S (DIV(0),D0)=DA(1),(DIV(1),D1)=DA,DIV=DIU+X,DIH=55.06,DIG=54 D ^DICR
S X=$P(DIKZ(5),U,8)
I X'="" ; I '$D(DIU(0)),X S PSGAMSF=0 D ^PSGAMSA
S X=$P(DIKZ(4),U,18)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(71)) KILL^PSGAL5:PSGAL(71)=X K PSGAL
S X=$P(DIKZ(4),U,19)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(72)) KILL^PSGAL5:PSGAL(72)=X K PSGAL
S X=$P(DIKZ(4),U,20)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(73)) KILL^PSGAL5:PSGAL(73)=X K PSGAL
S X=$P(DIKZ(4),U,21)
G ^PSJXR517
END G END^PSJXR517
PSJXR516 ; COMPILED XREF FOR FILE #55.06 ; 11/17/04
+1 ;
+2 SET DA=0
A1 ;
+1 IF $DATA(DISET)
KILL DIKLM
IF DIKM1=1
SET DIKLM=1
GOTO @DIKM1
0 ;
A SET DA=$ORDER(^PS(55,DA(1),5,DA))
IF DA'>0
SET DA=0
GOTO END
1 ;
+1 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+2 SET X=$PIECE(DIKZ(0),U,1)
+3 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(1))#2
IF PSGAL(1)=X
DO KILL^PSGAL5
KILL PSGAL
+4 SET X=$PIECE(DIKZ(0),U,1)
+5 IF X'=""
SET ^PS(55,DA(1),5,"B",$EXTRACT(X,1,30),DA)=""
+6 SET X=$PIECE(DIKZ(0),U,1)
+7 IF X'=""
IF '$DATA(DIU(0))
SET ^PS(55,"AUE",DA(1),DA)=""
+8 SET X=$PIECE(DIKZ(0),U,18)
+9 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(55))
IF PSGAL(55)=X
DO KILL^PSGAL5
KILL PSGAL
+10 SET X=$PIECE(DIKZ(0),U,15)
+11 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(2))#2
IF PSGAL(2)=X
DO KILL^PSGAL5
KILL PSGAL
+12 SET X=$PIECE(DIKZ(0),U,15)
+13 IF X'=""
SET ^PS(55,"APA",$EXTRACT(X,1,30),DA(1),DA)=""
+14 SET X=$PIECE(DIKZ(0),U,2)
+15 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(3))#2
IF PSGAL(3)=X
DO KILL^PSGAL5
KILL PSGAL
+16 SET X=$PIECE(DIKZ(0),U,2)
+17 IF X'=""
IF $SELECT('$DATA(^PS(55,DA(1),5.1)):1,1:$PIECE(^(5.1),"^",2)'=X)
SET $PIECE(^(5.1),"^",2)=X
+18 SET X=$PIECE(DIKZ(0),U,3)
+19 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(4))#2
IF PSGAL(4)=X
DO KILL^PSGAL5
KILL PSGAL
+20 SET X=$PIECE(DIKZ(0),U,4)
+21 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(5))#2
IF PSGAL(5)=X
DO KILL^PSGAL5
KILL PSGAL
+22 SET X=$PIECE(DIKZ(0),U,5)
+23 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(6))#2
IF PSGAL(6)=X
DO KILL^PSGAL5
KILL PSGAL
+24 SET X=$PIECE(DIKZ(0),U,5)
+25 IF X'=""
Begin DoDot:1
+26 NEW DIK,DIV,DIU,DIN
+27 IF 'X
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,0)):$PIECE(^(0),"^",6),1:"")
IF DIU
SET $PIECE(^(0),"^",6)=""
IF $ORDER(^DD(55.06,6,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=""
SET DIH=55.06
SET DIG=6
DO ^DICR
End DoDot:1
+28 SET X=$PIECE(DIKZ(0),U,6)
+29 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(7))#2
IF PSGAL(7)=X
DO KILL^PSGAL5
KILL PSGAL
+30 SET X=$PIECE(DIKZ(0),U,7)
+31 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(8))#2
IF PSGAL(8)=X
DO KILL^PSGAL5
KILL PSGAL
+32 SET X=$PIECE(DIKZ(0),U,7)
+33 IF X'=""
IF $DATA(^PS(55,DA(1),5,DA,2))
IF $PIECE(^(2),"^",4)
SET ^PS(55,DA(1),5,"AU",X,+$PIECE(^(2),"^",4),DA)=""
+34 SET DIKZ(6)=$GET(^PS(55,DA(1),5,DA,6))
+35 SET X=$PIECE(DIKZ(6),U,1)
+36 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(9))#2
IF PSGAL(9)=X
DO KILL^PSGAL5
KILL PSGAL
+37 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+38 SET X=$PIECE(DIKZ(2),U,2)
+39 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(41))#2
IF PSGAL(41)=X
DO KILL^PSGAL5
KILL PSGAL
+40 SET X=$PIECE(DIKZ(2),U,2)
+41 IF X'=""
SET ^PS(55,"AUDS",$EXTRACT(X,1,30),DA(1),DA)=""
+42 SET X=$PIECE(DIKZ(0),U,10)
+43 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(11))#2
IF PSGAL(11)=X
DO KILL^PSGAL5
KILL PSGAL
+44 SET X=$PIECE(DIKZ(0),U,11)
+45 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(12))#2
IF PSGAL(12)=X
DO KILL^PSGAL5
KILL PSGAL
+46 SET X=$PIECE(DIKZ(0),U,12)
+47 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(13))#2
IF PSGAL(13)=X
DO KILL^PSGAL5
KILL PSGAL
+48 SET DIKZ(5)=$GET(^PS(55,DA(1),5,DA,5))
+49 SET X=$PIECE(DIKZ(5),U,6)
+50 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(14))#2
IF PSGAL(14)=X
DO KILL^PSGAL5
KILL PSGAL
+51 SET X=$PIECE(DIKZ(5),U,6)
+52 ; I X S PSGAMSF=0 D ^PSGAMSA
IF X'=""
+53 SET X=$PIECE(DIKZ(5),U,6)
+54 IF X'=""
Begin DoDot:1
+55 NEW DIK,DIV,DIU,DIN
+56 IF X
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,5)):$PIECE(^(5),"^",9),1:0)
SET $PIECE(^(5),"^",9)=DIU+X
IF $ORDER(^DD(55.06,63,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=DIU+X
SET DIH=55.06
SET DIG=63
DO ^DICR
End DoDot:1
+57 SET DIKZ(4)=$GET(^PS(55,DA(1),5,DA,4))
+58 SET X=$PIECE(DIKZ(4),U,1)
+59 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(15))#2
IF PSGAL(15)=X
DO KILL^PSGAL5
KILL PSGAL
+60 SET X=$PIECE(DIKZ(4),U,2)
+61 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(16))#2
IF PSGAL(16)=X
DO KILL^PSGAL5
KILL PSGAL
+62 SET X=$PIECE(DIKZ(4),U,3)
+63 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(17))#2
IF PSGAL(17)=X
DO KILL^PSGAL5
KILL PSGAL
+64 SET X=$PIECE(DIKZ(4),U,4)
+65 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(18))#2
IF PSGAL(18)=X
DO KILL^PSGAL5
KILL PSGAL
+66 SET X=$PIECE(DIKZ(4),U,5)
+67 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(19))#2
IF PSGAL(19)=X
DO KILL^PSGAL5
KILL PSGAL
+68 SET X=$PIECE(DIKZ(4),U,6)
+69 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(20))#2
IF PSGAL(20)=X
DO KILL^PSGAL5
KILL PSGAL
+70 SET X=$PIECE(DIKZ(4),U,7)
+71 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(21))#2
IF PSGAL(21)=X
DO KILL^PSGAL5
KILL PSGAL
+72 SET X=$PIECE(DIKZ(4),U,8)
+73 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(22))#2
IF PSGAL(22)=X
DO KILL^PSGAL5
KILL PSGAL
+74 SET X=$PIECE(DIKZ(0),U,17)
+75 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(23))#2
IF PSGAL(23)=X
DO KILL^PSGAL5
KILL PSGAL
+76 SET X=$PIECE(DIKZ(2),U,3)
+77 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(24))#2
IF PSGAL(24)=X
DO KILL^PSGAL5
KILL PSGAL
+78 SET X=$PIECE(DIKZ(2),U,1)
+79 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(43))#2
IF PSGAL(43)=X
DO KILL^PSGAL5
KILL PSGAL
+80 SET X=$PIECE(DIKZ(2),U,1)
+81 IF X'=""
Begin DoDot:1
+82 NEW DIK,DIV,DIU,DIN
+83 IF '$DATA(DIU(0))
IF $DATA(PSGS0Y)
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,2)):$PIECE(^(2),"^",5),1:"")
IF DIU'=PSGS0Y
SET $PIECE(^(2),"^",5)=PSGS0Y
IF $ORDER(^DD(55.06,41,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=PSGS0Y
SET DIH=55.06
SET DIG=41
DO ^DICR
End DoDot:1
+84 SET X=$PIECE(DIKZ(2),U,1)
+85 IF X'=""
Begin DoDot:1
+86 NEW DIK,DIV,DIU,DIN
+87 IF $DATA(PSGS0XT)
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,2)):$PIECE(^(2),"^",6),1:"")
IF DIU'=PSGS0XT
SET $PIECE(^(2),"^",6)=PSGS0XT
IF $ORDER(^DD(55.06,42,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=PSGS0XT
SET DIH=55.06
SET DIG=42
DO ^DICR
End DoDot:1
+88 SET X=$PIECE(DIKZ(0),U,14)
+89 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(26))#2
IF PSGAL(26)=X
DO KILL^PSGAL5
KILL PSGAL
+90 SET X=$PIECE(DIKZ(0),U,16)
+91 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(27))#2
IF PSGAL(27)=X
DO KILL^PSGAL5
KILL PSGAL
+92 SET X=$PIECE(DIKZ(0),U,9)
+93 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(28))#2
IF PSGAL(28)=X
DO KILL^PSGAL5
KILL PSGAL
+94 SET X=$PIECE(DIKZ(0),U,9)
+95 IF X'=""
IF $PIECE($GET(^PS(55,DA(1),5,DA,0)),"^",21)
SET ORIFN=$PIECE(^(0),"^",21)
SET XX=X
SET X="ORX"
XECUTE ^%ZOSF("TEST")
IF $TEST
SET X=XX
DO ENSC^PSGORU
KILL ORIFN,XX
+96 SET X=$PIECE(DIKZ(5),U,2)
+97 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(51))#2
IF PSGAL(51)=X
DO KILL^PSGAL5
KILL PSGAL
+98 SET X=$PIECE(DIKZ(2),U,4)
+99 IF X'=""
SET ^PS(55,DA(1),5,"AUS",+X,DA)=""
IF $PIECE($GET(^PS(55,DA(1),5,DA,0)),"^",7)]""
SET ^PS(55,DA(1),5,"AU",$PIECE(^(0),"^",7),+X,DA)=""
+100 SET X=$PIECE(DIKZ(2),U,4)
+101 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(53))#2
IF PSGAL(53)=X
DO KILL^PSGAL5
KILL PSGAL
+102 SET X=$PIECE(DIKZ(2),U,4)
+103 IF X'=""
SET ^PS(55,"AUD",$EXTRACT(X,1,30),DA(1),DA)=""
+104 SET X=$PIECE(DIKZ(5),U,4)
+105 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(61))#2
IF PSGAL(61)=X
DO KILL^PSGAL5
KILL PSGAL
+106 SET X=$PIECE(DIKZ(5),U,3)
+107 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(54))#2
IF PSGAL(54)=X
DO KILL^PSGAL5
KILL PSGAL
+108 SET X=$PIECE(DIKZ(5),U,5)
+109 IF X'=""
Begin DoDot:1
+110 NEW DIK,DIV,DIU,DIN
+111 IF X
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,5)):$PIECE(^(5),"^",4),1:"")
SET $PIECE(^(5),"^",4)=DIU+X
IF $ORDER(^DD(55.06,35,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=DIU+X
SET DIH=55.06
SET DIG=35
DO ^DICR
End DoDot:1
+112 SET X=$PIECE(DIKZ(5),U,5)
+113 ; I X S PSGAMSF=2 D ^PSGAMSA
IF X'=""
+114 SET X=$PIECE(DIKZ(2),U,5)
+115 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(56))#2
IF PSGAL(56)=X
DO KILL^PSGAL5
KILL PSGAL
+116 SET X=$PIECE(DIKZ(2),U,5)
+117 IF X'=""
IF $PIECE($GET(^PS(55,DA(1),5,DA,2)),"^")["@"
SET $PIECE(^(2),"^")=$PIECE($PIECE(^(2),"^"),"@")_"@"_X
+118 SET X=$PIECE(DIKZ(2),U,6)
+119 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(57))#2
IF PSGAL(57)=X
DO KILL^PSGAL5
KILL PSGAL
+120 SET X=$PIECE(DIKZ(4),U,15)
+121 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(58))
IF PSGAL(58)=X
DO KILL^PSGAL5
KILL PSGAL
+122 SET X=$PIECE(DIKZ(4),U,16)
+123 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(59))#2
IF PSGAL(59)=X
DO KILL^PSGAL5
KILL PSGAL
+124 SET X=$PIECE(DIKZ(4),U,17)
+125 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(60))#2
IF PSGAL(60)=X
DO KILL^PSGAL5
KILL PSGAL
+126 SET X=$PIECE(DIKZ(4),U,12)
+127 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(63))
IF PSGAL(63)=X
DO KILL^PSGAL5
KILL PSGAL
+128 SET X=$PIECE(DIKZ(4),U,13)
+129 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(64))
IF PSGAL(64)=X
DO KILL^PSGAL5
KILL PSGAL
+130 SET X=$PIECE(DIKZ(4),U,14)
+131 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(65))
IF PSGAL(65)=X
DO KILL^PSGAL5
KILL PSGAL
+132 SET X=$PIECE(DIKZ(4),U,11)
+133 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(62))#2
IF PSGAL(62)=X
DO KILL^PSGAL5
KILL PSGAL
+134 SET X=$PIECE(DIKZ(4),U,9)
+135 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(66))
IF PSGAL(66)=X
DO KILL^PSGAL5
KILL PSGAL
+136 SET X=$PIECE(DIKZ(4),U,10)
+137 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(67))
IF PSGAL(67)=X
DO KILL^PSGAL5
KILL PSGAL
+138 SET DIKZ(7)=$GET(^PS(55,DA(1),5,DA,7))
+139 SET X=$PIECE(DIKZ(7),U,1)
+140 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(68))
IF PSGAL(68)=X
DO KILL^PSGAL5
KILL PSGAL
+141 SET X=$PIECE(DIKZ(7),U,2)
+142 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(69))
IF PSGAL(69)=X
DO KILL^PSGAL5
KILL PSGAL
+143 SET X=$PIECE(DIKZ(5),U,7)
+144 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(70))
IF PSGAL(70)=X
DO KILL^PSGAL5
KILL PSGAL
+145 SET X=$PIECE(DIKZ(5),U,8)
+146 IF X'=""
Begin DoDot:1
+147 NEW DIK,DIV,DIU,DIN
+148 IF X
SET DIU=$SELECT($DATA(^PS(55,DA(1),5,DA,5)):$PIECE(^(5),"^",7),1:"")
SET $PIECE(^(5),"^",7)=DIU+X
IF $ORDER(^DD(55.06,54,1,0))
KILL DIV
SET (DIV(0),D0)=DA(1)
SET (DIV(1),D1)=DA
SET DIV=DIU+X
SET DIH=55.06
SET DIG=54
DO ^DICR
End DoDot:1
+149 SET X=$PIECE(DIKZ(5),U,8)
+150 ; I '$D(DIU(0)),X S PSGAMSF=0 D ^PSGAMSA
IF X'=""
+151 SET X=$PIECE(DIKZ(4),U,18)
+152 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(71))
IF PSGAL(71)=X
DO KILL^PSGAL5
KILL PSGAL
+153 SET X=$PIECE(DIKZ(4),U,19)
+154 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(72))
IF PSGAL(72)=X
DO KILL^PSGAL5
KILL PSGAL
+155 SET X=$PIECE(DIKZ(4),U,20)
+156 IF X'=""
IF '$DATA(DIU(0))
IF $DATA(PSGAL(73))
IF PSGAL(73)=X
DO KILL^PSGAL5
KILL PSGAL
+157 SET X=$PIECE(DIKZ(4),U,21)
+158 GOTO ^PSJXR517
END GOTO END^PSJXR517