The purpose of this study was to develop automated surveillance of postoperative infections using electronic health records (EHR) data to augment or replace manual chart review. EHR data for 18,143 patients who underwent operations at 5 UCHealth hospitals between 2015-2019 were linked to outcomes data from the National Surgical Quality Improvement Program (NSQIP), a sample of 12% of operations ascertained by manual chart review. EHR predictors included diagnosis codes, laboratory data, and medications prescribed within 30 days of the operation (~10,000 predictors). Outcomes included surgical site infection, urinary tract infection, sepsis, and pneumonia. The knockoff filter with lasso penalty was used to develop models for each outcome in a training set of operations up to October 2017. Performance of each model was tested in a hold-out dataset of patients who underwent operations between October 2017 through 2019. For all 4 outcomes, specificity was >90%, sensitivity was between 82-92%, and area under the curve was between 94-99%. Number of variables selected was between 16-70. The knockoff filter can successfully select parsimonious models for infection surveillance in EHR data.