A 25-year-old woman has a positive urine pregnancy test and unilateral pelvic pain with vaginal spotting.What must be ruled out first?