PSSJXR34 ; COMPILED XREF FOR FILE #55.07 ; 10/05/22
;
S DA(1)=0 S DA=0
A1 ;
I $D(DISET) K DIKLM S:DIKM1=2 DIKLM=1 S:DIKM1'=2&'$G(DIKPUSH(2)) DIKPUSH(2)=1,DA(2)=DA(1),DA(1)=DA,DA=0 G @DIKM1
A S DA(1)=$O(^PS(55,DA(2),5,DA(1))) I DA(1)'>0 S DA(1)=0 G END
1 ;
B S DA=$O(^PS(55,DA(2),5,DA(1),1,DA)) I DA'>0 S DA=0 Q:DIKM1=1 G A
2 ;
S DIKZ(0)=$G(^PS(55,DA(2),5,DA(1),1,DA,0))
S X=$P($G(DIKZ(0)),U,1)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(701))#2 KILL^PSGAL5:PSGAL(701)=X K PSGAL
S X=$P($G(DIKZ(0)),U,1)
I X'="" S ^PS(55,DA(2),5,DA(1),1,"B",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,2)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(702))#2 KILL^PSGAL5:PSGAL(702)=X K PSGAL
S X=$P($G(DIKZ(0)),U,5)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(705))#2 KILL^PSGAL5:PSGAL(705)=X K PSGAL
S X=$P($G(DIKZ(0)),U,6)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(706))#2 KILL^PSGAL5:PSGAL(706)=X K PSGAL
S X=$P($G(DIKZ(0)),U,7)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(707))#2 KILL^PSGAL5:PSGAL(707)=X K PSGAL
S X=$P($G(DIKZ(0)),U,8)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",7),$P(^(0),"^",7)=DIU+X I $O(^DD(55.07,.07,1,0)) K DIV S (DIV(0),D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.07 D ^DICR
S X=$P($G(DIKZ(0)),U,8)
I X'="" I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,4)
S DIKZ(0)=$G(^PS(55,DA(2),5,DA(1),1,DA,0))
S X=$P($G(DIKZ(0)),U,9)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(709))#2 KILL^PSGAL5:PSGAL(709)=X K PSGAL
S X=$P($G(DIKZ(0)),U,9)
I X'="" I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,2)
S X=$P($G(DIKZ(0)),U,9)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",12) S $P(^(0),"^",12)=DIU+X I $O(^DD(55.07,.12,1,0)) K DIV S (DIV,D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.12 D ^DICR
S DIKZ(0)=$G(^PS(55,DA(2),5,DA(1),1,DA,0))
S X=$P($G(DIKZ(0)),U,10)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(710)) KILL^PSGAL5:PSGAL(710)=X K PSGAL
S X=$P($G(DIKZ(0)),U,11)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X S DIU=$P($G(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",10),$P(^(0),"^",10)=DIU+X I $O(^DD(55.07,.1,1,0)) K DIV S (DIV(0),D0)=DA(2),(DIV(1),D1)=DA(1),(DIV(2),D2)=DA,DIV=DIU+X,DIH=55.07,DIG=.1 D ^DICR
S X=$P($G(DIKZ(0)),U,11)
I X'="" I '$D(DIU(0)),X D EN^PSGAMSA(DA(2),DA(1),DA,3)
S DIKZ(0)=$G(^PS(55,DA(2),5,DA(1),1,DA,0))
S X=$P($G(DIKZ(0)),U,12)
I X'="" I '$D(DIU(0)) D:$D(PSGAL(712))#2 KILL^PSGAL5:PSGAL(712)=X K PSGAL
G:'$D(DIKLM) B Q:$D(DISET)
END G ^PSSJXR35
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSJXR34 2486 printed Sep 15, 2024@21:56:48 Page 2
PSSJXR34 ; COMPILED XREF FOR FILE #55.07 ; 10/05/22
+1 ;
+2 SET DA(1)=0
SET DA=0
A1 ;
+1 IF $DATA(DISET)
KILL DIKLM
if DIKM1=2
SET DIKLM=1
if DIKM1'=2&'$GET(DIKPUSH(2))
SET DIKPUSH(2)=1
SET DA(2)=DA(1)
SET DA(1)=DA
SET DA=0
GOTO @DIKM1
A SET DA(1)=$ORDER(^PS(55,DA(2),5,DA(1)))
IF DA(1)'>0
SET DA(1)=0
GOTO END
1 ;
B SET DA=$ORDER(^PS(55,DA(2),5,DA(1),1,DA))
IF DA'>0
SET DA=0
if DIKM1=1
QUIT
GOTO A
2 ;
+1 SET DIKZ(0)=$GET(^PS(55,DA(2),5,DA(1),1,DA,0))
+2 SET X=$PIECE($GET(DIKZ(0)),U,1)
+3 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(701))#2
if PSGAL(701)=X
DO KILL^PSGAL5
KILL PSGAL
+4 SET X=$PIECE($GET(DIKZ(0)),U,1)
+5 IF X'=""
SET ^PS(55,DA(2),5,DA(1),1,"B",$EXTRACT(X,1,30),DA)=""
+6 SET X=$PIECE($GET(DIKZ(0)),U,2)
+7 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(702))#2
if PSGAL(702)=X
DO KILL^PSGAL5
KILL PSGAL
+8 SET X=$PIECE($GET(DIKZ(0)),U,5)
+9 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(705))#2
if PSGAL(705)=X
DO KILL^PSGAL5
KILL PSGAL
+10 SET X=$PIECE($GET(DIKZ(0)),U,6)
+11 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(706))#2
if PSGAL(706)=X
DO KILL^PSGAL5
KILL PSGAL
+12 SET X=$PIECE($GET(DIKZ(0)),U,7)
+13 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(707))#2
if PSGAL(707)=X
DO KILL^PSGAL5
KILL PSGAL
+14 SET X=$PIECE($GET(DIKZ(0)),U,8)
+15 IF X'=""
Begin DoDot:1
+16 NEW DIK,DIV,DIU,DIN
+17 IF X
SET DIU=$PIECE($GET(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",7)
SET $PIECE(^(0),"^",7)=DIU+X
IF $ORDER(^DD(55.07,.07,1,0))
KILL DIV
SET (DIV(0),D0)=DA(2)
SET (DIV(1),D1)=DA(1)
SET (DIV(2),D2)=DA
SET DIV=DIU+X
SET DIH=55.07
SET DIG=.07
DO ^DICR
End DoDot:1
+18 SET X=$PIECE($GET(DIKZ(0)),U,8)
+19 IF X'=""
IF '$DATA(DIU(0))
IF X
DO EN^PSGAMSA(DA(2),DA(1),DA,4)
+20 SET DIKZ(0)=$GET(^PS(55,DA(2),5,DA(1),1,DA,0))
+21 SET X=$PIECE($GET(DIKZ(0)),U,9)
+22 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(709))#2
if PSGAL(709)=X
DO KILL^PSGAL5
KILL PSGAL
+23 SET X=$PIECE($GET(DIKZ(0)),U,9)
+24 IF X'=""
IF '$DATA(DIU(0))
IF X
DO EN^PSGAMSA(DA(2),DA(1),DA,2)
+25 SET X=$PIECE($GET(DIKZ(0)),U,9)
+26 IF X'=""
Begin DoDot:1
+27 NEW DIK,DIV,DIU,DIN
+28 IF X
SET DIU=$PIECE($GET(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",12)
SET $PIECE(^(0),"^",12)=DIU+X
IF $ORDER(^DD(55.07,.12,1,0))
KILL DIV
SET (DIV,D0)=DA(2)
SET (DIV(1),D1)=DA(1)
SET (DIV(2),D2)=DA
SET DIV=DIU+X
SET DIH=55.07
SET DIG=.12
DO ^DICR
End DoDot:1
+29 SET DIKZ(0)=$GET(^PS(55,DA(2),5,DA(1),1,DA,0))
+30 SET X=$PIECE($GET(DIKZ(0)),U,10)
+31 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(710))
if PSGAL(710)=X
DO KILL^PSGAL5
KILL PSGAL
+32 SET X=$PIECE($GET(DIKZ(0)),U,11)
+33 IF X'=""
Begin DoDot:1
+34 NEW DIK,DIV,DIU,DIN
+35 IF X
SET DIU=$PIECE($GET(^PS(55,DA(2),5,DA(1),1,DA,0)),"^",10)
SET $PIECE(^(0),"^",10)=DIU+X
IF $ORDER(^DD(55.07,.1,1,0))
KILL DIV
SET (DIV(0),D0)=DA(2)
SET (DIV(1),D1)=DA(1)
SET (DIV(2),D2)=DA
SET DIV=DIU+X
SET DIH=55.07
SET DIG=.1
DO ^DICR
End DoDot:1
+36 SET X=$PIECE($GET(DIKZ(0)),U,11)
+37 IF X'=""
IF '$DATA(DIU(0))
IF X
DO EN^PSGAMSA(DA(2),DA(1),DA,3)
+38 SET DIKZ(0)=$GET(^PS(55,DA(2),5,DA(1),1,DA,0))
+39 SET X=$PIECE($GET(DIKZ(0)),U,12)
+40 IF X'=""
IF '$DATA(DIU(0))
if $DATA(PSGAL(712))#2
if PSGAL(712)=X
DO KILL^PSGAL5
KILL PSGAL
+41 if '$DATA(DIKLM)
GOTO B
if $DATA(DISET)
QUIT
END GOTO ^PSSJXR35