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

BZXFIXAD.m

Go to the documentation of this file.
BZXFIXAD ;IHS/PHXAO/AEF - FIX BAD ADDRESSES IN VA PATIENT FILE
 ;;1.0;ANNE'S SPECIAL ROUTINES;;JUNE 22, 2004
 ;
 ;
DESC ;
 ;;THIS ROUTINE LOOPS THROUGH THE VA PATIENT FILE #2 AND FIXES BAD
 ;;ADDRESSES IN THE MAILING ADDRESS-STREET FIELD #.111. TO PREVENT
 ;;REJECTS BY AHCCCS.
 ;;
 ;;$$END
 ;
EN ;EP -- MAIN ENTRY POINT
 ;
 N BZXD0
 ;
 S BZXD0=0
 F  S BZXD0=$O(^DPT(BZXD0)) Q:'BZXD0  D
 . D ONE(BZXD0)
 ;
 W !!,"DONE"
 Q
ONE(BZXD0) ;
 ;----- FIX ONE ENTRY
 ;
 N BZXADD,DA,DIE,DR,X,Y
 ;
 S BZXADD=$P($G(^DPT(BZXD0,.11)),U)
 Q:BZXADD'?1"BOX "1.N
 ;
 W !,BZXD0,?12,$P($G(^DPT(BZXD0,0)),U)
 W !,?12,BZXADD
 ;
 I $E(BZXADD,1,3)="BOX" D
 . S BZXADD="PO "_BZXADD
 ;
 S DA=BZXD0
 S DIE="^DPT("
 S DR=".111///^S X=BZXADD"
 D ^DIE
 ;
 W !?12,BZXADD
 W !
 Q