Index: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGREGAED.m
===================================================================
--- FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGREGAED.m	(revision 631)
+++ FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGREGAED.m	(revision 636)
@@ -1,4 +1,20 @@
-DGREGAED ;ALB/DW/PHH - Address Edit API; 9/1/2005
- ;;5.3;Registration;**522,560,658,730**;Aug 13, 1993;Build 2
+DGREGAED ;ALB/DW/PHH - Address Edit API; 1/5/2006  23:03 ;10/10/06  08:05
+ ;;5.3;Registration;**522,560,658,730,634**;Aug 13, 1993;Build 28
+ ; Modified from FOIA VISTA,
+ ; Copyright (C) 2007 WorldVistA
+ ;
+ ; This program is free software; you can redistribute it and/or modify
+ ; it under the terms of the GNU General Public License as published by
+ ; the Free Software Foundation; either version 2 of the License, or
+ ; (at your option) any later version.
+ ;
+ ; This program is distributed in the hope that it will be useful,
+ ; but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ ; GNU General Public License for more details.
+ ;
+ ; You should have received a copy of the GNU General Public License
+ ; along with this program; if not, write to the Free Software
+ ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 EN(DFN,FLG) ;Entry point
  ;Input: 
@@ -11,5 +27,5 @@
  N I,X,Y
  I $G(DFN)="" Q
- ;I ($G(DFN)'?.N) Q
+ I ($G(DFN)'?.N) Q
  S FLG(1)=$G(FLG(1)),FLG(2)=$G(FLG(2))
  D INPUT(.DGINPUT,DFN)
@@ -29,5 +45,19 @@
  N DIR,X,Y,DA,DGR,DTOUT,DUOUT,DIROUT,DGN,POP
  S POP=0
- F DGN=.111,.112,.113,.1112,.131,.132,.121 Q:POP  D
+ ;
+ ; ** VOE change 1 of 3: DAOU/WCJ 2/7/2005,VA/CJS,WV/TOAD 1/5/2006 **
+ ;
+ ; .134 is new field ALTERNATE PHONE for VOE
+ ;
+ ; before change:
+ ;
+ ; F DGN=.111,.112,.113,.1112,.131,.132,.121 Q:POP  D
+ ;
+ ; after change:
+ ;
+ F DGN=.111,.112,.113,.1112,.131,.132,.134,.121 Q:POP  D
+ . ;
+ . ; end change
+ . ;
  . I ($G(DGINPUT(.111))="")&((DGN=.112)!(DGN=.113)) Q
  . I ($G(DGINPUT(.112))="")&(DGN=.113) Q
@@ -37,4 +67,11 @@
  .. I $G(DGR)=-1 S POP=1 Q
  .. N DGM F DGM=.1112,.114,.115,.117 S DGINPUT(DGM)=$G(DGR(DGM))
+ . ;
+ . ; new line:
+ . ;
+ . I DGN=.134,$G(DUZ("AG"))'="E" Q
+ . ;
+ . ; ** end of VOE change 1 **
+ . ;
 AGN . S DIR(0)=2_","_DGN
  . S DA=DFN
@@ -50,8 +87,26 @@
  I $G(POP)=1 S DGINPUT=-1
  Q
-COMPARE(DGINPUT,DFN) ;Display before & after address fields
+COMPARE(DGINPUT,DFN) ;Display before & after address fields.
  N DGCURR,DGN,DGCMP,DGM,DGCNTY,DGCIEN,DGST
  D GETS^DIQ(2,DFN_",",".111;.112;.113;.114;.115;.117;.1112;.131;.132;.121","EI","DGCURR")
- F DGN=.111,.112,.113,.114,.115,.117,.1112,.131,.132,.121 D
+ ;
+ ; ** VOE change 2 of 3: DAOU/WCJ 2/7/2005,VA/CJS,WV/TOAD 1/5/2006 **
+ ;
+ ; for VOE agency code, add new ALTERNATE PHONE field (.134)
+ ; to DGCMP("OLD") array
+ ;
+ ; before change:
+ ;
+ ; F DGN=.111,.112,.113,.114,.115,.117,.1112,.131,.132,.121 D
+ ; . S DGCMP("OLD",DGN)=$G(DGCURR(2,DFN_",",DGN,"E"))
+ ;
+ ; after change:
+ ;
+ I $G(DUZ("AG"))="E" D GETS^DIQ(2,DFN,.134,"EI","DGCURR")
+ F DGN=.111,.112,.113,.114,.115,.117,.1112,.131,.132,.134,.121 D
+ . I $G(DUZ("AG"))'="E",DGN=.134 Q  ; skip for non-VOE
+ . ;
+ . ; ** end of VOE change 2 **
+ . ;
  . S DGCMP("OLD",DGN)=$G(DGCURR(2,DFN_",",DGN,"E"))
  S DGCIEN=$G(DGCURR(2,DFN_",",.117,"I"))
@@ -77,4 +132,15 @@
  .. W !,?6,"   Phone: ",?16,$P($G(DGCMP(DGM,.131)),U)
  .. W !,?6,"  Office: ",?16,$P($G(DGCMP(DGM,.132)),U)
+ .. ;
+ .. ; ** VOE change 3 of 3: DAOU/WCJ 2/7/2005,VA/CJS,WV/TOAD 1/5/2006 **
+ .. ;
+ .. ; for VOE agency code, display new ALTERNATE PHONE field (.134)
+ .. ;
+ .. ; insert line:
+ .. ;
+ .. I $G(DUZ("AG"))="E" W !,?6," Alt Phone: ",?16,$P($G(DGCMP(DGM,.134)),U)
+ .. ;
+ .. ; ** end of VOE change 3 **
+ .. ;
  . W !,?6,"Bad Addr: ",?16,$P($G(DGCMP(DGM,.121)),U)
  . W !
