Many adverse event identification methods cannot detect errors until well after the event has occurred, as they rely on screening administrative data or review of the entire chart after discharge. Electronic medical records (EMRs) offer several potential patient safety advantages, such as decision support for averting medication or diagnostic errors. This study, conducted in the Veterans Affairs system, reports on the successful development of algorithms for screening clinicians' notes within EMRs to detect postoperative complications. The algorithms accurately identified a range of postoperative adverse events, with a lower false negative rate than the Patient Safety Indicators. As the accompanying editorial notes, these results extend the patient safety possibilities of EMRs to potentially allow for real time identification of adverse events.