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

BMEMSTR.m

Go to the documentation of this file.
  1. BMEMSTR ; IHS/PHXAO/TMJ - Master Routine Population ;
  1. ;;1.0T1;MEDICAID ELIGIBILITY DOWNLOAD;;JUN 25, 2003
  1. ;
  1. ;
  1. ;This Routine Populates the Master List and is called from BMEMED
  1. ;If Patient is added 1st time to MEDICAID ELIGIBLE FILE, then Patient
  1. ;is also added 1st time to BME MEDICAID MASTER LIST File
  1. ;
  1. ;If Patient already Exists in MEDICAID ELIGIBLE File AND a
  1. ;Updated Date is entered into the Eligibility Dt Multiple
  1. ;then the Patient Record already exists in this file and only
  1. ;the Updated Date & Still Eligible Date fields are populated
  1. ;
  1. ;
  1. ;The FALL Line Tag is Only called from BMEMFALL Routine
  1. ;Only if an Ending Date has been added to an existing
  1. ;Beginning Elig Date in Medicaid Elig. File
  1. ;
  1. ;Adding New Patients to Master List-Called from NEW^BMEMED
  1. NEW ;EP -- create new entry in BME MEDICAID MASTER LIST File ^BMEMSTR(
  1. Q:$O(^BMEMASTR("B",+DFN,0)) ;Quit if already in Master List
  1. D ^XBFMK K DIADD,DINUM
  1. S X=DFN,DIC="^BMEMASTR(",DIC(0)="L",DLAYGO=90334
  1. S DIC("DR")=".02////"_DT_";.06////"_BMEMEED ;New Add DT - Triggers Still Elig. DT
  1. D FILE^DICN S BMEIEN=+Y D ^XBFMK K DIADD,DINUM
  1. Q
  1. ;
  1. UPDATES ;EP - Edit Existing BME MEDICAID MASTR LIST Entries
  1. ;Called from MED^BMEMED -Update Dates - Still Eligible Dates
  1. S BMEIEN=$O(^BMEMASTR("B",DFN,0)) D:'BMEIEN NEW ;Add Record to Master File if not there
  1. S BMEIEN=$O(^BMEMASTR("B",DFN,0)) Q:'BMEIEN ;Quit if still not in Master
  1. S DIE="^BMEMASTR(",DA=BMEIEN,DR=".03////"_DT_";.06////"_BMEMEED
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q
  1. ;
  1. STILLACT ;EP - Still Active Tags ONLY - No Adds/No Updates - Fall throughs
  1. ;Called from MED^BMEMED -Update Dates - Still Eligible Dates
  1. S BMEIEN=$O(^BMEMASTR("B",DFN,0)) D:'BMEIEN NEW ;Add Record to Master if missing
  1. S BMEIEN=$O(^BMEMASTR("B",DFN,0)) Q:'BMEIEN ;Quit if still not in Master
  1. S DIE="^BMEMASTR(",DA=BMEIEN,DR=".04////"_DT_";.06////"_BMEMEED
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q
  1. ;
  1. FALL ;EP - Fall Off Date
  1. ;Called from ^BMEMFALL - If Ending Date is added to Medicaid Eligible File
  1. Q:'$D(^BMEMASTR(BMEMAIEN,0)) ;Quit if still not in Master
  1. S DIE="^BMEMASTR(",DA=BMEMAIEN,DR=".05////"_DT
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q