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

AVAP4.m

Go to the documentation of this file.
  1. AVAP4 ;IHS/ORDC/LJF - CLEANUP PROVIDER CLASS ENTRIES; [ 05/11/94 2:57 PM ]
  1. ;;93.2;VA SUPPORT FILES;**4,5,6**;JUL 01, 1993;Build 12
  1. ;cleanup rtn for patches #4, 5, & 6
  1. ;
  1. Q ;can only execute from line label
  1. ;
  1. CLASS ;EP >> kill off file 6 entries if no zero node
  1. ; then if provider class set in file 200, fire xrefs for
  1. ; provider class, affiliation, and code
  1. ;
  1. S U="^"
  1. W !!!,"This program will cleanup bad entries in your PROVIDER file"
  1. W !,"and recreate them if a PROVIDER CLASS has been entered for the"
  1. W !,"provider in the NEW PERSON file."
  1. W !! K DIR S DIR(0)="YO",DIR("B")="NO"
  1. S DIR("A")="OKAY to run CLEANUP" D ^DIR Q:Y'=1
  1. ;
  1. S AVA6=0
  1. F S AVA6=$O(^DIC(6,AVA6)) Q:AVA6'=+AVA6 D
  1. .Q:$D(^DIC(6,AVA6,0)) ;skip good entries
  1. .Q:'$D(^DIC(6,AVA6,9999999)) I $P(^(9999999),U,9)]"" D ;PATCH 6
  1. ..K ^DIC(6,"GIHS",$P(^DIC(6,AVA6,9999999),U,9),AVA6) ;kill xref PATCH 6
  1. .K ^DIC(6,AVA6) ;kill bad entry in file 6
  1. .S AVA200=$P($G(^DIC(16,AVA6,"A3")),U) ;ifn in file 200
  1. .Q:AVA200="" Q:'$D(^VA(200,AVA200,0)) ;no entry in file 200
  1. .Q:$P($G(^DIC(3,AVA200,0)),U,16)'=AVA6 ;bad pointers
  1. .S AVACLS=$P($G(^VA(200,AVA200,"PS")),U,5) ;IHS/ORDC/LJF PATCH 5
  1. .Q:AVACLS="" ;no provider class entered
  1. .;
  1. .S DIE="^VA(200,",DA=AVA200,DR="53.5///@" D ^DIE
  1. .S DR="53.5////"_AVACLS D ^DIE
  1. .;
  1. .W !,"NEW PERSON entry #",AVA200," creating entry in file 6"
  1. ;
  1. W !!,"CLEANUP COMPLETE",!
  1. ;
  1. EOJ ;
  1. K AVA6,AVA200,DIR,DIE,DA,DR,X,Y
  1. Q