Comparison of potential risk factors for medication errors with and without patient harm