Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGCV.m

    r628 r636  
    1 DGCV ;ALB/DW,ERC,BRM,TMK - COMBAT VET ELIGIBILTY; 10/15/05 ; 3/24/08 7:28am
    2  ;;5.3;Registration;**528,576,564,673,778**; Aug 13, 1993;Build 9
     1DGCV ;ALB/DW,ERC,BRM,TMK - COMBAT VET ELIGIBILTY; 10/15/05
     2 ;;5.3;Registration;**528,576,564,673**; Aug 13, 1993
    33 ;
    44CVELIG(DFN) ;
    5  ;API will determine whether or not this veteran needs to have CV End
     5 ;API will determine whether or not this vetearn needs to have CV End
    66 ;Date set.  If this determination cannot be done due to imprecise
    77 ;or missing dates, it returns which dates need editing.
     
    1010 ;Output
    1111 ;  RESULT
    12  ;    0 - CV End Date should not be set
    13  ;    1 - CV End Date should be set
     12 ;    0 - CV End Date should not be updated
     13 ;    1 - CV End Date should be updated
    1414 ;  If critical dates are imprecise return the following
    15  ;    A - CV End Date should not be set, imprecise Service Sep date
    16  ;    B - CV End Date should not be set, imprecise Combat To date
    17  ;    C - CV End Date should not be set, imprecise Yugoslavia To date
    18  ;    D - CV End Date should not be set, imprecise Somalia To date
    19  ;    E - CV End Date should not be set, imprecise Pers Gulf To date
     15 ;    A - CV End Date should not be updated, imprecise Service Sep date
     16 ;    B - CV End Date should not be updated, imprecise Combat To date
     17 ;    C - CV End Date should not be updated, imprecise Yugoslavia To date
     18 ;    D - CV End Date should not be updated, imprecise Somalia To date
     19 ;    E - CV End Date should not be updated, imprecise Pers Gulf To date
    2020 ;  If the Service Sep Date is missing, and there are no OEF/OIF/UNKNOWN
    2121 ;    OEF/OIF records on file, return the following so that it  will
     
    8484 ;
    8585SETCV(DFN,DGSRV) ;calculate CV end date
    86  ;    DGSRV is the most recent of the Service Separation Date
    87  ;    or the OEF/OIF To Date, called from file #2 new style
    88  ;    cross reference "ACVCOM"
    89  N DGCVEDT,DGFDA,DGNDAA,DGPLUS3,DGTMPDT,DGYRS
    90  S DGNDAA=3080128
     86 K DGCVEDT
     87 N DGFDA
    9188 I $G(DFN)']""!($G(DGSRV)']"") Q
    9289 I '$D(^DPT(DFN)) Q
     90 S DGCVEDT=$P($$SCH^XLFDT("24M",DGSRV),".")
     91 I DGCVEDT=$G(DGCVDT) Q
    9392 I $$GET1^DIQ(2,DFN_",",.5295,"I") Q
    94  D CVRULES(DFN,DGSRV,.DGYRS)
    95  Q:$G(DGYRS)'=3&($G(DGYRS)'=5)
    96  ;NDAA legislation, enacted 1/28/08, gives vets discharged
    97  ;on or after 1/28/03 (2 years previously) CV Eligibility
    98  ;for 5 years.  Vets discharged before 1/28/03 get eligibility
    99  ;for 3 years after enactment (or until 1/27/2011) DG*5.3*778
    100  S DGTMPDT=$S(DGYRS=3:DGNDAA,1:DGSRV)
    101  S DGCVEDT=($E(DGTMPDT,1,3)+DGYRS)_$E(DGTMPDT,4,7)
    102  S DGCVEDT=$$FMADD^XLFDT(DGCVEDT,-1)
    10393 S DGFDA(2,DFN_",",.5295)=DGCVEDT
    10494 D FILE^DIE(,"DGFDA")
    105  Q
    106  ;
    107 CVRULES(DFN,DGSRV,DGYRS) ;apply rules for the CV End Date
    108  ;extension project - DG*5.3*778
    109  ;DGSRV - most recent of Service Sep Date or OEIUUF to date
    110  ;   DGYRS = 3 years from NDAA or 1/27/2011
    111  ;         = 5 years from SSD or Enrollment App Date
    112  ;determine how many years extra CV eligibility to give
    113  N DGCIEN,DGCUTOFF,DGENRDT,DGPIEN,DGPRI,DGQT,DGSTAT
    114  ;determine if veteran has an enrollment record prior
    115  ;to 1/28/2008 (the NDAA date) and no CV End Date for
    116  ;this enrollment
    117  S DGYRS=5
    118  S (DGPRI,DGQT)=0
    119  S DGCUTOFF=3030128
    120  S DGCIEN=$$FINDCUR^DGENA(DFN)
    121  I $G(DGCIEN),($D(^DGEN(27.11,DGCIEN,0)))]"" D
    122  . S DGENRDT=$$GET1^DIQ(27.11,DGCIEN_",",75.01,"I") Q:$G(DGENRDT)']""
    123  . I $P(DGENRDT,".",1)<DGNDAA S DGPRI=1 Q
    124  . I DGENRDT'<DGNDAA D
    125  . . S DGPIEN=DGCIEN
    126  . . F  S DGPIEN=$$FINDPRI^DGENA(DGPIEN) Q:'DGPIEN  D  Q:DGQT
    127  . . . S DGENRDT=$$GET1^DIQ(27.11,DGPIEN_",",75.01,"I")
    128  . . . Q:$G(DGENRDT)']""
    129  . . . I $P(DGENRDT,".",1)<DGNDAA S (DGPRI,DGQT)=1
    130  ;if DGPRI=1, then there is an enrollment prior to 1/28/08
    131  I DGPRI=1 D  Q
    132  . I $G(DGCIEN)]"" S DGSTAT=$$GET1^DIQ(27.11,DGCIEN_",",.04,"E")
    133  . I $G(DGSTAT)["INITIAL APPLICATION BY VAMC"!($G(DGSTAT)["BELOW ENROLLMENT GROUP THRESHOLD") D
    134  . . I DGSRV<DGCUTOFF S DGYRS=3
    135  ;
    136  ;if no enrollment prior to 1/28/08 (DGPRI=0) check service date
    137  ;against cutoff date - 1/28/03
    138  I DGSRV<DGCUTOFF S DGYRS=3
    13995 Q
    14096 ;
Note: See TracChangeset for help on using the changeset viewer.