A 9-week pregnant woman presents with lower abdominal pain and light spotting. Her last menstrual period was 9 weeks ago but she is unsure of dates. A urine pregnancy test is positive. She has mild tenderness in the right iliac fossa and no peritoneal signs. What is the most appropriate investigation to help exclude ectopic pregnancy?