DGPTXX7 ; COMPILED XREF FOR FILE #45.06 ; 10/15/12
;
S DA=0
A1 ;
I $D(DIKILL) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1
0 ;
A S DA=$O(^DGPT(DA(1),"C",DA)) I DA'>0 S DA=0 G END
1 ;
S DIKZ(0)=$G(^DGPT(DA(1),"C",DA,0))
S X=$P($G(DIKZ(0)),U,6)
I X'="" D SUB^AUPNVSIT
S X=$P($G(DIKZ(0)),U,1)
I X'="" K ^DGPT(DA(1),"C","B",$E(X,1,30),DA)
CR1 S DIXR=355
K X
S X(1)=$P(DIKZ(0),U,1)
S X(2)=$P(DIKZ(0),U,7)
S X(3)=$P(DIKZ(0),U,9)
S X=$G(X(1))
D
. K X1,X2 M X1=X,X2=X
. S:$D(DIKIL) (X2,X2(1),X2(2),X2(3))=""
. N DIKXARR M DIKXARR=X S DIKCOND=1
. S X=X2(2)!X2(3)!(X(1)'=X(2))
. S DIKCOND=$G(X) K X M X=DIKXARR
. Q:'DIKCOND
. K:X1(1)'="" ^DGPT("AB",X1(1),DA(1),DA)
CR2 K X
G:'$D(DIKLM) A Q:$D(DIKILL)
END Q
DGPTXX7 ; COMPILED XREF FOR FILE #45.06 ; 10/15/12
+1 ;
+2 SET DA=0
A1 ;
+1 IF $DATA(DIKILL)
KILL DIKLM
IF DIKM1=1
SET DIKLM=1
GOTO @DIKM1
0 ;
A SET DA=$ORDER(^DGPT(DA(1),"C",DA))
IF DA'>0
SET DA=0
GOTO END
1 ;
+1 SET DIKZ(0)=$GET(^DGPT(DA(1),"C",DA,0))
+2 SET X=$PIECE($GET(DIKZ(0)),U,6)
+3 IF X'=""
DO SUB^AUPNVSIT
+4 SET X=$PIECE($GET(DIKZ(0)),U,1)
+5 IF X'=""
KILL ^DGPT(DA(1),"C","B",$EXTRACT(X,1,30),DA)
CR1 SET DIXR=355
+1 KILL X
+2 SET X(1)=$PIECE(DIKZ(0),U,1)
+3 SET X(2)=$PIECE(DIKZ(0),U,7)
+4 SET X(3)=$PIECE(DIKZ(0),U,9)
+5 SET X=$GET(X(1))
+6 Begin DoDot:1
+7 KILL X1,X2
MERGE X1=X,X2=X
+8 IF $DATA(DIKIL)
SET (X2,X2(1),X2(2),X2(3))=""
+9 NEW DIKXARR
MERGE DIKXARR=X
SET DIKCOND=1
+10 SET X=X2(2)!X2(3)!(X(1)'=X(2))
+11 SET DIKCOND=$GET(X)
KILL X
MERGE X=DIKXARR
+12 IF 'DIKCOND
QUIT
+13 IF X1(1)'=""
KILL ^DGPT("AB",X1(1),DA(1),DA)
End DoDot:1
CR2 KILL X
+1 IF '$DATA(DIKLM)
GOTO A
IF $DATA(DIKILL)
QUIT
END QUIT