PSSJXR23 ; COMPILED XREF FOR FILE #55.01 ; 10/05/22
;
S DA(1)=DA 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),"IV",DA)) I DA'>0 S DA=0 G END
1 ;
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,1)
I X'="" S ^PS(55,DA(1),"IV","B",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,2)
I X'="" X ^DD(55.01,.02,1,1,1)
S X=$P($G(DIKZ(0)),U,2)
I X'="" S ^PS(55,"AIVS",$E(X,1,30),DA(1),DA)=""
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,3)
I X'="" S ^PS(55,"AIV",+$E(X,1,30),DA(1),DA)=""
S X=$P($G(DIKZ(0)),U,3)
I X'="" X ^DD(55.01,.03,1,2,1)
S X=$P($G(DIKZ(0)),U,3)
I X'="" S ^PS(55,DA(1),"IV","AIS",+X,DA)=""
S X=$P($G(DIKZ(0)),U,3)
I X'="" I $P($G(^PS(55,DA(1),"IV",DA,0)),U,4)]"" S ^PS(55,DA(1),"IV","AIT",$P(^(0),U,4),+X,DA)=""
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,4)
I X'="" X ^DD(55.01,.04,1,1,1)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,6)
I X'="" X ^DD(55.01,.06,1,1,1)
S X=$P($G(DIKZ(0)),U,6)
I X'="" I '$D(DIU(0)),$S($D(^PS(55,DA(1),5.1)):$P(^(5.1),"^",2)'=X,1:1) S $P(^(5.1),"^",2)=X
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,8)
I X'="" X ^DD(55.01,.08,1,1,1)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,9)
I X'="" X ^DD(55.01,.09,1,1,1)
S DIKZ(1)=$G(^PS(55,DA(1),"IV",DA,1))
S X=$P($G(DIKZ(1)),U,1)
I X'="" X ^DD(55.01,.1,1,1,1)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,11)
I X'="" X ^DD(55.01,.12,1,1,1)
S DIKZ(3)=$G(^PS(55,DA(1),"IV",DA,3))
S X=$P($G(DIKZ(3)),U,1)
I X'="" X ^DD(55.01,31,1,1,1)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X=$P($G(DIKZ(0)),U,17)
I X'="" X ^DD(55.01,100,1,1,1)
S X=$P($G(DIKZ(0)),U,17)
I X'="" I $D(DIU(0)) S:X="N" ^PS(55,"ANVO",DA(1),DA)=""
S X=$P($G(DIKZ(0)),U,17)
I X'="" S:X="D"&($D(^PS(55,DA(1),"IV",DA,"ADC"))) ^PS(55,"ADC",^PS(55,DA(1),"IV",DA,"ADC"),DA(1),DA)=""
S DIKZ(4)=$G(^PS(55,DA(1),"IV",DA,4))
S X=$P($G(DIKZ(4)),U,9)
I X'="" X ^DD(55.01,142,1,1,1)
S X=$P($G(DIKZ(4)),U,9)
I X'="" K:X ^PS(55,"APIV",DA(1),DA) S:'X ^PS(55,"APIV",DA(1),DA)=""
S DIKZ(4)=$G(^PS(55,DA(1),"IV",DA,4))
S X=$P($G(DIKZ(4)),U,10)
I X'="" X ^DD(55.01,143,1,1,1)
S X=$P($G(DIKZ(4)),U,10)
I X'="" K:X ^PS(55,"ANIV",DA(1),DA) S:'X ^PS(55,"ANIV",DA(1),DA)=""
CR1 S DIXR=415
K X
S DIKZ(.2)=$G(^PS(55,DA(1),"IV",DA,.2))
S X(1)=$P(DIKZ(.2),U,8)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
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_"V")=""
CR2 S DIXR=466
K X
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X(1)=$P(DIKZ(0),U,2)
S X(2)=$P(DIKZ(0),U,3)
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,"IV")
CR3 S DIXR=498
K X
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X(1)=$P(DIKZ(0),U,3)
S DIKZ("DSS")=$G(^PS(55,DA(1),"IV",DA,"DSS"))
S X(2)=$P(DIKZ("DSS"),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,"AIVC",$E(X(1),1,20),$E(X(2),1,20),DA(1),DA)=""
CR4 S DIXR=500
K X
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X(1)=$P(DIKZ(0),U,3)
S DIKZ("DSS")=$G(^PS(55,DA(1),"IV",DA,"DSS"))
S X(2)=$P(DIKZ("DSS"),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),"IV","AIN",X(1),X(2),DA)=""
CR5 S DIXR=809
K X
S DIKZ("DSS")=$G(^PS(55,DA(1),"IV",DA,"DSS"))
S X(1)=$P(DIKZ("DSS"),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=$$CHECK2^PSJIMO1() I X
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. S ^PS(55,"CIMOCLI",X,DA(1),DA)=""
CR6 S DIXR=1122
K X
S DIKZ("DSS")=$G(^PS(55,DA(1),"IV",DA,"DSS"))
S X(1)=$P(DIKZ("DSS"),U,1)
S DIKZ(0)=$G(^PS(55,DA(1),"IV",DA,0))
S X(2)=$P(DIKZ(0),U,3)
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=$$CHECK2^PSJIMO1() I X
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. S ^PS(55,DA(1),"IV","CIMOI",X(1),X(2),DA)=""
CR7 K X
G:'$D(DIKLM) A Q:$D(DISET)
END G ^PSSJXR24
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSJXR23 4416 printed Nov 22, 2024@17:42:29 Page 2
PSSJXR23 ; COMPILED XREF FOR FILE #55.01 ; 10/05/22
+1 ;
+2 SET DA(1)=DA
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),"IV",DA))
IF DA'>0
SET DA=0
GOTO END
1 ;
+1 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+2 SET X=$PIECE($GET(DIKZ(0)),U,1)
+3 IF X'=""
SET ^PS(55,DA(1),"IV","B",$EXTRACT(X,1,30),DA)=""
+4 SET X=$PIECE($GET(DIKZ(0)),U,2)
+5 IF X'=""
XECUTE ^DD(55.01,.02,1,1,1)
+6 SET X=$PIECE($GET(DIKZ(0)),U,2)
+7 IF X'=""
SET ^PS(55,"AIVS",$EXTRACT(X,1,30),DA(1),DA)=""
+8 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+9 SET X=$PIECE($GET(DIKZ(0)),U,3)
+10 IF X'=""
SET ^PS(55,"AIV",+$EXTRACT(X,1,30),DA(1),DA)=""
+11 SET X=$PIECE($GET(DIKZ(0)),U,3)
+12 IF X'=""
XECUTE ^DD(55.01,.03,1,2,1)
+13 SET X=$PIECE($GET(DIKZ(0)),U,3)
+14 IF X'=""
SET ^PS(55,DA(1),"IV","AIS",+X,DA)=""
+15 SET X=$PIECE($GET(DIKZ(0)),U,3)
+16 IF X'=""
IF $PIECE($GET(^PS(55,DA(1),"IV",DA,0)),U,4)]""
SET ^PS(55,DA(1),"IV","AIT",$PIECE(^(0),U,4),+X,DA)=""
+17 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+18 SET X=$PIECE($GET(DIKZ(0)),U,4)
+19 IF X'=""
XECUTE ^DD(55.01,.04,1,1,1)
+20 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+21 SET X=$PIECE($GET(DIKZ(0)),U,6)
+22 IF X'=""
XECUTE ^DD(55.01,.06,1,1,1)
+23 SET X=$PIECE($GET(DIKZ(0)),U,6)
+24 IF X'=""
IF '$DATA(DIU(0))
IF $SELECT($DATA(^PS(55,DA(1),5.1)):$PIECE(^(5.1),"^",2)'=X,1:1)
SET $PIECE(^(5.1),"^",2)=X
+25 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+26 SET X=$PIECE($GET(DIKZ(0)),U,8)
+27 IF X'=""
XECUTE ^DD(55.01,.08,1,1,1)
+28 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+29 SET X=$PIECE($GET(DIKZ(0)),U,9)
+30 IF X'=""
XECUTE ^DD(55.01,.09,1,1,1)
+31 SET DIKZ(1)=$GET(^PS(55,DA(1),"IV",DA,1))
+32 SET X=$PIECE($GET(DIKZ(1)),U,1)
+33 IF X'=""
XECUTE ^DD(55.01,.1,1,1,1)
+34 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+35 SET X=$PIECE($GET(DIKZ(0)),U,11)
+36 IF X'=""
XECUTE ^DD(55.01,.12,1,1,1)
+37 SET DIKZ(3)=$GET(^PS(55,DA(1),"IV",DA,3))
+38 SET X=$PIECE($GET(DIKZ(3)),U,1)
+39 IF X'=""
XECUTE ^DD(55.01,31,1,1,1)
+40 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+41 SET X=$PIECE($GET(DIKZ(0)),U,17)
+42 IF X'=""
XECUTE ^DD(55.01,100,1,1,1)
+43 SET X=$PIECE($GET(DIKZ(0)),U,17)
+44 IF X'=""
IF $DATA(DIU(0))
if X="N"
SET ^PS(55,"ANVO",DA(1),DA)=""
+45 SET X=$PIECE($GET(DIKZ(0)),U,17)
+46 IF X'=""
if X="D"&($DATA(^PS(55,DA(1),"IV",DA,"ADC")))
SET ^PS(55,"ADC",^PS(55,DA(1),"IV",DA,"ADC"),DA(1),DA)=""
+47 SET DIKZ(4)=$GET(^PS(55,DA(1),"IV",DA,4))
+48 SET X=$PIECE($GET(DIKZ(4)),U,9)
+49 IF X'=""
XECUTE ^DD(55.01,142,1,1,1)
+50 SET X=$PIECE($GET(DIKZ(4)),U,9)
+51 IF X'=""
if X
KILL ^PS(55,"APIV",DA(1),DA)
if 'X
SET ^PS(55,"APIV",DA(1),DA)=""
+52 SET DIKZ(4)=$GET(^PS(55,DA(1),"IV",DA,4))
+53 SET X=$PIECE($GET(DIKZ(4)),U,10)
+54 IF X'=""
XECUTE ^DD(55.01,143,1,1,1)
+55 SET X=$PIECE($GET(DIKZ(4)),U,10)
+56 IF X'=""
if X
KILL ^PS(55,"ANIV",DA(1),DA)
if 'X
SET ^PS(55,"ANIV",DA(1),DA)=""
CR1 SET DIXR=415
+1 KILL X
+2 SET DIKZ(.2)=$GET(^PS(55,DA(1),"IV",DA,.2))
+3 SET X(1)=$PIECE(DIKZ(.2),U,8)
+4 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+5 SET X(2)=$PIECE(DIKZ(0),U,21)
+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 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+10 SET X=1
+11 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+12 if 'DIKCOND
QUIT
+13 SET ^PS(55,"ACX",$EXTRACT(X(1),1,30),$EXTRACT(X(2),1,30),DA_"V")=""
End DoDot:1
CR2 SET DIXR=466
+1 KILL X
+2 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,2)
+4 SET X(2)=$PIECE(DIKZ(0),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 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,"IV")
End DoDot:1
CR3 SET DIXR=498
+1 KILL X
+2 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,3)
+4 SET DIKZ("DSS")=$GET(^PS(55,DA(1),"IV",DA,"DSS"))
+5 SET X(2)=$PIECE(DIKZ("DSS"),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,"AIVC",$EXTRACT(X(1),1,20),$EXTRACT(X(2),1,20),DA(1),DA)=""
End DoDot:1
CR4 SET DIXR=500
+1 KILL X
+2 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,3)
+4 SET DIKZ("DSS")=$GET(^PS(55,DA(1),"IV",DA,"DSS"))
+5 SET X(2)=$PIECE(DIKZ("DSS"),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),"IV","AIN",X(1),X(2),DA)=""
End DoDot:1
CR5 SET DIXR=809
+1 KILL X
+2 SET DIKZ("DSS")=$GET(^PS(55,DA(1),"IV",DA,"DSS"))
+3 SET X(1)=$PIECE(DIKZ("DSS"),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=$$CHECK2^PSJIMO1()
IF X
+9 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+10 if 'DIKCOND
QUIT
+11 SET ^PS(55,"CIMOCLI",X,DA(1),DA)=""
End DoDot:1
CR6 SET DIXR=1122
+1 KILL X
+2 SET DIKZ("DSS")=$GET(^PS(55,DA(1),"IV",DA,"DSS"))
+3 SET X(1)=$PIECE(DIKZ("DSS"),U,1)
+4 SET DIKZ(0)=$GET(^PS(55,DA(1),"IV",DA,0))
+5 SET X(2)=$PIECE(DIKZ(0),U,3)
+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 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+10 SET X=$$CHECK2^PSJIMO1()
IF X
+11 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+12 if 'DIKCOND
QUIT
+13 SET ^PS(55,DA(1),"IV","CIMOI",X(1),X(2),DA)=""
End DoDot:1
CR7 KILL X
+1 if '$DATA(DIKLM)
GOTO A
if $DATA(DISET)
QUIT
END GOTO ^PSSJXR24