Ruptured Ovarian Cyst

I recently had to go to the hospital for a ruptured ovarian cyst. It was so painful. They admitted me for a few days and it is slowly getting better. Has anyone else ever had this happen? How long did it take for you to heal? Did it affect future fertility? I'm so nervous it will happen again.