Case–control study to investigate variables associated with incidents and adverse events in the emergency department