AGSSDEL ; IHS/ASDS/EFG - Process SSA SSN deletes to NPIRS ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
Q:'$D(^AGSSTEMP(AGSSITE,"DEL"))
S (AGSHRN,AGSENT)="" ;added AGSENT (entry number)
F S AGSHRN=$O(^AGSSTEMP(AGSSITE,"DEL",AGSHRN)) Q:'+AGSHRN D
.F S AGSENT=$O(^AGSSTEMP(AGSSITE,"DEL",AGSHRN,AGSENT)) Q:AGSENT="" D
..S AGSUB=^AGSSTEMP(AGSSITE,"DEL",AGSHRN,AGSENT) S ^AGPATCH("DEL",AGSUB)=""
K AGSHRN,AGSUB,AGSENT
Q
AGSSDEL ; IHS/ASDS/EFG - Process SSA SSN deletes to NPIRS ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 IF '$DATA(^AGSSTEMP(AGSSITE,"DEL"))
QUIT
+4 ;added AGSENT (entry number)
SET (AGSHRN,AGSENT)=""
+5 FOR
SET AGSHRN=$ORDER(^AGSSTEMP(AGSSITE,"DEL",AGSHRN))
IF '+AGSHRN
QUIT
Begin DoDot:1
+6 FOR
SET AGSENT=$ORDER(^AGSSTEMP(AGSSITE,"DEL",AGSHRN,AGSENT))
IF AGSENT=""
QUIT
Begin DoDot:2
+7 SET AGSUB=^AGSSTEMP(AGSSITE,"DEL",AGSHRN,AGSENT)
SET ^AGPATCH("DEL",AGSUB)=""
End DoDot:2
End DoDot:1
+8 KILL AGSHRN,AGSUB,AGSENT
+9 QUIT