Audit Trail for AppointmentCreate PermType = 25

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
dporter
Posts: 18
Joined: Thu Jan 07, 2010 8:58 am
Contact:

Audit Trail for AppointmentCreate PermType = 25

Post by dporter » Mon Apr 07, 2014 9:57 pm

Hi,

I'm running 14.1 and for some reason not all appointments created for new patients are logged in the SecurityLog table where PermType = 25 (ApptCreate). We use this audit trail to know who created the appointments for new patients. Since March 1st only ~half of the new patient appointments are being logged.

You can run this query to see which new patient appointments are missing from the SecurityLog table. We have multiple offices and all databases show the same basic results. My guess is that new patient appointments are created in multiple ways. One of those ways is not logging the action.

SELECT a.aptnum, s.*
FROM appointment a
LEFT JOIN securitylog s ON a.aptnum = s.fkey AND s.permtype = 25
WHERE a.AptDateTime >= '2014-03-01'
AND a.isnewpatient = 1;

Thanks for any help.

Post Reply