99 lines
3.4 KiB
Mathematica
99 lines
3.4 KiB
Mathematica
PSSJXR24 ; COMPILED XREF FOR FILE #55.02 ; 12/12/07
|
|
;
|
|
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(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(DIKZ(4),U,18)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(71)) KILL^PSGAL5:PSGAL(71)=X K PSGAL
|
|
S X=$P(DIKZ(4),U,19)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(72)) KILL^PSGAL5:PSGAL(72)=X K PSGAL
|
|
S X=$P(DIKZ(4),U,20)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(73)) KILL^PSGAL5:PSGAL(73)=X K PSGAL
|
|
S X=$P(DIKZ(4),U,21)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(74)) KILL^PSGAL5:PSGAL(74)=X K PSGAL
|
|
S X=$P(DIKZ(4),U,22)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(75)) KILL^PSGAL5:PSGAL(75)=X K PSGAL
|
|
S X=$P(DIKZ(4),U,23)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(76)) KILL^PSGAL5:PSGAL(76)=X K PSGAL
|
|
S X=$P(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(DIKZ(0),U,20)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(79)) KILL^PSGAL5:PSGAL(79)=X K PSGAL
|
|
S X=$P(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(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(DIKZ(0),U,21)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(80)) KILL^PSGAL5:PSGAL(80)=X K PSGAL
|
|
S DIKZ(.1)=$G(^PS(55,DA(1),5,DA,.1))
|
|
S X=$P(DIKZ(.1),U,1)
|
|
I X'="" S ^PS(55,DA(1),5,"C",$E(X,1,30),DA)=""
|
|
S X=$P(DIKZ(.1),U,1)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(101)) KILL^PSGAL5:PSGAL(101)=X K PSGAL
|
|
S X=$P(DIKZ(.1),U,2)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(102)) KILL^PSGAL5:PSGAL(102)=X K PSGAL
|
|
S X=$P(DIKZ(0),U,24)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(103)) KILL^PSGAL5:PSGAL(103)=X K PSGAL
|
|
S X=$P(DIKZ(0),U,25)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(104)) KILL^PSGAL5:PSGAL(104)=X K PSGAL
|
|
S X=$P(DIKZ(0),U,26)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(105)) KILL^PSGAL5:PSGAL(105)=X K PSGAL
|
|
S X=$P(DIKZ(.1),U,3)
|
|
I X'="" I '$D(DIU(0)) D:$D(PSGAL(106)) KILL^PSGAL5:PSGAL(106)=X K PSGAL
|
|
S X=$P(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 K X
|
|
G:'$D(DIKLM) A^PSSJXR23 Q:$D(DISET)
|
|
END G ^PSSJXR25
|