Diagnosing ectopic pregnancy using Bayes theorem: a retrospective cohort study

Carlos A. Link, Jackson Maissiat, Ben W. Mol, Kurt T. Barnhart, Ricardo F. Savaris*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)


Objective: To verify the accuracy of an online algorithm using Bayes' theorem for diagnosing ectopic pregnancy (EP) using human chorionic gonadotropin (hCG), ultrasound, and clinical data in a real cohort. Design: A retrospective cohort study. Setting: Gynecologic emergency unit in a tertiary teaching hospital. Patient(s): First-trimester pregnant women who attended the gynecologic emergency unit for any reason. Those who had <13 weeks of pregnancy confirmed by a recent positive pregnancy test; a digital image or electronic report of transvaginal ultrasound (TVUS) obtained from hospital database; and a follow-up with a pathology report or a clinical resolution of a confirmed pregnancy were included in the study. Clinical signs and symptoms, the presence of risk factors for EP, the TVUS findings in each consultation, and the hCG levels were independent variables obtained from the electronic medical records. From these data, the pretest probability, based on the clinical presentation and risk factors, and the likelihood ratio for each variable were calculated for their use in the algorithm, yielding a posttest probability. Intervention: Not applicable. Main Outcome Measure(s): The accuracy of the online algorithm to identify cases of EP using clinical signs and symptoms, the presence of risk factors for EP, the TVUS findings in each consultation, and the hCG levels. The main outcome was EP, confirmed either by pathology report or by the presence of fetal heartbeat or gestational sac outside the uterine cavity. Result(s): Between January 1, 2009 and December 27, 2016, 2,495 women were analyzed, and the algorithm was applied to 2,185 of them. The incidence of EP was 8.5% (212/2,495); 310 women were excluded because they were submitted to surgery with decision thresholds <95%. The algorithm was applied to 2,185 women. Just one case remained inconclusive after 3 consultations, and it was considered as an error in prediction. The sensitivity, specificity, and accuracy values (95% confidence interval) of the algorithm were 98.9% (96.1%–99.8%), 98.9% (98.3%–99.2%), and 98.9% (98.3%–99.2%), respectively. Conclusion(s): The accuracy of the Bayesian algorithm to confirm or rule out EP is excellent. Online Nomogram https://docs.google.com/spreadsheets/d/1jStXlMBjbPyDf6_W0deKGKQLZHU5EFAe8rLhNVPuJuY/edit?usp=sharing

Original languageEnglish
Pages (from-to)78-86
Number of pages8
JournalFertility and Sterility
Issue number1
Early online date26 Oct 2022
Publication statusPublished - 3 Jan 2023


  • Bayes Theorem
  • data accuracy
  • diagnosis
  • Ectopic pregnancy
  • ultrasonography


Dive into the research topics of 'Diagnosing ectopic pregnancy using Bayes theorem: a retrospective cohort study'. Together they form a unique fingerprint.

Cite this