“…We used an iterative approach to develop an algorithm to predict CIED procedures with a true infection. We began with previously developed clinical diagnostic and treatment flags from structured data 26 : temperature at or higher than 100.3 °F (38.0 °C), any antibiotic prescribed for more than 3 days, antibiotics typically used to treat Staphylococcal infections, microbiology test order, and an International Statistical Classification of Diseases and Related Health Problems, Tenth Revision, Clinical Modification ( ICD-10-CM ) code diagnosis of either an SSI, nonspecific infection, or cardiac device infection (eTable 2 in the Supplement ). Next, we considered other factors that might affect the presence of infection-related flags, including comorbidities, emergent procedure, and death within 90 days.…”