DGPMX11 ; ;10/15/12
S X=DE(13),DIC=DIE
K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DGPM(D0,0)):^(0),1:"") S X=$P(Y(1),U,18),X=X S DIU=X K Y S X="" S DIH=$S($D(^DGPM(DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,18)=DIV,DIH=405,DIG=.18 D ^DICR:$N(^DD(DIH,DIG,1,0))>0
DGPMX11 ; ;10/15/12
+1 SET X=DE(13)
SET DIC=DIE
+2 KILL DIV
SET DIV=X
SET D0=DA
SET DIV(0)=D0
SET Y(1)=$SELECT($DATA(^DGPM(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,18)
SET X=X
SET DIU=X
KILL Y
SET X=""
SET DIH=$SELECT($DATA(^DGPM(DIV(0),0)):^(0),1:"")
SET DIV=X
SET $PIECE(^(0),U,18)=DIV
SET DIH=405
SET DIG=.18