DGNTDD ;ALB/RPM - Cross reference for field #.09 ; 9/13/01 14:02
;;5.3;Registration;**397,423,1015**;Aug 13, 1993;Build 21
Q
;
SET(DGDA) ;
N DGDFN,DGIEN
S DGDFN=$P($G(^DGNT(28.11,DGDA,0)),"^")
Q:'DGDFN
I $D(^DGNT(28.11,"APR",DGDFN,1)) D
. S DGIEN=$O(^DGNT(28.11,"APR",DGDFN,1,0))
. Q:'DGIEN
. S $P(^DGNT(28.11,DGIEN,0),"^",9)=""
. S $P(^DGNT(28.11,DGIEN,0),"^",10)=$$NOW^XLFDT
. K ^DGNT(28.11,"APR",DGDFN,1,DGIEN)
S ^DGNT(28.11,"APR",DGDFN,1,DGDA)=""
Q
;
KILL(DGDA) ;
N DGDFN
S DGDFN=$P($G(^DGNT(28.11,DGDA,0)),"^")
Q:'DGDFN
K ^DGNT(28.11,"APR",DGDFN,1,DGDA)
Q
;
SETAST(DGDA) ;
N DGDFN,DGSTAT,DGIEN
S DGDFN=$G(^DGNT(28.11,DGDA,0))
Q:'+DGDFN
S DGIEN=$O(^DGNT(28.11,"B",+DGDFN,DGDA),-1) D
. Q:DGIEN=""
. I $P($G(^DGNT(28.11,DGIEN,0)),U,9)'=1 D
. . S DGSTAT=$P($G(^DGNT(28.11,DGIEN,0)),U,3)
. . Q:'+DGSTAT
. . K ^DGNT(28.11,"AST",DGSTAT,1,DGIEN)
S ^DGNT(28.11,"AST",$P(DGDFN,U,3),1,DGDA)=""
Q
;
KILAST(DGDA) ;
N DGSTAT
S DGSTAT=$P($G(^DGNT(28.11,DGDA,0)),U,3)
Q:'DGSTAT
K ^DGNT(28.11,"AST",DGSTAT,1,DGDA)
Q
DGNTDD ;ALB/RPM - Cross reference for field #.09 ; 9/13/01 14:02
+1 ;;5.3;Registration;**397,423,1015**;Aug 13, 1993;Build 21
+2 QUIT
+3 ;
SET(DGDA) ;
+1 NEW DGDFN,DGIEN
+2 SET DGDFN=$PIECE($GET(^DGNT(28.11,DGDA,0)),"^")
+3 IF 'DGDFN
QUIT
+4 IF $DATA(^DGNT(28.11,"APR",DGDFN,1))
Begin DoDot:1
+5 SET DGIEN=$ORDER(^DGNT(28.11,"APR",DGDFN,1,0))
+6 IF 'DGIEN
QUIT
+7 SET $PIECE(^DGNT(28.11,DGIEN,0),"^",9)=""
+8 SET $PIECE(^DGNT(28.11,DGIEN,0),"^",10)=$$NOW^XLFDT
+9 KILL ^DGNT(28.11,"APR",DGDFN,1,DGIEN)
End DoDot:1
+10 SET ^DGNT(28.11,"APR",DGDFN,1,DGDA)=""
+11 QUIT
+12 ;
KILL(DGDA) ;
+1 NEW DGDFN
+2 SET DGDFN=$PIECE($GET(^DGNT(28.11,DGDA,0)),"^")
+3 IF 'DGDFN
QUIT
+4 KILL ^DGNT(28.11,"APR",DGDFN,1,DGDA)
+5 QUIT
+6 ;
SETAST(DGDA) ;
+1 NEW DGDFN,DGSTAT,DGIEN
+2 SET DGDFN=$GET(^DGNT(28.11,DGDA,0))
+3 IF '+DGDFN
QUIT
+4 SET DGIEN=$ORDER(^DGNT(28.11,"B",+DGDFN,DGDA),-1)
Begin DoDot:1
+5 IF DGIEN=""
QUIT
+6 IF $PIECE($GET(^DGNT(28.11,DGIEN,0)),U,9)'=1
Begin DoDot:2
+7 SET DGSTAT=$PIECE($GET(^DGNT(28.11,DGIEN,0)),U,3)
+8 IF '+DGSTAT
QUIT
+9 KILL ^DGNT(28.11,"AST",DGSTAT,1,DGIEN)
End DoDot:2
End DoDot:1
+10 SET ^DGNT(28.11,"AST",$PIECE(DGDFN,U,3),1,DGDA)=""
+11 QUIT
+12 ;
KILAST(DGDA) ;
+1 NEW DGSTAT
+2 SET DGSTAT=$PIECE($GET(^DGNT(28.11,DGDA,0)),U,3)
+3 IF 'DGSTAT
QUIT
+4 KILL ^DGNT(28.11,"AST",DGSTAT,1,DGDA)
+5 QUIT