INTRODUCTION: Surveillance of ectopic pregnancy (EP) using electronic databases is important. We aimed to assess the validity of an enhanced version of a previously published algorithm, which used a combination of encounters with EP related diagnostic/procedure codes and methotrexate injections. The enhanced algorithm further included ICD-10 diagnostic/procedure codes along with telephone encounters and excluded cases with only abdominal EP codes. METHODS: Medical records of 681 women, aged 15–44 years with membership at Kaiser Permanente Southern and Northern California between 2009–2018 with a potential EP were reviewed and true cases were identified. The sensitivity, specificity, positive (PPV) and negative (NPV) predictive values and the overall performance (Youden's index and F-score) of the algorithm were evaluated and compared to the published algorithm. RESULTS: There were 418 true positive, 240 false positive, and 10 uncertain EP cases with available records. True positive and true negative EP cases did not differ significantly according to maternal age, race/ethnicity and smoking status. EP cases with only one encounter and non-tubal EP were more likely to be misclassified. The sensitivity, specificity, PPV, and NPV of the enhanced algorithm for EP were 96.4%, 80.8%, 89.8%, and 92.8%, respectively. The Youden index and F-score were 77.2% and 93.0%. The sensitivity and NPV were lower at 86.8% and 79.0%, respectively, for the published algorithm. CONCLUSION: The specificity of the algorithm for EP in the integrated healthcare databases is adequate to allow for use in future epidemiological studies. Use of the enhanced algorithm will likely result in better capture of true EP cases.