OBJECTIVE To develop and validate time-efficient automated electronic search strategies for identifying preoperative risk factors for postoperative acute lung injury. PATIENTS AND METHODS This secondary analysis of a prospective cohort study included 249 patients undergoing high-risk surgery between November 1, 2005, and August 31, 2006. Two independent data-extraction strategies were compared. The first strategy used a manual review of medical records and the second a Web-based query-building tool. Web-based searches were derived and refined in a derivation cohort of 83 patients and subsequently validated in an independent cohort of 166 patients. Agreement between the 2 search strategies was assessed with percent agreement and Cohen κ statistics. RESULTS Cohen κ statistics ranged from 0.34 (95% confidence interval, 0.00-0.86) for amiodarone to 0.85 for cirrhosis (95% confidence interval, 0.57-1.00). Agreement between manual and automated electronic data extraction was almost complete for 3 variables (diabetes mellitus, cirrhosis, H(2)-receptor antagonists), substantial for 3 (chronic obstructive pulmonary disease, proton pump inhibitors, statins), moderate for gastroesophageal reflux disease, and fair for 2 variables (restrictive lung disease and amiodarone). Automated electronic queries outperformed manual data collection in terms of sensitivities (median, 100% [range, 77%-100%] vs median, 87% [range, 0%-100%]). The specificities were uniformly high (≥ 96%) for both search strategies. CONCLUSION Automated electronic query building is an iterative process that ultimately results in accurate, highly efficient data extraction. These strategies may be useful for both clinicians and researchers when determining the risk of time-sensitive conditions such as postoperative acute lung injury.