Identifying causal patterns and errors in adverse clinical incidents