About
This report identifies unique Medicaid encounters (patient and date of service) for Medicaid, for 90 days beginning on a reference date you specify. It is meant to be used to make sure you have properly labeled all the different Medicaid insurance plans in your practice as “Medicaid” before you attempt to compute a percent Medicaid for Meaningful Use.
A sample image of this SQL report run in the Database Viewer is shown below:
Caveats
- The insurance plan must be listed as a Medicaid in the OP insurance tables. Path: Utilities > Manage Practice > Insurance Payers > Edit > Claims/Routing > Claim type: Medicaid.
- Because this report is not intended to be used directly for Meaningful Use submission, all locations and all providers in the practice are grouped together.
- Only encounters where a claim was submitted to the Medicaid plan are counted - even if the claim was denied.
- Primary, secondary, and tertiary Medicaid plans are counted.
Code
To highlight and copy the code below to your clipboard, simply click the Copy button.
select ins_carrier.ins_carrier_code, ins_carrier_name, encounters from ins_carrier left outer join ( select count(uniqid) as encounters, ins_carrier_code from ( select distinct uniqid, ins_carrier_code from ( select patno, date1, (patno || ' ' || date1) as uniqid, cptcode, ins_carrier_code from archive_transactions at1 where at1.cptcode not in ('1','2','3','4') and pos not in (21,23) and at1.date1 between :attestation_start and ( :attestation_start + 89) and at1.archive_flag = 1 union select patno, date1, (patno || ' ' || date1) as uniqid, cptcode, ins_carrier_code_other as ins_carrier_code from archive_transactions at2 where at2.cptcode not in ('1','2','3','4') and pos not in (21,23) and at2.date1 between :attestation_start and ( :attestation_start + 89) and at2.archive_flag = 1 ) ata1 ) group by ins_carrier_code ) ata2 on ata2.ins_carrier_code = ins_carrier.ins_carrier_code where claim_filing_code = 'MC' and ins_carrier.archive_flag in (0,2)