A 16-year-old girl presents with lower abdominal pain and fever. On physical examination, a tender adnexal mass is felt. Further questioning in private reveals the following: she has a new sexual partner; her periods are irregular; she has a vaginal discharge. The most likely diagnosis is