DGPTXX11 ; COMPILED XREF FOR FILE #45.02 ; 10/15/12
;
S DA=0
A1 ;
I $D(DISET) K DIKLM S:DIKM1=1 DIKLM=1 G @DIKM1
0 ;
A S DA=$O(^DGPT(DA(1),"M",DA)) I DA'>0 S DA=0 G END
1 ;
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,2)
I X'="" D
.N DIK,DIV,DIU,DIN
.K DIV S DIV=X,D0=DA(1),DIV(0)=D0,D1=DA,DIV(1)=D1 S Y(1)=$S($D(^DGPT(D0,"M",D1,0)):^(0),1:"") S X=$P(Y(1),U,16),X=X S DIU=X K Y X ^DD(45.02,2,1,1,1.1) X ^DD(45.02,2,1,1,1.4)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,5)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,5)
I X'="" X ^DD(45.02,5,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,6)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,6)
I X'="" X ^DD(45.02,6,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,7)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,7)
I X'="" X ^DD(45.02,7,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,8)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,8)
I X'="" X ^DD(45.02,8,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,9)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,9)
I X'="" X ^DD(45.02,9,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,10)
I X'="" S ^DGPT(DA(1),"M","AM",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,11)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,11)
I X'="" X ^DD(45.02,11,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,12)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,12)
I X'="" X ^DD(45.02,12,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,13)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,13)
I X'="" X ^DD(45.02,13,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,14)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,14)
I X'="" X ^DD(45.02,14,1,992,1)
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X=$P($G(DIKZ(0)),U,15)
I X'="" S ^DGPT(DA(1),"M","AC",$E(X,1,30),DA)=""
S X=$P($G(DIKZ(0)),U,15)
I X'="" X ^DD(45.02,15,1,992,1)
CR1 S DIXR=380
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,5)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD1")
CR2 S DIXR=381
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
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
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD10")
CR3 S DIXR=382
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,6)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD2")
CR4 S DIXR=383
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,7)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD3")
CR5 S DIXR=384
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,8)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD4")
CR6 S DIXR=385
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,9)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD5")
CR7 S DIXR=386
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,11)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD6")
CR8 S DIXR=387
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,12)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD7")
CR9 S DIXR=388
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,13)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD8")
CR10 S DIXR=389
K X
S DIKZ(0)=$G(^DGPT(DA(1),"M",DA,0))
S X(1)=$P(DIKZ(0),U,10)
S X(2)=$P(DIKZ(0),U,14)
S X=$G(X(1))
I $G(X(1))]"",$G(X(2))]"" D
. K X1,X2 M X1=X,X2=X
. D SDGPT9M^DGPTDDCR(.X,.DA,"M ICD9")
CR11 K X
G:'$D(DIKLM) A Q:$D(DISET)
END G ^DGPTXX12
DGPTXX11 ; COMPILED XREF FOR FILE #45.02 ; 10/15/12
+1 ;
+2 SET DA=0
A1 ;
+1 IF $DATA(DISET)
KILL DIKLM
IF DIKM1=1
SET DIKLM=1
GOTO @DIKM1
0 ;
A SET DA=$ORDER(^DGPT(DA(1),"M",DA))
IF DA'>0
SET DA=0
GOTO END
1 ;
+1 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+2 SET X=$PIECE($GET(DIKZ(0)),U,2)
+3 IF X'=""
Begin DoDot:1
+4 NEW DIK,DIV,DIU,DIN
+5 KILL DIV
SET DIV=X
SET D0=DA(1)
SET DIV(0)=D0
SET D1=DA
SET DIV(1)=D1
SET Y(1)=$SELECT($DATA(^DGPT(D0,"M",D1,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,16)
SET X=X
SET DIU=X
KILL Y
XECUTE ^DD(45.02,2,1,1,1.1)
XECUTE ^DD(45.02,2,1,1,1.4)
End DoDot:1
+6 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+7 SET X=$PIECE($GET(DIKZ(0)),U,5)
+8 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+9 SET X=$PIECE($GET(DIKZ(0)),U,5)
+10 IF X'=""
XECUTE ^DD(45.02,5,1,992,1)
+11 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+12 SET X=$PIECE($GET(DIKZ(0)),U,6)
+13 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+14 SET X=$PIECE($GET(DIKZ(0)),U,6)
+15 IF X'=""
XECUTE ^DD(45.02,6,1,992,1)
+16 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+17 SET X=$PIECE($GET(DIKZ(0)),U,7)
+18 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+19 SET X=$PIECE($GET(DIKZ(0)),U,7)
+20 IF X'=""
XECUTE ^DD(45.02,7,1,992,1)
+21 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+22 SET X=$PIECE($GET(DIKZ(0)),U,8)
+23 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+24 SET X=$PIECE($GET(DIKZ(0)),U,8)
+25 IF X'=""
XECUTE ^DD(45.02,8,1,992,1)
+26 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+27 SET X=$PIECE($GET(DIKZ(0)),U,9)
+28 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+29 SET X=$PIECE($GET(DIKZ(0)),U,9)
+30 IF X'=""
XECUTE ^DD(45.02,9,1,992,1)
+31 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+32 SET X=$PIECE($GET(DIKZ(0)),U,10)
+33 IF X'=""
SET ^DGPT(DA(1),"M","AM",$EXTRACT(X,1,30),DA)=""
+34 SET X=$PIECE($GET(DIKZ(0)),U,11)
+35 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+36 SET X=$PIECE($GET(DIKZ(0)),U,11)
+37 IF X'=""
XECUTE ^DD(45.02,11,1,992,1)
+38 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+39 SET X=$PIECE($GET(DIKZ(0)),U,12)
+40 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+41 SET X=$PIECE($GET(DIKZ(0)),U,12)
+42 IF X'=""
XECUTE ^DD(45.02,12,1,992,1)
+43 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+44 SET X=$PIECE($GET(DIKZ(0)),U,13)
+45 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+46 SET X=$PIECE($GET(DIKZ(0)),U,13)
+47 IF X'=""
XECUTE ^DD(45.02,13,1,992,1)
+48 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+49 SET X=$PIECE($GET(DIKZ(0)),U,14)
+50 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+51 SET X=$PIECE($GET(DIKZ(0)),U,14)
+52 IF X'=""
XECUTE ^DD(45.02,14,1,992,1)
+53 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+54 SET X=$PIECE($GET(DIKZ(0)),U,15)
+55 IF X'=""
SET ^DGPT(DA(1),"M","AC",$EXTRACT(X,1,30),DA)=""
+56 SET X=$PIECE($GET(DIKZ(0)),U,15)
+57 IF X'=""
XECUTE ^DD(45.02,15,1,992,1)
CR1 SET DIXR=380
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,5)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD1")
End DoDot:1
CR2 SET DIXR=381
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD10")
End DoDot:1
CR3 SET DIXR=382
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,6)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD2")
End DoDot:1
CR4 SET DIXR=383
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,7)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD3")
End DoDot:1
CR5 SET DIXR=384
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,8)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD4")
End DoDot:1
CR6 SET DIXR=385
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,9)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD5")
End DoDot:1
CR7 SET DIXR=386
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,11)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD6")
End DoDot:1
CR8 SET DIXR=387
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,12)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD7")
End DoDot:1
CR9 SET DIXR=388
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,13)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD8")
End DoDot:1
CR10 SET DIXR=389
+1 KILL X
+2 SET DIKZ(0)=$GET(^DGPT(DA(1),"M",DA,0))
+3 SET X(1)=$PIECE(DIKZ(0),U,10)
+4 SET X(2)=$PIECE(DIKZ(0),U,14)
+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 DO SDGPT9M^DGPTDDCR(.X,.DA,"M ICD9")
End DoDot:1
CR11 KILL X
+1 IF '$DATA(DIKLM)
GOTO A
IF $DATA(DISET)
QUIT
END GOTO ^DGPTXX12