Text this: Accuracy and generalizability of using automated methods for identifying adverse events from electronic health record data