PSGXR37 ; COMPILED XREF FOR FILE #53.1 ; 08/08/13
;
S DIKZK=1
S DIKZ(0)=$G(^PS(53.1,DA,0))
S X=$P($G(DIKZ(0)),U,1)
I X'="" S ^PS(53.1,"B",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,15)
I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENNPS^PSGAXR
S X=$P($G(DIKZ(0)),U,2)
I X'="" I $P($G(^PS(53.1,DA,0)),"^",15),$D(^PS(55,+$P(^(0),U,15),0)),$P($G(^(5.1)),"^",2)'=X S $P(^(5.1),"^",2)=X
S X=$P($G(DIKZ(0)),U,5)
I X'="" D
.N DIK,DIV,DIU,DIN
.I 'X S DIU=$S($D(^PS(53.1,DA,0)):$P(^(0),"^",6),1:"") I DIU]"" S $P(^(0),"^",6)="" I $O(^DD(53.1,6,1,0)) K DIV S (DIV(0),D0)=DA,DIV="",DIH=53.1,DIG=6 D ^DICR K DIV
S DIKZ(0)=$G(^PS(53.1,DA,0))
S X=$P($G(DIKZ(0)),U,7)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X="OC" S DIU=$P($G(^PS(53.1,DA,2)),"^") I DIU'="ON CALL" S $P(^(2),"^")="ON CALL" I $O(^DD(53.1,26,1,0)) K DIV S (DIV(0),D0)=DA,DIV="ON CALL",DIH=53.1,DIG=26,(PSGS0XT,PSGS0Y)="" D ^DICR K DIV
S X=$P($G(DIKZ(0)),U,7)
I X'="" D
.N DIK,DIV,DIU,DIN
.I X="O",$D(^PS(53.1,DA,2)),$P(^(2),"^",2),$P(^(2),"^",4),$P(^(2),"^",2)'=$P(^(2),"^",4) S DIU=$P(^(2),"^",4),$P(^(2),"^",4)=$P(^(2),"^",2) I $O(^DD(53.1,25,1,0)) K DIV S DIV=$P(^PS(53.1,DA,2),"^",2) X ^DD(53.1,7,1,2,1.4)
S DIKZ(4)=$G(^PS(53.1,DA,4))
S X=$P($G(DIKZ(4)),U,1)
I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENNACK^PSGAXR
S DIKZ(2)=$G(^PS(53.1,DA,2))
S X=$P($G(DIKZ(2)),U,1)
I X'="" D
.N DIK,DIV,DIU,DIN
.I '$D(DIU(0)),$D(PSGS0Y),PSGS0Y S DIU=$S($D(^PS(53.1,DA,2)):$P(^(2),"^",5),1:"") I DIU'=PSGS0Y S $P(^(2),"^",5)=PSGS0Y I $O(^DD(53.1,39,1,0)) K DIV S (DIV(0),D0)=DA,DIV=PSGS0Y,DIH=53.1,DIG=39 D ^DICR K DIV
S X=$P($G(DIKZ(2)),U,1)
I X'="" D
.N DIK,DIV,DIU,DIN
.I $D(PSGS0XT),PSGS0XT S DIU=$S($D(^PS(53.1,DA,2)):$P(^(2),"^",6),1:"") I DIU'=PSGS0XT S $P(^(2),"^",6)=PSGS0XT I $O(^DD(53.1,41,1,0)) K DIV S (DIV(0),D0)=DA,DIV=PSGS0XT,DIH=53.1,DIG=41 D ^DICR K DIV
S DIKZ(0)=$G(^PS(53.1,DA,0))
S X=$P($G(DIKZ(0)),U,9)
I X'="" S XX=X,X="PSGAXR" X ^%ZOSF("TEST") I S X=XX D ENSS^PSGAXR
S DIKZ(2)=$G(^PS(53.1,DA,2))
S X=$P($G(DIKZ(2)),U,5)
I X'="" S PSGS0Y=X
S X=$P($G(DIKZ(2)),U,5)
I X'="" I $D(^PS(53.1,DA,2)),$P(^(2),"^")["@" S $P(^(2),"^")=$P($P(^(2),"^"),"@")_"@"_X
S DIKZ(.1)=$G(^PS(53.1,DA,.1))
S X=$P($G(DIKZ(.1)),U,1)
I X'="" D ENNDS^PSGAXR
S DIKZ(.2)=$G(^PS(53.1,DA,.2))
S X=$P($G(DIKZ(.2)),U,8)
I X'="" S ^PS(53.1,"ACX",$E(X,1,30),DA)=""
CR1 S DIXR=455
K X
S DIKZ("DSS")=$G(^PS(53.1,DA,"DSS"))
S X(1)=$P(DIKZ("DSS"),U,1)
S X(2)=$P(DIKZ(0),U,15)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. S ^PS(53.1,"AD",$E(X(1),1,20),$E(X(2),1,20),DA)=""
CR2 K X
END G ^PSGXR38
PSGXR37 ; COMPILED XREF FOR FILE #53.1 ; 08/08/13
+1 ;
+2 SET DIKZK=1
+3 SET DIKZ(0)=$GET(^PS(53.1,DA,0))
+4 SET X=$PIECE($GET(DIKZ(0)),U,1)
+5 IF X'=""
SET ^PS(53.1,"B",$EXTRACT(X,1,30),DA)=""
+6 SET X=$PIECE($GET(DIKZ(0)),U,15)
+7 IF X'=""
SET XX=X
SET X="PSGAXR"
XECUTE ^%ZOSF("TEST")
IF $TEST
SET X=XX
DO ENNPS^PSGAXR
+8 SET X=$PIECE($GET(DIKZ(0)),U,2)
+9 IF X'=""
IF $PIECE($GET(^PS(53.1,DA,0)),"^",15)
IF $DATA(^PS(55,+$PIECE(^(0),U,15),0))
IF $PIECE($GET(^(5.1)),"^",2)'=X
SET $PIECE(^(5.1),"^",2)=X
+10 SET X=$PIECE($GET(DIKZ(0)),U,5)
+11 IF X'=""
Begin DoDot:1
+12 NEW DIK,DIV,DIU,DIN
+13 IF 'X
SET DIU=$SELECT($DATA(^PS(53.1,DA,0)):$PIECE(^(0),"^",6),1:"")
IF DIU]""
SET $PIECE(^(0),"^",6)=""
IF $ORDER(^DD(53.1,6,1,0))
KILL DIV
SET (DIV(0),D0)=DA
SET DIV=""
SET DIH=53.1
SET DIG=6
DO ^DICR
KILL DIV
End DoDot:1
+14 SET DIKZ(0)=$GET(^PS(53.1,DA,0))
+15 SET X=$PIECE($GET(DIKZ(0)),U,7)
+16 IF X'=""
Begin DoDot:1
+17 NEW DIK,DIV,DIU,DIN
+18 IF X="OC"
SET DIU=$PIECE($GET(^PS(53.1,DA,2)),"^")
IF DIU'="ON CALL"
SET $PIECE(^(2),"^")="ON CALL"
IF $ORDER(^DD(53.1,26,1,0))
KILL DIV
SET (DIV(0),D0)=DA
SET DIV="ON CALL"
SET DIH=53.1
SET DIG=26
SET (PSGS0XT,PSGS0Y)=""
DO ^DICR
KILL DIV
End DoDot:1
+19 SET X=$PIECE($GET(DIKZ(0)),U,7)
+20 IF X'=""
Begin DoDot:1
+21 NEW DIK,DIV,DIU,DIN
+22 IF X="O"
IF $DATA(^PS(53.1,DA,2))
IF $PIECE(^(2),"^",2)
IF $PIECE(^(2),"^",4)
IF $PIECE(^(2),"^",2)'=$PIECE(^(2),"^",4)
SET DIU=$PIECE(^(2),"^",4)
SET $PIECE(^(2),"^",4)=$PIECE(^(2),"^",2)
IF $ORDER(^DD(53.1,25,1,0))
KILL DIV
SET DIV=$PIECE(^PS(53.1,DA,2),"^",2)
XECUTE ^DD(53.1,7,1,2,1.4)
End DoDot:1
+23 SET DIKZ(4)=$GET(^PS(53.1,DA,4))
+24 SET X=$PIECE($GET(DIKZ(4)),U,1)
+25 IF X'=""
SET XX=X
SET X="PSGAXR"
XECUTE ^%ZOSF("TEST")
IF $TEST
SET X=XX
DO ENNACK^PSGAXR
+26 SET DIKZ(2)=$GET(^PS(53.1,DA,2))
+27 SET X=$PIECE($GET(DIKZ(2)),U,1)
+28 IF X'=""
Begin DoDot:1
+29 NEW DIK,DIV,DIU,DIN
+30 IF '$DATA(DIU(0))
IF $DATA(PSGS0Y)
IF PSGS0Y
SET DIU=$SELECT($DATA(^PS(53.1,DA,2)):$PIECE(^(2),"^",5),1:"")
IF DIU'=PSGS0Y
SET $PIECE(^(2),"^",5)=PSGS0Y
IF $ORDER(^DD(53.1,39,1,0))
KILL DIV
SET (DIV(0),D0)=DA
SET DIV=PSGS0Y
SET DIH=53.1
SET DIG=39
DO ^DICR
KILL DIV
End DoDot:1
+31 SET X=$PIECE($GET(DIKZ(2)),U,1)
+32 IF X'=""
Begin DoDot:1
+33 NEW DIK,DIV,DIU,DIN
+34 IF $DATA(PSGS0XT)
IF PSGS0XT
SET DIU=$SELECT($DATA(^PS(53.1,DA,2)):$PIECE(^(2),"^",6),1:"")
IF DIU'=PSGS0XT
SET $PIECE(^(2),"^",6)=PSGS0XT
IF $ORDER(^DD(53.1,41,1,0))
KILL DIV
SET (DIV(0),D0)=DA
SET DIV=PSGS0XT
SET DIH=53.1
SET DIG=41
DO ^DICR
KILL DIV
End DoDot:1
+35 SET DIKZ(0)=$GET(^PS(53.1,DA,0))
+36 SET X=$PIECE($GET(DIKZ(0)),U,9)
+37 IF X'=""
SET XX=X
SET X="PSGAXR"
XECUTE ^%ZOSF("TEST")
IF $TEST
SET X=XX
DO ENSS^PSGAXR
+38 SET DIKZ(2)=$GET(^PS(53.1,DA,2))
+39 SET X=$PIECE($GET(DIKZ(2)),U,5)
+40 IF X'=""
SET PSGS0Y=X
+41 SET X=$PIECE($GET(DIKZ(2)),U,5)
+42 IF X'=""
IF $DATA(^PS(53.1,DA,2))
IF $PIECE(^(2),"^")["@"
SET $PIECE(^(2),"^")=$PIECE($PIECE(^(2),"^"),"@")_"@"_X
+43 SET DIKZ(.1)=$GET(^PS(53.1,DA,.1))
+44 SET X=$PIECE($GET(DIKZ(.1)),U,1)
+45 IF X'=""
DO ENNDS^PSGAXR
+46 SET DIKZ(.2)=$GET(^PS(53.1,DA,.2))
+47 SET X=$PIECE($GET(DIKZ(.2)),U,8)
+48 IF X'=""
SET ^PS(53.1,"ACX",$EXTRACT(X,1,30),DA)=""
CR1 SET DIXR=455
+1 KILL X
+2 SET DIKZ("DSS")=$GET(^PS(53.1,DA,"DSS"))
+3 SET X(1)=$PIECE(DIKZ("DSS"),U,1)
+4 SET X(2)=$PIECE(DIKZ(0),U,15)
+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 SET ^PS(53.1,"AD",$EXTRACT(X(1),1,20),$EXTRACT(X(2),1,20),DA)=""
End DoDot:1
CR2 KILL X
END GOTO ^PSGXR38