Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AGSSKILL

AGSSKILL.m

Go to the documentation of this file.
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