- BMEMSTR ;Master Routine Population [ 06/11/03 3:31 PM ]
- ;
- ;
- ;This Routine Populates the Master List and is called from AZAMED
- ;If Patient is added 1st time to MEDICAID ELIGIBLE FILE, then Patient
- ;is also added 1st time to AZA MEDICAID MASTER LIST File
- ;
- ;If Patient already Exists in MEDICAID ELIGIBLE File AND a
- ;Updated Date is entered into the Eligibility Dt Multiple
- ;then the Patient Record already exists in this file and only
- ;the Updated Date & Still Eligible Date fields are populated
- ;
- ;
- ;The FALL Line Tag is Only called from AZAMFALL Routine
- ;Only if an Ending Date has been added to an existing
- ;Beginning Elig Date in Medicaid Elig. File
- ;
- ;Adding New Patients to Master List-Called from NEW^AZAMED
- NEW ; -- create new entry in AZA MEDICAID MASTER LIST File ^AZAMSTR(
- Q:$O(^AZAMSTR("B",+DFN,0)) ;Quit if already in Master List
- D ^XBFMK K DIADD,DINUM
- S X=DFN,DIC="^AZAMASTR(",DIC(0)="L",DLAYGO=1180007
- S DIC("DR")=".02////"_DT_";.06////"_EED ;New Add DT - Triggers Still Elig. DT
- D FILE^DICN S IEN=+Y D ^XBFMK K DIADD,DINUM
- Q
- ;
- UPDATES ;Edit Existing AZA MEDICAID MASTR LIST Entries
- ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
- S IEN=$O(^AZAMASTR("B",DFN,0)) D:'IEN NEW ;Add Record to Master File if not there
- S IEN=$O(^AZAMASTR("B",DFN,0)) Q:'IEN ;Quit if still not in Master
- S DIE="^AZAMASTR(",DA=IEN,DR=".03////"_DT_";.06////"_EED
- D ^DIE K DIE,DR,DA
- ;
- Q
- ;
- STILLACT ;Still Active Tags ONLY - No Adds/No Updates - Fall throughs
- ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
- S IEN=$O(^AZAMASTR("B",DFN,0)) D:'IEN NEW ;Add Record to Master if missing
- S IEN=$O(^AZAMASTR("B",DFN,0)) Q:'IEN ;Quit if still not in Master
- S DIE="^AZAMASTR(",DA=IEN,DR=".04////"_DT_";.06////"_EED
- D ^DIE K DIE,DR,DA
- ;
- Q
- ;
- FALL ;Fall Off Date
- ;Called from ^AZAMFALL - If Ending Date is added to Medicaid Eligible File
- Q:'$D(^AZAMASTR(MASIEN,0)) ;Quit if still not in Master
- S DIE="^AZAMASTR(",DA=MASIEN,DR=".05////"_DT
- D ^DIE K DIE,DR,DA
- ;
- Q
- BMEMSTR ;Master Routine Population [ 06/11/03 3:31 PM ]
- +1 ;
- +2 ;
- +3 ;This Routine Populates the Master List and is called from AZAMED
- +4 ;If Patient is added 1st time to MEDICAID ELIGIBLE FILE, then Patient
- +5 ;is also added 1st time to AZA MEDICAID MASTER LIST File
- +6 ;
- +7 ;If Patient already Exists in MEDICAID ELIGIBLE File AND a
- +8 ;Updated Date is entered into the Eligibility Dt Multiple
- +9 ;then the Patient Record already exists in this file and only
- +10 ;the Updated Date & Still Eligible Date fields are populated
- +11 ;
- +12 ;
- +13 ;The FALL Line Tag is Only called from AZAMFALL Routine
- +14 ;Only if an Ending Date has been added to an existing
- +15 ;Beginning Elig Date in Medicaid Elig. File
- +16 ;
- +17 ;Adding New Patients to Master List-Called from NEW^AZAMED
- NEW ; -- create new entry in AZA MEDICAID MASTER LIST File ^AZAMSTR(
- +1 ;Quit if already in Master List
- IF $ORDER(^AZAMSTR("B",+DFN,0))
- QUIT
- +2 DO ^XBFMK
- KILL DIADD,DINUM
- +3 SET X=DFN
- SET DIC="^AZAMASTR("
- SET DIC(0)="L"
- SET DLAYGO=1180007
- +4 ;New Add DT - Triggers Still Elig. DT
- SET DIC("DR")=".02////"_DT_";.06////"_EED
- +5 DO FILE^DICN
- SET IEN=+Y
- DO ^XBFMK
- KILL DIADD,DINUM
- +6 QUIT
- +7 ;
- UPDATES ;Edit Existing AZA MEDICAID MASTR LIST Entries
- +1 ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
- +2 ;Add Record to Master File if not there
- SET IEN=$ORDER(^AZAMASTR("B",DFN,0))
- IF 'IEN
- DO NEW
- +3 ;Quit if still not in Master
- SET IEN=$ORDER(^AZAMASTR("B",DFN,0))
- IF 'IEN
- QUIT
- +4 SET DIE="^AZAMASTR("
- SET DA=IEN
- SET DR=".03////"_DT_";.06////"_EED
- +5 DO ^DIE
- KILL DIE,DR,DA
- +6 ;
- +7 QUIT
- +8 ;
- STILLACT ;Still Active Tags ONLY - No Adds/No Updates - Fall throughs
- +1 ;Called from MED^AZAMED -Update Dates - Still Eligible Dates
- +2 ;Add Record to Master if missing
- SET IEN=$ORDER(^AZAMASTR("B",DFN,0))
- IF 'IEN
- DO NEW
- +3 ;Quit if still not in Master
- SET IEN=$ORDER(^AZAMASTR("B",DFN,0))
- IF 'IEN
- QUIT
- +4 SET DIE="^AZAMASTR("
- SET DA=IEN
- SET DR=".04////"_DT_";.06////"_EED
- +5 DO ^DIE
- KILL DIE,DR,DA
- +6 ;
- +7 QUIT
- +8 ;
- FALL ;Fall Off Date
- +1 ;Called from ^AZAMFALL - If Ending Date is added to Medicaid Eligible File
- +2 ;Quit if still not in Master
- IF '$DATA(^AZAMASTR(MASIEN,0))
- QUIT
- +3 SET DIE="^AZAMASTR("
- SET DA=MASIEN
- SET DR=".05////"_DT
- +4 DO ^DIE
- KILL DIE,DR,DA
- +5 ;
- +6 QUIT