We are currently updating the OP Help Center content for the release of OP 19, which is a member of the certified OP 14 family of products. OP 19’s 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: All Accounts with Credits without Patient Name

About

This SQL shows all patients with nonzero patient or insurance credits. You can apply a filter in the dropdown to exclude whatever it is you don't want to see.

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

Caveats

None.

Code

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

select * from
(select patno, round(sum(ins_amount),2) as ins_credit, round(sum(pat_amount),2) as pat_credit from patient_credit_acct group by patno
)
where (pat_credit >= 0.01 or pat_credit <=-0.01 or ins_credit >=0.01 or ins_credit <= -0.01)