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

DGENELA2.m

Go to the documentation of this file.
  1. DGENELA2 ;ALB/CJM,ERC,JAM - Patient Eligibility API ; 13 JUN 1997
  1. ;;5.3;Registration;**147,688,1064**;Aug 13,1993;Build 41
  1. ;
  1. DELELIG(DFN,DGELG) ;
  1. ;Description: Deletes eligibilities from the patient file Patient
  1. ;Eligibilities multiple that are not contained in DGELG() array.
  1. ;
  1. ;Input:
  1. ; DFN - ien of Patient record
  1. ; DGELG() - eligibility array (pass by reference)
  1. ;Output: none
  1. ;
  1. N DIK,DA,CODE
  1. S DA(1)=DFN
  1. S DIK="^DPT("_DFN_",""E"","
  1. S DA=0 F S DA=$O(^DPT(DFN,"E",DA)) Q:'DA D
  1. .S CODE=+$G(^DPT(DFN,"E",DA,0))
  1. .;
  1. .;don't delete if it belongs
  1. .Q:$D(DGELG("ELIG","CODE",CODE))
  1. .;
  1. .;don't delete if it's the primary eligibility code
  1. .Q:(CODE=DGELG("ELIG","CODE"))
  1. .D ^DIK
  1. Q
  1. ;
  1. DELRDIS(DFN) ;
  1. ;Description: deletes Rated Disability multiple from the patient file
  1. ;
  1. ;Input:
  1. ; DFN - ien of Patient record
  1. ;Output: none
  1. ;
  1. N DIK,DA
  1. S DA(1)=DFN
  1. S DIK="^DPT("_DFN_",.372,"
  1. S DA=0 F S DA=$O(^DPT(DFN,.372,DA)) Q:'DA D ^DIK
  1. Q
  1. UPDZ11 ;update the VistA Patient file record with data
  1. ;from the incoming Z11
  1. ;
  1. ;call moved from STORE^DGENELA1
  1. I '$$UPD^DGENDBS(2,DFN,.DATA) S ERROR="FILEMAN FAILED TO UPDATE THE PATIENT RECORD" Q
  1. ;
  1. ;check P&T and P&T Effective Date - the date field has a
  1. ;lower field number if gets updated first. And if the P&T was 'N' or
  1. ;null and the date field is set, the date field will be deleted by
  1. ;the trigger cross reference on P&T
  1. N DATA3013
  1. I $G(DATA(.304))="Y",($G(DATA(.3013))]""),($P($G(^DPT(DFN,.3)),U,13)'=DATA(.3013)) D
  1. . S DATA3013(.3013)=DATA(.3013)
  1. . I '$$UPD^DGENDBS(2,DFN,.DATA3013) S ERROR="FILEMAN FAILED TO UPDATE P&T EFFECTIVE DATE" Q
  1. Q
  1. INDSTATUS(DFN) ; Returns Indian copay status for a patient
  1. ; jam; this tag added for Patch DG*5.3*1064
  1. ; Input: DFN - patient DFN
  1. ; Returns: 1 - (TRUE) if INDIAN SELF IDENTIFICATION field (#.571) equals YES,
  1. ; and the patient's ENROLLMENT STATUS is equal to VERIFIED.
  1. ;
  1. I '$G(DFN) Q 0
  1. I $$ENROLLED^DGENA(DFN)&($$GET1^DIQ(2,DFN_",",.571,"E")="YES") Q 1
  1. Q 0