This report shows the entire charge and payment activity on a particular chart/account for a specified date range.
A sample image of this SQL report run in the Database Viewer is shown below:
- Voids are excluded.
- The date range refers to the date of service. Payments may have come in any time after the date of service, including time periods after the end date
To highlight and copy the code below to your clipboard, simply click the Copy button.
select at1.date1, at1.cptcode, at1.ins_carrier_code, at1.charge, at1.units, at1.trnsxno, at2.ins_paid, at2.pt_paid from (select date1, cptcode, ins_carrier_code, charge, trnsxno, units from archive_transactions where archive_flag = 1 and date1 between :Start_date and :enddate and patno = :chart_number and cptcode not in ('1','2','3','4')) at1 left outer join (select sum(payment) as ins_paid, sum(copayrecd) as pt_paid, txnopaid from (select copayrecd, payment, txnopaid from archive_transactions where archive_flag = 1 and (copayrecd >= 0.01 or payment >= 0.01)) group by txnopaid) at2 on at2.txnopaid = at1.trnsxno