Report of unsigned encounters

What report or SQL query can I run to find unsigned encounters? I do not use OpenEMR for billing.
–RBL

Which version are you using, 500, 501, or 502?

Daniel,

I am using version 5.0.1 patch 7.

–Ralf

This query should help you. Where tid = NULL are the encounters that have not been signed.

select fe.date, fe.encounter, fe.pid, pd.fname, pd.lname, es.tid, concat(u.fname, ' ', u.lname) as provider from form_encounter fe left join esign_signatures es on fe.encounter = es.tid join patient_data pd on pd.pid = fe.pid join users u on provider_id = u.id order by date desc

Here is an example of what you should expect to see. I have removed all PHI from this report.

I do write custom reports for a fee and I’d be happy to provide you with my services. Instead of having to mess around with phpMyAdmin (which can be dangerous) I can make these reports available to you from the openEMR interface.

Here is an example of a customer report I created which tracks changes made to appointment statuses by staff user. This gives the ability to know who talked to a patient when an appointment was cancelled. I use dataTables which presents the reports in a nicer format than the native OpenEMR interface. There is also sorting and searching capability that allows you to dynamically search for information without having to re-query.

1 Like

Thank you @growlingflea !! You rock. It worked.
–Ralf

You’re welcome!! I’m happy to help.

Very much appreciated. When I have some extra cash, I will very likely contact you about making custom reports. Right now it’s Raman noodle time :smile:.

1 Like

I came upon this thread and wanted to revive the topic. I recently ran the same query to try and find unsigned encounters. From my query report, there were a few that were tid=NULL, but when I looked at the actual encounter in OpenEMR, it was in fact signed.

I also have a modified version of the same query to compare the date an encounter was signed vs when the encounter actually happened. The date of the actual esign on the bottom of an encounter also does not agree with what the report shows in most instances. Has anyone else run into this issue?

Thanks!
Kacie

Did you run this exact query:

select fe.date, fe.encounter, fe.pid, pd.fname, pd.lname, es.tid, concat(u.fname, ’ ', u.lname) as provider from form_encounter fe left join esign_signatures es on fe.encounter = es.tid join patient_data pd on pd.pid = fe.pid join users u on provider_id = u.id order by date desc

?

I suspect that your pid could be off depending on whether patients were patients were merged, deleted, etc.

Hi @Ralf_Lukner, thank you for writing back to me; I realize this is a very old thread. I have run that exact query but also several modified versions of it. We have a list of maybe a handful of clients that have been deleted or merged, but not very many. What I am finding is that any queries that we use to weed out unsigned encounters or pull the dates of the esignatures/lock, they are pulling inaccurately for some reason. A very large quantity of encounters come up as having NULL for the encounter esignature, but they are signed. As well as many of them showing a date and time that an encounter was signed, that does not match our EHR. Is it possible that the date/time of the signature and lock date or status is being pulled as the last time something was edited? Maybe changes were made after the encounter was originally signed and that is why the date disagrees? We are trying to find a logical explanation for what seems very strange. I had just wondered if anyone else had run into such a thing or if anyone knew what we were missing. Thanks for your help!