TIUEPN13 ; ;04/07/16
;;
1 N X,X1,X2 S DIXR=247 D X1(U) K X2 M X2=X D X1("F") K X1 M X1=X
I $G(X(1))]"",$G(X(2))]"",$G(X(3))]"",$G(X(4))]"" D
. K ^TIU(8925,"ADIV",X(1),X(2),X(3),X(4),DA)
K X M X=X2 I $G(X(1))]"",$G(X(2))]"",$G(X(3))]"",$G(X(4))]"" D
. S ^TIU(8925,"ADIV",X(1),X(2),X(3),X(4),DA)=""
Q
X1(DION) K X
S X(1)=$G(@DIEZTMP@("V",8925,DIIENS,1212,DION),$P($G(^TIU(8925,DA,12)),U,12))
S X(2)=$G(@DIEZTMP@("V",8925,DIIENS,.01,DION),$P($G(^TIU(8925,DA,0)),U,1))
S X(3)=$G(@DIEZTMP@("V",8925,DIIENS,.05,DION),$P($G(^TIU(8925,DA,0)),U,5))
S X=$G(@DIEZTMP@("V",8925,DIIENS,1301,DION),$P($G(^TIU(8925,DA,13)),U,1))
I $D(X)#2 S X=9999999-X
S:$D(X)#2 X(4)=X
S X=$G(X(1))
Q
2 N X,X1,X2 S DIXR=557 D X2(U) K X2 M X2=X D X2("F") K X1 M X1=X
I $G(X(1))]"",$G(X(2))]"" D
. K ^TIU(8925,"VBC",$E(X(1),1,14),$E(X(2),1,6),DA)
K X M X=X2 I $G(X(1))]"",$G(X(2))]"" D
. S ^TIU(8925,"VBC",$E(X(1),1,14),$E(X(2),1,6),DA)=""
Q
X2(DION) K X
S X(1)=$G(@DIEZTMP@("V",8925,DIIENS,1201,DION),$P($G(^TIU(8925,DA,12)),U,1))
S X(2)=$G(@DIEZTMP@("V",8925,DIIENS,1801,DION),$P($G(^TIU(8925,DA,18)),U,1))
S X=$G(X(1))
Q
3 N X,X1,X2 S DIXR=1329 D X3(U) K X2 M X2=X D X3("F") K X1 M X1=X
D
. N DIEZCOND,DIEXARR M DIEXARR=X S DIEZCOND=1
. S X=(X2(1)="")
. S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND
. D DOC^TIUDDX
K X M X=X2 D
. N DIEZCOND,DIEXARR M DIEXARR=X S DIEZCOND=1
. S X=(X2(12)'="")
. S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND
. D DOC^TIUDDX
Q
X3(DION) K X
S X(1)=$G(@DIEZTMP@("V",8925,DIIENS,.01,DION),$P($G(^TIU(8925,DA,0)),U,1))
S X(2)=$G(@DIEZTMP@("V",8925,DIIENS,.05,DION),$P($G(^TIU(8925,DA,0)),U,5))
S X(3)=$G(@DIEZTMP@("V",8925,DIIENS,.06,DION),$P($G(^TIU(8925,DA,0)),U,6))
S X(4)=$G(@DIEZTMP@("V",8925,DIIENS,.07,DION),$P($G(^TIU(8925,DA,0)),U,7))
S X(5)=$G(@DIEZTMP@("V",8925,DIIENS,.08,DION),$P($G(^TIU(8925,DA,0)),U,8))
S X(6)=$G(@DIEZTMP@("V",8925,DIIENS,1202,DION),$P($G(^TIU(8925,DA,12)),U,2))
S X(7)=$G(@DIEZTMP@("V",8925,DIIENS,1205,DION),$P($G(^TIU(8925,DA,12)),U,5))
S X(8)=$G(@DIEZTMP@("V",8925,DIIENS,1301,DION),$P($G(^TIU(8925,DA,13)),U,1))
S X(9)=$G(@DIEZTMP@("V",8925,DIIENS,1405,DION),$P($G(^TIU(8925,DA,14)),U,5))
S X(10)=$G(@DIEZTMP@("V",8925,DIIENS,1701,DION),$P($G(^TIU(8925,DA,17)),U,1))
S X(11)=$G(@DIEZTMP@("V",8925,DIIENS,2101,DION),$P($G(^TIU(8925,DA,21)),U,1))
S X(12)=$G(@DIEZTMP@("V",8925,DIIENS,.02,DION),$P($G(^TIU(8925,DA,0)),U,2))
S X=$G(X(1))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUEPN13 2472 printed Dec 13, 2024@02:40:23 Page 2
TIUEPN13 ; ;04/07/16
+1 ;;
1 NEW X,X1,X2
SET DIXR=247
DO X1(U)
KILL X2
MERGE X2=X
DO X1("F")
KILL X1
MERGE X1=X
+1 IF $GET(X(1))]""
IF $GET(X(2))]""
IF $GET(X(3))]""
IF $GET(X(4))]""
Begin DoDot:1
+2 KILL ^TIU(8925,"ADIV",X(1),X(2),X(3),X(4),DA)
End DoDot:1
+3 KILL X
MERGE X=X2
IF $GET(X(1))]""
IF $GET(X(2))]""
IF $GET(X(3))]""
IF $GET(X(4))]""
Begin DoDot:1
+4 SET ^TIU(8925,"ADIV",X(1),X(2),X(3),X(4),DA)=""
End DoDot:1
+5 QUIT
X1(DION) KILL X
+1 SET X(1)=$GET(@DIEZTMP@("V",8925,DIIENS,1212,DION),$PIECE($GET(^TIU(8925,DA,12)),U,12))
+2 SET X(2)=$GET(@DIEZTMP@("V",8925,DIIENS,.01,DION),$PIECE($GET(^TIU(8925,DA,0)),U,1))
+3 SET X(3)=$GET(@DIEZTMP@("V",8925,DIIENS,.05,DION),$PIECE($GET(^TIU(8925,DA,0)),U,5))
+4 SET X=$GET(@DIEZTMP@("V",8925,DIIENS,1301,DION),$PIECE($GET(^TIU(8925,DA,13)),U,1))
+5 IF $DATA(X)#2
SET X=9999999-X
+6 if $DATA(X)#2
SET X(4)=X
+7 SET X=$GET(X(1))
+8 QUIT
2 NEW X,X1,X2
SET DIXR=557
DO X2(U)
KILL X2
MERGE X2=X
DO X2("F")
KILL X1
MERGE X1=X
+1 IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+2 KILL ^TIU(8925,"VBC",$EXTRACT(X(1),1,14),$EXTRACT(X(2),1,6),DA)
End DoDot:1
+3 KILL X
MERGE X=X2
IF $GET(X(1))]""
IF $GET(X(2))]""
Begin DoDot:1
+4 SET ^TIU(8925,"VBC",$EXTRACT(X(1),1,14),$EXTRACT(X(2),1,6),DA)=""
End DoDot:1
+5 QUIT
X2(DION) KILL X
+1 SET X(1)=$GET(@DIEZTMP@("V",8925,DIIENS,1201,DION),$PIECE($GET(^TIU(8925,DA,12)),U,1))
+2 SET X(2)=$GET(@DIEZTMP@("V",8925,DIIENS,1801,DION),$PIECE($GET(^TIU(8925,DA,18)),U,1))
+3 SET X=$GET(X(1))
+4 QUIT
3 NEW X,X1,X2
SET DIXR=1329
DO X3(U)
KILL X2
MERGE X2=X
DO X3("F")
KILL X1
MERGE X1=X
+1 Begin DoDot:1
+2 NEW DIEZCOND,DIEXARR
MERGE DIEXARR=X
SET DIEZCOND=1
+3 SET X=(X2(1)="")
+4 SET DIEZCOND=$GET(X)
KILL X
MERGE X=DIEXARR
if 'DIEZCOND
QUIT
+5 DO DOC^TIUDDX
End DoDot:1
+6 KILL X
MERGE X=X2
Begin DoDot:1
+7 NEW DIEZCOND,DIEXARR
MERGE DIEXARR=X
SET DIEZCOND=1
+8 SET X=(X2(12)'="")
+9 SET DIEZCOND=$GET(X)
KILL X
MERGE X=DIEXARR
if 'DIEZCOND
QUIT
+10 DO DOC^TIUDDX
End DoDot:1
+11 QUIT
X3(DION) KILL X
+1 SET X(1)=$GET(@DIEZTMP@("V",8925,DIIENS,.01,DION),$PIECE($GET(^TIU(8925,DA,0)),U,1))
+2 SET X(2)=$GET(@DIEZTMP@("V",8925,DIIENS,.05,DION),$PIECE($GET(^TIU(8925,DA,0)),U,5))
+3 SET X(3)=$GET(@DIEZTMP@("V",8925,DIIENS,.06,DION),$PIECE($GET(^TIU(8925,DA,0)),U,6))
+4 SET X(4)=$GET(@DIEZTMP@("V",8925,DIIENS,.07,DION),$PIECE($GET(^TIU(8925,DA,0)),U,7))
+5 SET X(5)=$GET(@DIEZTMP@("V",8925,DIIENS,.08,DION),$PIECE($GET(^TIU(8925,DA,0)),U,8))
+6 SET X(6)=$GET(@DIEZTMP@("V",8925,DIIENS,1202,DION),$PIECE($GET(^TIU(8925,DA,12)),U,2))
+7 SET X(7)=$GET(@DIEZTMP@("V",8925,DIIENS,1205,DION),$PIECE($GET(^TIU(8925,DA,12)),U,5))
+8 SET X(8)=$GET(@DIEZTMP@("V",8925,DIIENS,1301,DION),$PIECE($GET(^TIU(8925,DA,13)),U,1))
+9 SET X(9)=$GET(@DIEZTMP@("V",8925,DIIENS,1405,DION),$PIECE($GET(^TIU(8925,DA,14)),U,5))
+10 SET X(10)=$GET(@DIEZTMP@("V",8925,DIIENS,1701,DION),$PIECE($GET(^TIU(8925,DA,17)),U,1))
+11 SET X(11)=$GET(@DIEZTMP@("V",8925,DIIENS,2101,DION),$PIECE($GET(^TIU(8925,DA,21)),U,1))
+12 SET X(12)=$GET(@DIEZTMP@("V",8925,DIIENS,.02,DION),$PIECE($GET(^TIU(8925,DA,0)),U,2))
+13 SET X=$GET(X(1))
+14 QUIT