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: Unbilled Well Notes

About

This report shows all well notes with nothing billed on those dates of service for a date of service range that you specify.

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

Caveats

A well note will show with a blank row under "CODES" if no CPT codes of any kind were billed on that date of service.

Code

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

select physical.patno, fname, lname, physical.date1, dwp, codes from physical
inner join register on register.patno = physical.patno
left outer join (select patno, date1, list(cptcode,',') as codes from archive_transactions where date1 between :start_Date and :end_date and archive_Flag = 1 and cptcode not in ('1','2','3','4') group by patno, date1) a on a.patno = physical.patno and a.date1 = physical.date1
where physical.date1 between :start_Date and :end_date