The Calgary Police are way over thinking this. Simple solution:


/*
* NOTIFY MANAGER OF ALL EMPLOYEES THAT ARE TURNING
* THEIR SIRENS ON FOR NON-EMERGENCY REASONS
* - label it "haven't finished paperwork"
*/
var emergencies = sql('select car, emp, start, stop from AutoSirenState');
var reports = sql('select emp, start, stop from ActionReports');
var incomplete = emergencies
.filter((emerg) -> {
return 0 == reports.filter((r) -> {r.start < emerg.start && emerg.end < r.end});
})
.group((emerg) -> emerg.emp)
;
for(var emp in incomplete){
sendemail({
to: emp
,cc: [emp.manager, ALLSTAFF]
,subject: 'Outstanding Action Reports'
,body: '${Emp} has outstanding action reports. Please remember that these reports are required for all action events you are involved in.'
})
}

Everytime I implement something like this at a new organization, you go through a few stages:

1. Employees cry that management doesn't trust them
2. Employees get used to it
2b. Modest improvements start to be seen in productivity
3. Management cries that they can't keep up with the paperwork
4. Management get's used to it
4b. Modest improvements start to be seen in productivity
5. Employees become dependant on the reminder.
5. Huge improvements start to be seen

It usually takes 8 months for the full pattern to play out.

(BTW) Calgary Police: my rates are reasonable.