There are two versions of this SQL: Firebird and MySQL. The MySQL version only applies to clients who are have migrated to MySQL.. All other Practices should continue to use the Firebird version of this code. Click to expand and copy the code you need. If you are unsure which code to use, please check with your Practice Administrator. |
About
This report shows which notes have been finalized and cosigned for dates of service in a date range you specify. This can be filtered or modified to show what percent of nurse practitioner/PA notes have been finalized and cosigned. You will be able to deduce trends in the elapsed time periods between the notes being finalized and being cosigned.
A sample image of this SQL report run in the Database Viewer is shown below:
Caveats
- Sick and well notes are included.
- FINAL_DATE is when the nurse practitioner finalized the note. If this is blank, the note has not yet been finalized.
- COSIGN_ADDR_ID is the OP user ID of the physician who co-signed the note, and COSIGN DATE is the timestamp when the note was cosigned. If those last two fields are blank, it hasn't been cosigned yet.
SQL Code: Firebird
To highlight and copy the code below to your clipboard, simply click the Copy button.
select patno, date1 as dos, 'encounter note' as note_type, staffname as rendering, final_date, cosign_addr_id, cosign_date from enc_note inner join staff1 on staff1.staffid = enc_note.p_addr_id where date1 between :Start_date and :end_date union select patno, date1 as dos, 'well note' as note_type, staffname as rendering, final_date, cosign_addr_id, cosign_date from physical inner join staff1 on staff1.staffid =physical.p_addr_id where date1 between :Start_date and :end_date
SQL Code: MySQL
To highlight and copy the code below to your clipboard, simply click the Copy button.
select patno, date1 as dos, 'encounter note' as note_type, staffname as rendering, final_date, cosign_addr_id, cosign_date from enc_note inner join staff1 on staff1.staffid = enc_note.p_addr_id where date1 between :Start_date and :end_date union select patno, date1 as dos, 'well note' as note_type, staffname as rendering, final_date, cosign_addr_id, cosign_date from physical inner join staff1 on staff1.staffid =physical.p_addr_id where date1 between :Start_date and :end_date