bug fix patientId "SELECT DISTINCT(al.patientId) FROM ActivityLog al
WHERE al.patientId IS NOT NULL AND al.patientId != 0"