AGSSKILL ; IHS/ASDS/EFG - SET/KILL SSN VERIFICATION FROM DDPS/SSA ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
S ;START
SETFLG K DIC,DIE
S DA=AGSDFN,DIE="^AUPNPAT(",DR=".23////"_AGSLVC D ^DIE
Q
SETSSN K DIC,DIE
S DIE="^DPT(",DA=AGSDFN,DR=".09////"_AGSCSSN2 D ^DIE
K DIC,DIE,DR S DIE="^AUPNPAT(",DA=AGSDFN,DR=".24///@" D ^DIE
S ^AGPATCH(DT,AGSSITE,AGSDFN)=""
Q
KILLALL ;kill off all entries made by SSA SSN
S XBRP="KKK^AGSSKILL" D ^XBDBQUE
Q
KKK S AGI=0
U IO
U IO D T^AG
U IO F S AGI=$O(^AUPNPAT("AS",AGI)) Q:AGI'>0 W !,AGI,! S DFN=0 F AGC=0:1 W:'(AGC#500) "." S DFN=$O(^AUPNPAT("AS",AGI,DFN)) Q:DFN'>0 D KILL
U IO W ! D T^AG
S AGTMP="^AGSSTEMP" K @AGTMP ;tEMPORARY GLOBAL
Q
KILL ;needs DFN
K DR,DIE S DIE="^AUPNPAT(",DA=DFN,DR=".23////@" D ^DIE
I AGI=2 K DR,DIE S DIE="^DPT(",DA=DFN,DR=".09////@" D ^DIE
Q
AGSSKILL ; IHS/ASDS/EFG - SET/KILL SSN VERIFICATION FROM DDPS/SSA ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
S ;START
SETFLG KILL DIC,DIE
+1 SET DA=AGSDFN
SET DIE="^AUPNPAT("
SET DR=".23////"_AGSLVC
DO ^DIE
+2 QUIT
SETSSN KILL DIC,DIE
+1 SET DIE="^DPT("
SET DA=AGSDFN
SET DR=".09////"_AGSCSSN2
DO ^DIE
+2 KILL DIC,DIE,DR
SET DIE="^AUPNPAT("
SET DA=AGSDFN
SET DR=".24///@"
DO ^DIE
+3 SET ^AGPATCH(DT,AGSSITE,AGSDFN)=""
+4 QUIT
KILLALL ;kill off all entries made by SSA SSN
+1 SET XBRP="KKK^AGSSKILL"
DO ^XBDBQUE
+2 QUIT
KKK SET AGI=0
+1 USE IO
+2 USE IO
DO T^AG
+3 USE IO
FOR
SET AGI=$ORDER(^AUPNPAT("AS",AGI))
IF AGI'>0
QUIT
WRITE !,AGI,!
SET DFN=0
FOR AGC=0:1
IF '(AGC#500)
WRITE "."
SET DFN=$ORDER(^AUPNPAT("AS",AGI,DFN))
IF DFN'>0
QUIT
DO KILL
+4 USE IO
WRITE !
DO T^AG
+5 ;tEMPORARY GLOBAL
SET AGTMP="^AGSSTEMP"
KILL @AGTMP
+6 QUIT
KILL ;needs DFN
+1 KILL DR,DIE
SET DIE="^AUPNPAT("
SET DA=DFN
SET DR=".23////@"
DO ^DIE
+2 IF AGI=2
KILL DR,DIE
SET DIE="^DPT("
SET DA=DFN
SET DR=".09////@"
DO ^DIE
+3 QUIT