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

A4A7PCH6.m

Go to the documentation of this file.
  1. A4A7PCH6 ;SFISC/RWF - NEW PERSON PATCH 6 ;10/20/93 16:20
  1. ;;1.01;A4A7;**6**;JUL 30, 1992
  1. A S U="^" D F200DD,F200A,PFP,F6DD,FE53X,F6XR Q
  1. ;
  1. F200DD W !,"Remove the X-ref on DEA# and VA# in the New Person file."
  1. S DIK="^DD(200,53.2,1,",DA(2)=200,DA(1)=53.2,DA=1 D ^DIK
  1. S DIK="^DD(200,53.3,1,",DA(1)=53.3,DA=1 D ^DIK
  1. K ^VA(200,"APS1"),^VA(200,"APS2")
  1. W !,"Remove the 'BS' X-ref from the SSN field in NP."
  1. I $G(^DD(200,9,1,4,0))["200^BS" S DIK="^DD(200,9,1,",DA=4,DA(1)=9,DA(2)=200 D ^DIK K ^VA(200,"BS")
  1. W !,"Replace some X-ref in the New Person file."
  1. D ^A4A7P603,^A4A7P604
  1. D IX(200,.01),IX(200,8980.16),IX(200,53.2),IX(200,53.3),IX(200,53.4)
  1. Q
  1. F200A W !,"Make the ALIAS field in file 200 avalable."
  1. K:$G(^DD(200,10,9))="^" ^DD(200,10,9)
  1. Q
  1. PFP W !,"Fillin the PERSON FILE POINTER into file 200."
  1. W !,"Check and match DATE CREATED in file 200."
  1. F DA=.9:0 S DA=$O(^DIC(3,DA)) Q:DA'>0 D
  1. . S %=$P($G(^DIC(3,DA,0)),U,16),D3=$P($G(^DIC(3,DA,1)),U,7)
  1. . S:% $P(^VA(200,DA,0),U,16)=%
  1. . S D200=$P($G(^VA(200,DA,1)),U,7)
  1. . Q:D3=D200 S:(D3>0)&(D3'>D200) $P(^VA(200,DA,1),U,7)=D3
  1. . Q
  1. F DA=.9:0 S DA=$O(^DIC(16,DA)) Q:DA'>0 S %=$G(^DIC(16,DA,"A3")) I % S ^VA(200,"A16",DA,%)="" ;This may build more that a reindex.
  1. Q
  1. F6DD W !,"Add X-refs to the provider file to keep file 200 in sync with it."
  1. D ^A4A7P601,^A4A7P602
  1. D IX(6,2),IX(6,3),IX(6,5),IX(6,6),IX(6,100)
  1. Q
  1. FE53X W !,"Build the new X-ref on DEA# and VA#."
  1. F A4K7="53.2^1","53.3^1" S DIK="^VA(200,",DIK(1)=A4K7 D ENALL^DIK W "."
  1. Q
  1. F6XR W !,"Now to update the NEW PERSON file with DEA,VA,TYPE,CLASS data from PROVIDER."
  1. F A4K7="2^1","3^1","5^2","6^2" S DIK="^DIC(6,",DIK(1)=A4K7 D ENALL^DIK W "."
  1. Q
  1. IX(FILE,FIELD) W "."
  1. S DA(1)=FILE,DIK="^DD("_FILE_",",DA=FIELD D IX1^DIK
  1. Q
  1. Q Q