We are currently updating the OP Help Center content for the release of OP 14.19 or OP 19. OP 19 is a member of the certified OP 14 family of products (official version is 14.19.1), which you may see in your software (such as in Help > About) and in the Help Center tabs labeled 14.19. You may also notice that the version number in content and videos may not match the version of your software, and some procedural content may not match the workflow in your software. We appreciate your patience and understanding as we make these enhancements.

SQL: Total Insurance Adjustment Amounts for Period, Grouped by Type

About

Identifies total insurance adjustments by type between two dates you specify.
The ADJ CODE (Adjustment Code) column displays the internal OP Code that is converted from the EOB to an OP archived_transaction.

A sample image of this SQL report run in the Database Viewer is shown below:

Caveats

This includes only insurance-side adjustments.

Code

To highlight and copy the code below to your clipboard, simply click the Copy button.

select round(sum(adjustment),2) as total_adjusted, adj_code, descript from
(
select trnsxno, patno, adjustment, date1, cptcode, adj_code, descript from archive_transactions at1
left outer join (select * from code_table where group_id = 1) ct  on ct.code_id = at1.adj_code

where at1.adj_code >0 and at1.date1 between :startdate and :enddate and at1.archive_flag = 1
order by adj_code
) group by  adj_code, descript