- BMEMLOAD ; IHS/PHXAO/TMJ - LOAD THE MEDICAID FILE DRIVER ROUTINE ; [ 06/11/03 3:29 PM ]
- ;1.0;AZAM PHOENIX AREA MEDICAID UTILITIES;February 14, 2001
- ;
- MAIN ; -- this is the main program loop
- ;
- UNIX ;Reads the Unix AHCCCS Elig. Roster to ^AZAGMED(GLOBAL
- ;This Global is Killed off each month at time of new run
- ;
- D ^AZAGMED
- ;
- ;
- UPLOAD ;Upload Eligibility Data to RPMS From ^AZAGMED(GLOBAL
- ;Creates Monthly Temporary No Match File ^AZAMED(GLOBAL
- ;This Temporary File is Killed off each month at time of new run
- ;Populates RPMS Master Elig. File ^AZAMSTR(GLOBAL
- ;
- ;Check to make sure a complete Unit File has been read
- ;& the ^AZAGMED( Global has completed to the final record
- ;The last Record in Global should match the 20-24 position
- ;for record count (Plus One). Quit if incomplete ^AZAGMED
- ;Global is created.
- ;^AZAGMED(60167)=XX200105019999980006016600000000000
- ;
- S LASTREC=$O(^AZAGMED(""),-1) ;Get Last Record
- S LASTDATA=$E(^AZAGMED(LASTREC),20,24) ;Get Pos 20-24
- S LASTDATA=LASTDATA+1 ;Add one count for check
- I LASTREC'=LASTDATA W !!,"Incomplete Global",! Q ;Quit if incomplete
- ;
- D ^AZAMED
- ;
- ;
- FALLOFF ;Run the Eligibility Fall Off Patients
- ;This Routine runs through the RPMS Master File and provides
- ;a List of Pts (who were Eligible the previous Month's Run)
- ;but are not included in the current Month's Roster
- ;Populates the RPMS Master Elig. File with Fall Off Date
- ;
- D ^AZAMFALL
- ;
- ;
- ;
- ;End of Process Kill off Variables
- Q
- ;
- ;
- MSG ;Message Displays - Don't Use on TaskMan
- ;Would utilize only if User Ran Process
- ;W !!,"Finished loading the State of Arizona Medicaid File"
- ;W !!,"Now uploading the State information into the RPMS database..."
- ;D ^AZAMED
- ;Q
- ;
- END ; -- write the final message
- ;W !!,"Finished, uploading the medicaid information into RPMS"
- ;W !!,"The new information is in the RPMS database"
- ;Q
- BMEMLOAD ; IHS/PHXAO/TMJ - LOAD THE MEDICAID FILE DRIVER ROUTINE ; [ 06/11/03 3:29 PM ]
- +1 ;1.0;AZAM PHOENIX AREA MEDICAID UTILITIES;February 14, 2001
- +2 ;
- MAIN ; -- this is the main program loop
- +1 ;
- UNIX ;Reads the Unix AHCCCS Elig. Roster to ^AZAGMED(GLOBAL
- +1 ;This Global is Killed off each month at time of new run
- +2 ;
- +3 DO ^AZAGMED
- +4 ;
- +5 ;
- UPLOAD ;Upload Eligibility Data to RPMS From ^AZAGMED(GLOBAL
- +1 ;Creates Monthly Temporary No Match File ^AZAMED(GLOBAL
- +2 ;This Temporary File is Killed off each month at time of new run
- +3 ;Populates RPMS Master Elig. File ^AZAMSTR(GLOBAL
- +4 ;
- +5 ;Check to make sure a complete Unit File has been read
- +6 ;& the ^AZAGMED( Global has completed to the final record
- +7 ;The last Record in Global should match the 20-24 position
- +8 ;for record count (Plus One). Quit if incomplete ^AZAGMED
- +9 ;Global is created.
- +10 ;^AZAGMED(60167)=XX200105019999980006016600000000000
- +11 ;
- +12 ;Get Last Record
- SET LASTREC=$ORDER(^AZAGMED(""),-1)
- +13 ;Get Pos 20-24
- SET LASTDATA=$EXTRACT(^AZAGMED(LASTREC),20,24)
- +14 ;Add one count for check
- SET LASTDATA=LASTDATA+1
- +15 ;Quit if incomplete
- IF LASTREC'=LASTDATA
- WRITE !!,"Incomplete Global",!
- QUIT
- +16 ;
- +17 DO ^AZAMED
- +18 ;
- +19 ;
- FALLOFF ;Run the Eligibility Fall Off Patients
- +1 ;This Routine runs through the RPMS Master File and provides
- +2 ;a List of Pts (who were Eligible the previous Month's Run)
- +3 ;but are not included in the current Month's Roster
- +4 ;Populates the RPMS Master Elig. File with Fall Off Date
- +5 ;
- +6 DO ^AZAMFALL
- +7 ;
- +8 ;
- +9 ;
- +10 ;End of Process Kill off Variables
- +11 QUIT
- +12 ;
- +13 ;
- MSG ;Message Displays - Don't Use on TaskMan
- +1 ;Would utilize only if User Ran Process
- +2 ;W !!,"Finished loading the State of Arizona Medicaid File"
- +3 ;W !!,"Now uploading the State information into the RPMS database..."
- +4 ;D ^AZAMED
- +5 ;Q
- +6 ;
- END ; -- write the final message
- +1 ;W !!,"Finished, uploading the medicaid information into RPMS"
- +2 ;W !!,"The new information is in the RPMS database"
- +3 ;Q