PSJXR514 ; COMPILED XREF FOR FILE #55.06 ; 10/28/97
;
S DA=0
A1 ;
I $D(DISET) K DIKLM S:$D(DA(1)) DIKLM=1 G:$D(DA(1)) 1 S DA(1)=DA,DA=0 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,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(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)
G ^PSJXR515
END G END^PSJXR515
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSJXR514 4941 printed Dec 13, 2024@02:09:23 Page 2
PSJXR514 ; COMPILED XREF FOR FILE #55.06 ; 10/28/97
+1 ;
+2 SET DA=0
A1 ;
+1 IF $DATA(DISET)
KILL DIKLM
if $DATA(DA(1))
SET DIKLM=1
if $DATA(DA(1))
GOTO 1
SET DA(1)=DA
SET DA=0
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,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(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(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(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(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(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 X=$PIECE(DIKZ(0),U,6)
+27 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(7))#2
if PSGAL(7)=X
DO KILL^PSGAL5
KILL PSGAL
+28 SET X=$PIECE(DIKZ(0),U,7)
+29 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(8))#2
if PSGAL(8)=X
DO KILL^PSGAL5
KILL PSGAL
+30 SET X=$PIECE(DIKZ(0),U,7)
+31 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)=""
+32 SET DIKZ(6)=$GET(^PS(55,DA(1),5,DA,6))
+33 SET X=$PIECE(DIKZ(6),U,1)
+34 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(9))#2
if PSGAL(9)=X
DO KILL^PSGAL5
KILL PSGAL
+35 SET DIKZ(2)=$GET(^PS(55,DA(1),5,DA,2))
+36 SET X=$PIECE(DIKZ(2),U,2)
+37 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(41))#2
if PSGAL(41)=X
DO KILL^PSGAL5
KILL PSGAL
+38 SET X=$PIECE(DIKZ(0),U,10)
+39 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(11))#2
if PSGAL(11)=X
DO KILL^PSGAL5
KILL PSGAL
+40 SET X=$PIECE(DIKZ(0),U,11)
+41 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(12))#2
if PSGAL(12)=X
DO KILL^PSGAL5
KILL PSGAL
+42 SET X=$PIECE(DIKZ(0),U,12)
+43 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(13))#2
if PSGAL(13)=X
DO KILL^PSGAL5
KILL PSGAL
+44 SET DIKZ(5)=$GET(^PS(55,DA(1),5,DA,5))
+45 SET X=$PIECE(DIKZ(5),U,6)
+46 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(14))#2
if PSGAL(14)=X
DO KILL^PSGAL5
KILL PSGAL
+47 SET X=$PIECE(DIKZ(5),U,6)
+48 ; I X S PSGAMSF=0 D ^PSGAMSA
IF X'=""
+49 SET X=$PIECE(DIKZ(5),U,6)
+50 IF X'=""
Begin DoDot:1
+51 NEW DIK,DIV,DIU,DIN
+52 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
+53 SET DIKZ(4)=$GET(^PS(55,DA(1),5,DA,4))
+54 SET X=$PIECE(DIKZ(4),U,1)
+55 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(15))#2
if PSGAL(15)=X
DO KILL^PSGAL5
KILL PSGAL
+56 SET X=$PIECE(DIKZ(4),U,2)
+57 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(16))#2
if PSGAL(16)=X
DO KILL^PSGAL5
KILL PSGAL
+58 SET X=$PIECE(DIKZ(4),U,3)
+59 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(17))#2
if PSGAL(17)=X
DO KILL^PSGAL5
KILL PSGAL
+60 SET X=$PIECE(DIKZ(4),U,4)
+61 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(18))#2
if PSGAL(18)=X
DO KILL^PSGAL5
KILL PSGAL
+62 SET X=$PIECE(DIKZ(4),U,5)
+63 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(19))#2
if PSGAL(19)=X
DO KILL^PSGAL5
KILL PSGAL
+64 SET X=$PIECE(DIKZ(4),U,6)
+65 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(20))#2
if PSGAL(20)=X
DO KILL^PSGAL5
KILL PSGAL
+66 SET X=$PIECE(DIKZ(4),U,7)
+67 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(21))#2
if PSGAL(21)=X
DO KILL^PSGAL5
KILL PSGAL
+68 SET X=$PIECE(DIKZ(4),U,8)
+69 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(22))#2
if PSGAL(22)=X
DO KILL^PSGAL5
KILL PSGAL
+70 SET X=$PIECE(DIKZ(0),U,17)
+71 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(23))#2
if PSGAL(23)=X
DO KILL^PSGAL5
KILL PSGAL
+72 SET X=$PIECE(DIKZ(2),U,3)
+73 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(24))#2
if PSGAL(24)=X
DO KILL^PSGAL5
KILL PSGAL
+74 SET X=$PIECE(DIKZ(2),U,1)
+75 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(43))#2
if PSGAL(43)=X
DO KILL^PSGAL5
KILL PSGAL
+76 SET X=$PIECE(DIKZ(2),U,1)
+77 IF X'=""
Begin DoDot:1
+78 NEW DIK,DIV,DIU,DIN
+79 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
+80 SET X=$PIECE(DIKZ(2),U,1)
+81 IF X'=""
Begin DoDot:1
+82 NEW DIK,DIV,DIU,DIN
+83 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
+84 SET X=$PIECE(DIKZ(0),U,14)
+85 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(26))#2
if PSGAL(26)=X
DO KILL^PSGAL5
KILL PSGAL
+86 SET X=$PIECE(DIKZ(0),U,16)
+87 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(27))#2
if PSGAL(27)=X
DO KILL^PSGAL5
KILL PSGAL
+88 SET X=$PIECE(DIKZ(0),U,9)
+89 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(28))#2
if PSGAL(28)=X
DO KILL^PSGAL5
KILL PSGAL
+90 SET X=$PIECE(DIKZ(0),U,9)
+91 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
+92 SET X=$PIECE(DIKZ(5),U,2)
+93 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(51))#2
if PSGAL(51)=X
DO KILL^PSGAL5
KILL PSGAL
+94 SET X=$PIECE(DIKZ(2),U,4)
+95 GOTO ^PSJXR515
END GOTO END^PSJXR515