This report shows payments and adjustments received during a user-defined period, for dates of service performed during another user-defined period.
A sample image of this SQL report run in the Database Viewer is shown below:
- Voided amounts are excluded.
- “Payments received dates” are defined as the OP payment date, rather than the posted payment date or the daysheet date.
To highlight and copy the code below to your clipboard, simply click the Copy button.
select round(sum(total_paid),2) as total_payment, round(sum(total_adjusted),2) as total_adjustment from ( select patno, dos, cptcode, total_paid, total_adjusted from ( select patno, date1 as dos, trnsxno, cptcode from archive_transactions at1 where archive_Flag = 1 and date1 between :dos_start and :dos_end and txnopaid = 0 ) a left outer join (select txnopaid, sum(payment+copayrecd) as total_paid, sum(copayadjustment+adjustment) as total_adjusted from archive_transactions where archive_flag = 1 and date1 between :payment_start and :payment_end and txnopaid >0 group by txnopaid) b on a.trnsxno = b.txnopaid where ( total_paid >= 0.01 or total_adjusted >= 0.01) )