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

AZAMSTR.m

Go to the documentation of this file.
  1. BMEMSTR ;Master Routine Population [ 06/11/03 3:31 PM ]
  1. ;
  1. ;
  1. ;This Routine Populates the Master List and is called from AZAMED
  1. ;If Patient is added 1st time to MEDICAID ELIGIBLE FILE, then Patient
  1. ;is also added 1st time to AZA 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 AZAMFALL 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^AZAMED
  1. NEW ; -- create new entry in AZA MEDICAID MASTER LIST File ^AZAMSTR(
  1. Q:$O(^AZAMSTR("B",+DFN,0)) ;Quit if already in Master List
  1. D ^XBFMK K DIADD,DINUM
  1. S X=DFN,DIC="^AZAMASTR(",DIC(0)="L",DLAYGO=1180007
  1. S DIC("DR")=".02////"_DT_";.06////"_EED ;New Add DT - Triggers Still Elig. DT
  1. D FILE^DICN S IEN=+Y D ^XBFMK K DIADD,DINUM
  1. Q
  1. ;
  1. UPDATES ;Edit Existing AZA MEDICAID MASTR LIST Entries
  1. ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
  1. S IEN=$O(^AZAMASTR("B",DFN,0)) D:'IEN NEW ;Add Record to Master File if not there
  1. S IEN=$O(^AZAMASTR("B",DFN,0)) Q:'IEN ;Quit if still not in Master
  1. S DIE="^AZAMASTR(",DA=IEN,DR=".03////"_DT_";.06////"_EED
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q
  1. ;
  1. STILLACT ;Still Active Tags ONLY - No Adds/No Updates - Fall throughs
  1. ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
  1. S IEN=$O(^AZAMASTR("B",DFN,0)) D:'IEN NEW ;Add Record to Master if missing
  1. S IEN=$O(^AZAMASTR("B",DFN,0)) Q:'IEN ;Quit if still not in Master
  1. S DIE="^AZAMASTR(",DA=IEN,DR=".04////"_DT_";.06////"_EED
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q
  1. ;
  1. FALL ;Fall Off Date
  1. ;Called from ^AZAMFALL - If Ending Date is added to Medicaid Eligible File
  1. Q:'$D(^AZAMASTR(MASIEN,0)) ;Quit if still not in Master
  1. S DIE="^AZAMASTR(",DA=MASIEN,DR=".05////"_DT
  1. D ^DIE K DIE,DR,DA
  1. ;
  1. Q