PSSJXR29 ; COMPILED XREF FOR FILE #55.06 ; 10/05/22
;
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($G(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($G(DIKZ(0)),U,1)
I X'="" S ^PS(55,DA(1),5,"B",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,1)
I X'="" I '$D(DIU(0)) S ^PS(55,"AUE",DA(1),DA)=""
S X=$P($G(DIKZ(0)),U,18)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(55)) KILL^PSGAL5:PSGAL(55)=X K PSGAL
S X=$P($G(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($G(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($G(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($G(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($G(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($G(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($G(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 DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X=$P($G(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($G(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($G(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($G(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($G(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($G(DIKZ(2)),U,2)
I X'="" S ^PS(55,"AUDS",$E(X,1,30),DA(1),DA)=""
S X=$P($G(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($G(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($G(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($G(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($G(DIKZ(5)),U,6)
I X'="" ; I X S PSGAMSF=0 D ^PSGAMSA
S X=$P($G(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($G(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($G(DIKZ(4)),U,1)
I X'="" X:'$D(PSGNVF) "S PSGAL(""C"")=""VN"" D ^PSGAL5" K PSGNVF,PSGAL
S X=$P($G(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($G(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($G(DIKZ(4)),U,3)
I X'="" X:'$D(PSGNVF) "S PSGAL(""C"")=""VP"" D ^PSGAL5" K PSGNVF,PSGAL
S X=$P($G(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($G(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($G(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($G(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($G(DIKZ(4)),U,8)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(22))#2 KILL^PSGAL5:PSGAL(22)=X K PSGAL
S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X=$P($G(DIKZ(0)),U,17)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(23))#2 KILL^PSGAL5:PSGAL(23)=X K PSGAL
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X=$P($G(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($G(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($G(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($G(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 DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X=$P($G(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($G(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($G(DIKZ(0)),U,9)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(28))#2 KILL^PSGAL5:PSGAL(28)=X K PSGAL
S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
S X=$P($G(DIKZ(5)),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(51))#2 KILL^PSGAL5:PSGAL(51)=X K PSGAL
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X=$P($G(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($G(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($G(DIKZ(2)),U,4)
I X'="" S ^PS(55,"AUD",+(X),DA(1),DA)=""
S X=$P($G(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($G(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($G(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($G(DIKZ(5)),U,5)
I X'="" ; I X S PSGAMSF=2 D ^PSGAMSA
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X=$P($G(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($G(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($G(DIKZ(2)),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(57))#2 KILL^PSGAL5:PSGAL(57)=X K PSGAL
S DIKZ(4)=$G(^PS(55,DA(1),5,DA,4))
S X=$P($G(DIKZ(4)),U,15)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(58)) KILL^PSGAL5:PSGAL(58)=X K PSGAL
S X=$P($G(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($G(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($G(DIKZ(4)),U,12)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(63)) KILL^PSGAL5:PSGAL(63)=X K PSGAL
S X=$P($G(DIKZ(4)),U,13)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(64)) KILL^PSGAL5:PSGAL(64)=X K PSGAL
S X=$P($G(DIKZ(4)),U,14)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(65)) KILL^PSGAL5:PSGAL(65)=X K PSGAL
S X=$P($G(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($G(DIKZ(4)),U,9)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(66)) KILL^PSGAL5:PSGAL(66)=X K PSGAL
S X=$P($G(DIKZ(4)),U,9)
I X'="" K:X ^PS(55,"APV",DA(1),DA) S:'X ^PS(55,"APV",DA(1),DA)=""
S X=$P($G(DIKZ(4)),U,10)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(67)) KILL^PSGAL5:PSGAL(67)=X K PSGAL
S X=$P($G(DIKZ(4)),U,10)
I X'="" K:X ^PS(55,"ANV",DA(1),DA) S:'X ^PS(55,"APV",DA(1),DA)=""
S DIKZ(7)=$G(^PS(55,DA(1),5,DA,7))
S X=$P($G(DIKZ(7)),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(68)) KILL^PSGAL5:PSGAL(68)=X K PSGAL
S X=$P($G(DIKZ(7)),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(69)) KILL^PSGAL5:PSGAL(69)=X K PSGAL
S DIKZ(5)=$G(^PS(55,DA(1),5,DA,5))
S X=$P($G(DIKZ(5)),U,7)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(70)) KILL^PSGAL5:PSGAL(70)=X K PSGAL
S X=$P($G(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($G(DIKZ(5)),U,8)
I X'="" ; I '$D(DIU(0)),X S PSGAMSF=0 D ^PSGAMSA
S DIKZ(4)=$G(^PS(55,DA(1),5,DA,4))
S X=$P($G(DIKZ(4)),U,18)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(71)) KILL^PSGAL5:PSGAL(71)=X K PSGAL
S X=$P($G(DIKZ(4)),U,19)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(72)) KILL^PSGAL5:PSGAL(72)=X K PSGAL
S X=$P($G(DIKZ(4)),U,20)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(73)) KILL^PSGAL5:PSGAL(73)=X K PSGAL
S X=$P($G(DIKZ(4)),U,21)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(74)) KILL^PSGAL5:PSGAL(74)=X K PSGAL
S X=$P($G(DIKZ(4)),U,22)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(75)) KILL^PSGAL5:PSGAL(75)=X K PSGAL
S X=$P($G(DIKZ(4)),U,23)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(76)) KILL^PSGAL5:PSGAL(76)=X K PSGAL
S X=$P($G(DIKZ(4)),U,24)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(77)) KILL^PSGAL5:PSGAL(77)=X K PSGAL
S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X=$P($G(DIKZ(0)),U,20)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(79)) KILL^PSGAL5:PSGAL(79)=X K PSGAL
S X=$P($G(DIKZ(0)),U,20)
I X'="" S ^PS(55,"AUDDD",$E(X,1,30),DA(1),DA)=""
S DIKZ(6.5)=$G(^PS(55,DA(1),5,DA,6.5))
S X=$P($G(DIKZ(6.5)),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(78)) KILL^PSGAL5:PSGAL(78)=X K PSGAL
S X=$P($G(DIKZ(0)),U,21)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(80)) KILL^PSGAL5:PSGAL(80)=X K PSGAL
S X=$P($G(DIKZ(0)),U,21)
I X'="" D STOREINT^PSGSICH1
S DIKZ(.1)=$G(^PS(55,DA(1),5,DA,.1))
S X=$P($G(DIKZ(.1)),U,1)
I X'="" S ^PS(55,DA(1),5,"C",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(.1)),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(101)) KILL^PSGAL5:PSGAL(101)=X K PSGAL
S X=$P($G(DIKZ(.1)),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(102)) KILL^PSGAL5:PSGAL(102)=X K PSGAL
S X=$P($G(DIKZ(0)),U,24)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(103)) KILL^PSGAL5:PSGAL(103)=X K PSGAL
S X=$P($G(DIKZ(0)),U,25)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(104)) KILL^PSGAL5:PSGAL(104)=X K PSGAL
S X=$P($G(DIKZ(0)),U,26)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(105)) KILL^PSGAL5:PSGAL(105)=X K PSGAL
S X=$P($G(DIKZ(.1)),U,3)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(106)) KILL^PSGAL5:PSGAL(106)=X K PSGAL
S X=$P($G(DIKZ(0)),U,27)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(107)) KILL^PSGAL5:PSGAL(107)=X K PSGAL
CR1 S DIXR=414
K X
S DIKZ(.2)=$G(^PS(55,DA(1),5,DA,.2))
S X(1)=$P(DIKZ(.2),U,8)
S X(2)=$P(DIKZ(0),U,21)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. N DIKXARR M DIKXARR=X S DIKCOND=1
. S X=1
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. S ^PS(55,"ACX",$E(X(1),1,30),$E(X(2),1,30),DA_"U")=""
CR2 S DIXR=465
K X
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X(1)=$P(DIKZ(2),U,2)
S X(2)=$P(DIKZ(2),U,4)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. N DIKXARR M DIKXARR=X S DIKCOND=1
. S X=$$PATCH^XPDUTL("PXRM*1.5*12")
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. D SPSPA^PSJXRFS(.X,.DA,"UD")
CR3 S DIXR=499
K X
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X(1)=$P(DIKZ(2),U,4)
S DIKZ(8)=$G(^PS(55,DA(1),5,DA,8))
S X(2)=$P(DIKZ(8),U,1)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. S ^PS(55,"AUDC",$E(X(1),1,20),$E(X(2),1,20),DA(1),DA)=""
CR4 S DIXR=501
K X
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X(1)=$P(DIKZ(2),U,4)
S DIKZ(8)=$G(^PS(55,DA(1),5,DA,8))
S X(2)=$P(DIKZ(8),U,1)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. S ^PS(55,DA(1),5,"AUN",X(1),X(2),DA)=""
CR5 S DIXR=1120
K X
S DIKZ(8)=$G(^PS(55,DA(1),5,DA,8))
S X(1)=$P(DIKZ(8),U,1)
S X=$G(X(1))
I $G(X(1))]"" D
. K X1,X2 M X1=X,X2=X
. N DIKXARR M DIKXARR=X S DIKCOND=1
. S X=$$GET1^DIQ(44,X2(1),2802,"I") I X
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. S ^PS(55,"CIMOCLU",X,DA(1),DA)=""
CR6 S DIXR=1121
K X
S DIKZ(0)=$G(^PS(55,DA(1),5,DA,0))
S X(1)=$P(DIKZ(0),U,15)
S DIKZ(8)=$G(^PS(55,DA(1),5,DA,8))
S X(2)=$P(DIKZ(8),U,1)
S DIKZ(2)=$G(^PS(55,DA(1),5,DA,2))
S X(3)=$P(DIKZ(2),U,4)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"",$G(X(3))]"" D
. K X1,X2 M X1=X,X2=X
. N DIKXARR M DIKXARR=X S DIKCOND=1
. S X=$$CHECK^PSJIMO1() I X
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. S ^PS(55,"CIMOU",X(1),X(2),X(3),DA(1),DA)=""
CR7 S DIXR=1216
K X
S DIKZ(2.1)=$G(^PS(55,DA(1),5,DA,2.1))
S X(1)=$P(DIKZ(2.1),U,1)
S X(2)=$P(DIKZ(2.1),U,3)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. I '$D(DIU(0)) D:$D(PSGAL(56))#2 KILL^PSGAL5:PSGAL(56)=X S:(X1(2)=-1) (PSGAL(56),X)=0,PSGAL("C")=6000,PSGALFF=137 D:(X1(2)=-1) ^PSGAL5 K PSGAL
CR8 K X
G:'$D(DIKLM) A Q:$D(DISET)
END G ^PSSJXR30
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSJXR29 12774 printed Oct 16, 2024@18:33:16 Page 2
PSSJXR29 ; COMPILED XREF FOR FILE #55.06 ; 10/05/22
+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($GET(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($GET(DIKZ(0)),U,1)
+5 IF X'=""
SET ^PS(55,DA(1),5,"B",$EXTRACT(X,1,30),DA)=""
+6 SET X=$PIECE($GET(DIKZ(0)),U,1)
+7 IF X'=""
IF '$DATA(DIU(0))
SET ^PS(55,"AUE",DA(1),DA)=""
+8 SET X=$PIECE($GET(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($GET(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($GET(DIKZ(0)),U,2)
+13 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(3))#2
if PSGAL(3)=X
DO KILL^PSGAL5
KILL PSGAL
+14 SET X=$PIECE($GET(DIKZ(0)),U,2)
+15 IF X'=""
IF $SELECT('$DATA(^PS(55,DA(1),5.1)):1,1:$PIECE(^(5.1),"^",2)'=X)
SET $PIECE(^(5.1),"^",2)=X
+16 SET X=$PIECE($GET(DIKZ(0)),U,3)
+17 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(4))#2
if PSGAL(4)=X
DO KILL^PSGAL5
KILL PSGAL
+18 SET X=$PIECE($GET(DIKZ(0)),U,4)
+19 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(5))#2
if PSGAL(5)=X
DO KILL^PSGAL5
KILL PSGAL
+20 SET X=$PIECE($GET(DIKZ(0)),U,5)
+21 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(6))#2
if PSGAL(6)=X
DO KILL^PSGAL5
KILL PSGAL
+22 SET X=$PIECE($GET(DIKZ(0)),U,5)
+23 IF X'=""
Begin DoDot:1
+24 NEW DIK,DIV,DIU,DIN
+25 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
+26 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+27 SET X=$PIECE($GET(DIKZ(0)),U,6)
+28 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(7))#2
if PSGAL(7)=X
DO KILL^PSGAL5
KILL PSGAL
+29 SET X=$PIECE($GET(DIKZ(0)),U,7)
+30 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(8))#2
if PSGAL(8)=X
DO KILL^PSGAL5
KILL PSGAL
+31 SET X=$PIECE($GET(DIKZ(0)),U,7)
+32 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)=""
+33 SET DIKZ(6)=$GET(^PS(55,DA(1),5,DA,6))
+34 SET X=$PIECE($GET(DIKZ(6)),U,1)
+35 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(9))#2
if PSGAL(9)=X
DO KILL^PSGAL5
KILL PSGAL
+36 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+37 SET X=$PIECE($GET(DIKZ(2)),U,2)
+38 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(41))#2
if PSGAL(41)=X
DO KILL^PSGAL5
KILL PSGAL
+39 SET X=$PIECE($GET(DIKZ(2)),U,2)
+40 IF X'=""
SET ^PS(55,"AUDS",$EXTRACT(X,1,30),DA(1),DA)=""
+41 SET X=$PIECE($GET(DIKZ(0)),U,10)
+42 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(11))#2
if PSGAL(11)=X
DO KILL^PSGAL5
KILL PSGAL
+43 SET X=$PIECE($GET(DIKZ(0)),U,11)
+44 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(12))#2
if PSGAL(12)=X
DO KILL^PSGAL5
KILL PSGAL
+45 SET X=$PIECE($GET(DIKZ(0)),U,12)
+46 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(13))#2
if PSGAL(13)=X
DO KILL^PSGAL5
KILL PSGAL
+47 SET DIKZ(5)=$GET(^PS(55,DA(1),5,DA,5))
+48 SET X=$PIECE($GET(DIKZ(5)),U,6)
+49 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(14))#2
if PSGAL(14)=X
DO KILL^PSGAL5
KILL PSGAL
+50 SET X=$PIECE($GET(DIKZ(5)),U,6)
+51 ; I X S PSGAMSF=0 D ^PSGAMSA
IF X'=""
+52 SET X=$PIECE($GET(DIKZ(5)),U,6)
+53 IF X'=""
Begin DoDot:1
+54 NEW DIK,DIV,DIU,DIN
+55 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
+56 SET DIKZ(4)=$GET(^PS(55,DA(1),5,DA,4))
+57 SET X=$PIECE($GET(DIKZ(4)),U,1)
+58 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(15))#2
if PSGAL(15)=X
DO KILL^PSGAL5
KILL PSGAL
+59 SET X=$PIECE($GET(DIKZ(4)),U,1)
+60 IF X'=""
if '$DATA(PSGNVF)
XECUTE "S PSGAL(""C"")=""VN"" D ^PSGAL5"
KILL PSGNVF,PSGAL
+61 SET X=$PIECE($GET(DIKZ(4)),U,2)
+62 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(16))#2
if PSGAL(16)=X
DO KILL^PSGAL5
KILL PSGAL
+63 SET X=$PIECE($GET(DIKZ(4)),U,3)
+64 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(17))#2
if PSGAL(17)=X
DO KILL^PSGAL5
KILL PSGAL
+65 SET X=$PIECE($GET(DIKZ(4)),U,3)
+66 IF X'=""
if '$DATA(PSGNVF)
XECUTE "S PSGAL(""C"")=""VP"" D ^PSGAL5"
KILL PSGNVF,PSGAL
+67 SET X=$PIECE($GET(DIKZ(4)),U,4)
+68 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(18))#2
if PSGAL(18)=X
DO KILL^PSGAL5
KILL PSGAL
+69 SET X=$PIECE($GET(DIKZ(4)),U,5)
+70 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(19))#2
if PSGAL(19)=X
DO KILL^PSGAL5
KILL PSGAL
+71 SET X=$PIECE($GET(DIKZ(4)),U,6)
+72 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(20))#2
if PSGAL(20)=X
DO KILL^PSGAL5
KILL PSGAL
+73 SET X=$PIECE($GET(DIKZ(4)),U,7)
+74 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(21))#2
if PSGAL(21)=X
DO KILL^PSGAL5
KILL PSGAL
+75 SET X=$PIECE($GET(DIKZ(4)),U,8)
+76 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(22))#2
if PSGAL(22)=X
DO KILL^PSGAL5
KILL PSGAL
+77 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+78 SET X=$PIECE($GET(DIKZ(0)),U,17)
+79 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(23))#2
if PSGAL(23)=X
DO KILL^PSGAL5
KILL PSGAL
+80 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+81 SET X=$PIECE($GET(DIKZ(2)),U,3)
+82 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(24))#2
if PSGAL(24)=X
DO KILL^PSGAL5
KILL PSGAL
+83 SET X=$PIECE($GET(DIKZ(2)),U,1)
+84 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(43))#2
if PSGAL(43)=X
DO KILL^PSGAL5
KILL PSGAL
+85 SET X=$PIECE($GET(DIKZ(2)),U,1)
+86 IF X'=""
Begin DoDot:1
+87 NEW DIK,DIV,DIU,DIN
+88 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
+89 SET X=$PIECE($GET(DIKZ(2)),U,1)
+90 IF X'=""
Begin DoDot:1
+91 NEW DIK,DIV,DIU,DIN
+92 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
+93 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+94 SET X=$PIECE($GET(DIKZ(0)),U,14)
+95 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(26))#2
if PSGAL(26)=X
DO KILL^PSGAL5
KILL PSGAL
+96 SET X=$PIECE($GET(DIKZ(0)),U,16)
+97 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(27))#2
if PSGAL(27)=X
DO KILL^PSGAL5
KILL PSGAL
+98 SET X=$PIECE($GET(DIKZ(0)),U,9)
+99 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(28))#2
if PSGAL(28)=X
DO KILL^PSGAL5
KILL PSGAL
+100 SET DIKZ(5)=$GET(^PS(55,DA(1),5,DA,5))
+101 SET X=$PIECE($GET(DIKZ(5)),U,2)
+102 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(51))#2
if PSGAL(51)=X
DO KILL^PSGAL5
KILL PSGAL
+103 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+104 SET X=$PIECE($GET(DIKZ(2)),U,4)
+105 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)=""
+106 SET X=$PIECE($GET(DIKZ(2)),U,4)
+107 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(53))#2
if PSGAL(53)=X
DO KILL^PSGAL5
KILL PSGAL
+108 SET X=$PIECE($GET(DIKZ(2)),U,4)
+109 IF X'=""
SET ^PS(55,"AUD",+(X),DA(1),DA)=""
+110 SET X=$PIECE($GET(DIKZ(5)),U,4)
+111 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(61))#2
if PSGAL(61)=X
DO KILL^PSGAL5
KILL PSGAL
+112 SET X=$PIECE($GET(DIKZ(5)),U,3)
+113 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(54))#2
if PSGAL(54)=X
DO KILL^PSGAL5
KILL PSGAL
+114 SET X=$PIECE($GET(DIKZ(5)),U,5)
+115 IF X'=""
Begin DoDot:1
+116 NEW DIK,DIV,DIU,DIN
+117 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
+118 SET X=$PIECE($GET(DIKZ(5)),U,5)
+119 ; I X S PSGAMSF=2 D ^PSGAMSA
IF X'=""
+120 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+121 SET X=$PIECE($GET(DIKZ(2)),U,5)
+122 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(56))#2
if PSGAL(56)=X
DO KILL^PSGAL5
KILL PSGAL
+123 SET X=$PIECE($GET(DIKZ(2)),U,5)
+124 IF X'=""
IF $PIECE($GET(^PS(55,DA(1),5,DA,2)),"^")["@"
SET $PIECE(^(2),"^")=$PIECE($PIECE(^(2),"^"),"@")_"@"_X
+125 SET X=$PIECE($GET(DIKZ(2)),U,6)
+126 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(57))#2
if PSGAL(57)=X
DO KILL^PSGAL5
KILL PSGAL
+127 SET DIKZ(4)=$GET(^PS(55,DA(1),5,DA,4))
+128 SET X=$PIECE($GET(DIKZ(4)),U,15)
+129 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(58))
if PSGAL(58)=X
DO KILL^PSGAL5
KILL PSGAL
+130 SET X=$PIECE($GET(DIKZ(4)),U,16)
+131 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(59))#2
if PSGAL(59)=X
DO KILL^PSGAL5
KILL PSGAL
+132 SET X=$PIECE($GET(DIKZ(4)),U,17)
+133 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(60))#2
if PSGAL(60)=X
DO KILL^PSGAL5
KILL PSGAL
+134 SET X=$PIECE($GET(DIKZ(4)),U,12)
+135 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(63))
if PSGAL(63)=X
DO KILL^PSGAL5
KILL PSGAL
+136 SET X=$PIECE($GET(DIKZ(4)),U,13)
+137 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(64))
if PSGAL(64)=X
DO KILL^PSGAL5
KILL PSGAL
+138 SET X=$PIECE($GET(DIKZ(4)),U,14)
+139 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(65))
if PSGAL(65)=X
DO KILL^PSGAL5
KILL PSGAL
+140 SET X=$PIECE($GET(DIKZ(4)),U,11)
+141 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(62))#2
if PSGAL(62)=X
DO KILL^PSGAL5
KILL PSGAL
+142 SET X=$PIECE($GET(DIKZ(4)),U,9)
+143 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(66))
if PSGAL(66)=X
DO KILL^PSGAL5
KILL PSGAL
+144 SET X=$PIECE($GET(DIKZ(4)),U,9)
+145 IF X'=""
if X
KILL ^PS(55,"APV",DA(1),DA)
if 'X
SET ^PS(55,"APV",DA(1),DA)=""
+146 SET X=$PIECE($GET(DIKZ(4)),U,10)
+147 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(67))
if PSGAL(67)=X
DO KILL^PSGAL5
KILL PSGAL
+148 SET X=$PIECE($GET(DIKZ(4)),U,10)
+149 IF X'=""
if X
KILL ^PS(55,"ANV",DA(1),DA)
if 'X
SET ^PS(55,"APV",DA(1),DA)=""
+150 SET DIKZ(7)=$GET(^PS(55,DA(1),5,DA,7))
+151 SET X=$PIECE($GET(DIKZ(7)),U,1)
+152 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(68))
if PSGAL(68)=X
DO KILL^PSGAL5
KILL PSGAL
+153 SET X=$PIECE($GET(DIKZ(7)),U,2)
+154 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(69))
if PSGAL(69)=X
DO KILL^PSGAL5
KILL PSGAL
+155 SET DIKZ(5)=$GET(^PS(55,DA(1),5,DA,5))
+156 SET X=$PIECE($GET(DIKZ(5)),U,7)
+157 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(70))
if PSGAL(70)=X
DO KILL^PSGAL5
KILL PSGAL
+158 SET X=$PIECE($GET(DIKZ(5)),U,8)
+159 IF X'=""
Begin DoDot:1
+160 NEW DIK,DIV,DIU,DIN
+161 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
+162 SET X=$PIECE($GET(DIKZ(5)),U,8)
+163 ; I '$D(DIU(0)),X S PSGAMSF=0 D ^PSGAMSA
IF X'=""
+164 SET DIKZ(4)=$GET(^PS(55,DA(1),5,DA,4))
+165 SET X=$PIECE($GET(DIKZ(4)),U,18)
+166 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(71))
if PSGAL(71)=X
DO KILL^PSGAL5
KILL PSGAL
+167 SET X=$PIECE($GET(DIKZ(4)),U,19)
+168 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(72))
if PSGAL(72)=X
DO KILL^PSGAL5
KILL PSGAL
+169 SET X=$PIECE($GET(DIKZ(4)),U,20)
+170 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(73))
if PSGAL(73)=X
DO KILL^PSGAL5
KILL PSGAL
+171 SET X=$PIECE($GET(DIKZ(4)),U,21)
+172 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(74))
if PSGAL(74)=X
DO KILL^PSGAL5
KILL PSGAL
+173 SET X=$PIECE($GET(DIKZ(4)),U,22)
+174 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(75))
if PSGAL(75)=X
DO KILL^PSGAL5
KILL PSGAL
+175 SET X=$PIECE($GET(DIKZ(4)),U,23)
+176 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(76))
if PSGAL(76)=X
DO KILL^PSGAL5
KILL PSGAL
+177 SET X=$PIECE($GET(DIKZ(4)),U,24)
+178 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(77))
if PSGAL(77)=X
DO KILL^PSGAL5
KILL PSGAL
+179 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+180 SET X=$PIECE($GET(DIKZ(0)),U,20)
+181 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(79))
if PSGAL(79)=X
DO KILL^PSGAL5
KILL PSGAL
+182 SET X=$PIECE($GET(DIKZ(0)),U,20)
+183 IF X'=""
SET ^PS(55,"AUDDD",$EXTRACT(X,1,30),DA(1),DA)=""
+184 SET DIKZ(6.5)=$GET(^PS(55,DA(1),5,DA,6.5))
+185 SET X=$PIECE($GET(DIKZ(6.5)),U,1)
+186 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(78))
if PSGAL(78)=X
DO KILL^PSGAL5
KILL PSGAL
+187 SET X=$PIECE($GET(DIKZ(0)),U,21)
+188 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(80))
if PSGAL(80)=X
DO KILL^PSGAL5
KILL PSGAL
+189 SET X=$PIECE($GET(DIKZ(0)),U,21)
+190 IF X'=""
DO STOREINT^PSGSICH1
+191 SET DIKZ(.1)=$GET(^PS(55,DA(1),5,DA,.1))
+192 SET X=$PIECE($GET(DIKZ(.1)),U,1)
+193 IF X'=""
SET ^PS(55,DA(1),5,"C",$EXTRACT(X,1,30),DA)=""
+194 SET X=$PIECE($GET(DIKZ(.1)),U,1)
+195 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(101))
if PSGAL(101)=X
DO KILL^PSGAL5
KILL PSGAL
+196 SET X=$PIECE($GET(DIKZ(.1)),U,2)
+197 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(102))
if PSGAL(102)=X
DO KILL^PSGAL5
KILL PSGAL
+198 SET X=$PIECE($GET(DIKZ(0)),U,24)
+199 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(103))
if PSGAL(103)=X
DO KILL^PSGAL5
KILL PSGAL
+200 SET X=$PIECE($GET(DIKZ(0)),U,25)
+201 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(104))
if PSGAL(104)=X
DO KILL^PSGAL5
KILL PSGAL
+202 SET X=$PIECE($GET(DIKZ(0)),U,26)
+203 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(105))
if PSGAL(105)=X
DO KILL^PSGAL5
KILL PSGAL
+204 SET X=$PIECE($GET(DIKZ(.1)),U,3)
+205 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(106))
if PSGAL(106)=X
DO KILL^PSGAL5
KILL PSGAL
+206 SET X=$PIECE($GET(DIKZ(0)),U,27)
+207 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(107))
if PSGAL(107)=X
DO KILL^PSGAL5
KILL PSGAL
CR1 SET DIXR=414
+1 KILL X
+2 SET DIKZ(.2)=$GET(^PS(55,DA(1),5,DA,.2))
+3 SET X(1)=$PIECE(DIKZ(.2),U,8)
+4 SET X(2)=$PIECE(DIKZ(0),U,21)
+5 SET X=$GET(X(1))
+6 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+7 KILL X1,X2
MERGE X1=X,X2=X
+8 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+9 SET X=1
+10 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+11 if 'DIKCOND
QUIT
+12 SET ^PS(55,"ACX",$EXTRACT(X(1),1,30),$EXTRACT(X(2),1,30),DA_"U")=""
End DoDot:1
CR2 SET DIXR=465
+1 KILL X
+2 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+3 SET X(1)=$PIECE(DIKZ(2),U,2)
+4 SET X(2)=$PIECE(DIKZ(2),U,4)
+5 SET X=$GET(X(1))
+6 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+7 KILL X1,X2
MERGE X1=X,X2=X
+8 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+9 SET X=$$PATCH^XPDUTL("PXRM*1.5*12")
+10 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+11 if 'DIKCOND
QUIT
+12 DO SPSPA^PSJXRFS(.X,.DA,"UD")
End DoDot:1
CR3 SET DIXR=499
+1 KILL X
+2 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+3 SET X(1)=$PIECE(DIKZ(2),U,4)
+4 SET DIKZ(8)=$GET(^PS(55,DA(1),5,DA,8))
+5 SET X(2)=$PIECE(DIKZ(8),U,1)
+6 SET X=$GET(X(1))
+7 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+8 KILL X1,X2
MERGE X1=X,X2=X
+9 SET ^PS(55,"AUDC",$EXTRACT(X(1),1,20),$EXTRACT(X(2),1,20),DA(1),DA)=""
End DoDot:1
CR4 SET DIXR=501
+1 KILL X
+2 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+3 SET X(1)=$PIECE(DIKZ(2),U,4)
+4 SET DIKZ(8)=$GET(^PS(55,DA(1),5,DA,8))
+5 SET X(2)=$PIECE(DIKZ(8),U,1)
+6 SET X=$GET(X(1))
+7 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+8 KILL X1,X2
MERGE X1=X,X2=X
+9 SET ^PS(55,DA(1),5,"AUN",X(1),X(2),DA)=""
End DoDot:1
CR5 SET DIXR=1120
+1 KILL X
+2 SET DIKZ(8)=$GET(^PS(55,DA(1),5,DA,8))
+3 SET X(1)=$PIECE(DIKZ(8),U,1)
+4 SET X=$GET(X(1))
+5 IF $GET(X(1))]""
Begin DoDot:1
+6 KILL X1,X2
MERGE X1=X,X2=X
+7 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+8 SET X=$$GET1^DIQ(44,X2(1),2802,"I")
IF X
+9 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+10 if 'DIKCOND
QUIT
+11 SET ^PS(55,"CIMOCLU",X,DA(1),DA)=""
End DoDot:1
CR6 SET DIXR=1121
+1 KILL X
+2 SET DIKZ(0)=$GET(^PS(55,DA(1),5,DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,15)
+4 SET DIKZ(8)=$GET(^PS(55,DA(1),5,DA,8))
+5 SET X(2)=$PIECE(DIKZ(8),U,1)
+6 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+7 SET X(3)=$PIECE(DIKZ(2),U,4)
+8 SET X=$GET(X(1))
+9 IF $GET(X(1))]""
IF $GET(X(2))]""
IF $GET(X(3))]""
Begin DoDot:1
+10 KILL X1,X2
MERGE X1=X,X2=X
+11 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+12 SET X=$$CHECK^PSJIMO1()
IF X
+13 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+14 if 'DIKCOND
QUIT
+15 SET ^PS(55,"CIMOU",X(1),X(2),X(3),DA(1),DA)=""
End DoDot:1
CR7 SET DIXR=1216
+1 KILL X
+2 SET DIKZ(2.1)=$GET(^PS(55,DA(1),5,DA,2.1))
+3 SET X(1)=$PIECE(DIKZ(2.1),U,1)
+4 SET X(2)=$PIECE(DIKZ(2.1),U,3)
+5 SET X=$GET(X(1))
+6 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+7 KILL X1,X2
MERGE X1=X,X2=X
+8 IF '$DATA(DIU(0))
if $DATA(PSGAL(56))#2
if PSGAL(56)=X
DO KILL^PSGAL5
if (X1(2)=-1)
SET (PSGAL(56),X)=0
SET PSGAL("C")=6000
SET PSGALFF=137
if (X1(2)=-1)
DO ^PSGAL5
KILL PSGAL
End DoDot:1
CR8 KILL X
+1 if '$DATA(DIKLM)
GOTO A
if $DATA(DISET)
QUIT
END GOTO ^PSSJXR30