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

AGGAGE.m

Go to the documentation of this file.
  1. AGGAGE ;VNGT/HS/ALA - Age Function calls ; 21 Apr 2010 9:50 AM
  1. ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
  1. ;;
  1. ;
  1. AGE(D0,PDATE,QUAL) ;EP
  1. ; Description
  1. ; This program is copied from the computed AGE field (2,.033) which
  1. ; calculates the AGE of a person based on their DOB (date of birth)
  1. ; and either the current date (DT) or their DOD (date of death)
  1. ;
  1. ; It has been modified to use another date passed into this function
  1. ; instead of just the previous two dates, DT and DOD.
  1. ;
  1. ; Input
  1. ; D0 - Patient IEN
  1. ; PDATE - Other date to compare patient's date of birth with
  1. ; QUAL - Include qualifier (YRS, DYS, MOS)
  1. ;
  1. ; Assumes variables U,DT
  1. ;
  1. S PDATE=$G(PDATE,""),QUAL=$G(QUAL,"")
  1. I $P($G(^DPT(D0,0)),U,3)="" Q ""
  1. Q $$AGE^AUPNPAT(D0,PDATE,QUAL)