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: Unfinalized Notes


This report shows all sick and well notes that have not yet been finalized.

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


  • Excludes notes in a chart for a patient whose surname is TESTPATIENT or TEST. You can add additional names to omit by following the same format as TESTPATIENT and TEST appear in the code.
  • Does not include notes generated in 2010 or before (OP notes before 2011 used a different structure).


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

select a.patno, a.date1, fname, lname, staffname from

select enc_note.patno, p_addr_id, enc_note.date1, enc_note.final_date from enc_note
select physical.patno, p_addr_id, physical.date1, physical.final_date from physical

) a
inner join register on a.patno = register.patno
inner join staff1 on staff1.staffid = a.p_addr_id
where final_date is null and lname not in ('TESTPATIENT','TEST')
and date1 >'1/1/2011'
order by staffname