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

DG53426U.m

Go to the documentation of this file.
  1. DG53426U ;ALB/AEG - DG*5.3*426 POST-INSTALL UTILITIES ;2-13-02
  1. ;;5.3;Registration;**426,1015**;2-13-02;Build 21
  1. ;
  1. ; This routine contains a number of APIs/Utilities to be
  1. ; used in the post-installation cleanup of patch DG*5.3*426
  1. ;
  1. MTDA(DFN) ;Set up a data array of each patient's primary means test
  1. ; data.
  1. ;INPUT - DFN (REQUIRED)
  1. ;OUTPUT - NONE -- SET UP MEANS TEST DATA ON TMP GLOBAL
  1. ; ^TMP($J,"MTD",DFN)=DGMTI_"~~"_DGNODE
  1. N DGDT,DGIDT,DGMTI,DGMTST,DGNODE,DGCS,DGMTDT
  1. S (DGMTI,DGMTDT)=""
  1. F S DGMTDT=$O(^DGMT(408.31,"AD",1,DFN,DGMTDT)) Q:'DGMTDT D
  1. .F DGMTI=0:0 S DGMTI=$O(^DGMT(408.31,"AD",1,DFN,DGMTDT,DGMTI)) Q:'DGMTI D
  1. ..S DGNODE=$G(^DGMT(408.31,DGMTI,0)),DGCS=$P($G(DGNODE),U,3)
  1. ..I $G(DGNODE),$G(^("PRIM")) D
  1. ...D:((DGCS=6)!(DGCS=2))
  1. ....; Only store the last test which meets the criteria for
  1. ....; this cleanup.
  1. ....S ^TMP($J,"MTD",DFN)=DGMTI_"~~"_DGNODE
  1. ....Q
  1. ...Q
  1. ..Q
  1. .Q
  1. Q
  1. AGTP(DGMTI) ; This API will determine if the patient declined to provide
  1. ;; income info but agreed to pay the deductible for a given
  1. ; test OR if the veteran provided income information and agreed
  1. ; to pay the deductible.
  1. ;
  1. ; input - DGMTI - IEN of file 408.31 entry
  1. ; output - DGRETV - 1 = YES, Vet provided income info & Agreed to
  1. ; pay deductible.
  1. ; 2 = NO, Vet did not provide income info &
  1. ; Agreed to pay.
  1. ; 3 = NO, Vet did not provide income info & did
  1. ; not agree to pay (Ineligible)
  1. ; 4 = YES, Vet provided income info & did NOT
  1. ; Agree to pay.
  1. ; 0 = Error condition indicated.
  1. N DGRETV
  1. S DGRETV=0
  1. I '$D(^DGMT(408.31,DGMTI,0)) Q DGRETV
  1. I $D(^DGMT(408.31,DGMTI,0)) D
  1. .; Did not decline to provide income info & Agreed to Pay.
  1. .I '+$P($G(^DGMT(408.31,DGMTI,0)),U,14)&+$P($G(^DGMT(408.31,DGMTI,0)),U,11) D
  1. ..; Determine age of test and assign to appropriate sub-category
  1. ..; - If test date is greater than 10/5/99 - subcategory "a"
  1. ..; - If test date is less than 10/6/99 - subcategory "b"
  1. ..I $P($G(^DGMT(408.31,DGMTI,0)),U)>2991005 S DGRETV="1a"
  1. ..I $P($G(^DGMT(408.31,DGMTI,0)),U)<2991006 S DGRETV="1b"
  1. .; Did NOT provide income info but Agreed to pay. NO date restrictions
  1. .; on these veterans.
  1. .I +$P($G(^DGMT(408.31,DGMTI,0)),U,14)&+$P($G(^DGMT(408.31,DGMTI,0)),U,11) S DGRETV=2
  1. .; Did NOT provide income info & did NOT Agree to pay. (Not eligible)
  1. .I +$P($G(^DGMT(408.31,DGMTI,0)),U,14)&'+$P($G(^DGMT(408.31,DGMTI,0)),U,11) S DGRETV=3
  1. .; Did provide income info but did NOT agree to pay deductible.
  1. .I '+$P($G(^DGMT(408.31,DGMTI,0)),U,14)&'+$P($G(^DGMT(408.31,DGMTI,0)),U,11) S DGRETV=4
  1. Q DGRETV
  1. MM(XMZ) ; Write mail message to user screen and/or install file.
  1. D BMES^XPDUTL("Mail Message < #"_XMZ_" > sent.")
  1. Q