Contractions

So I went to the hospital last night because I was having the worse contractions and vomiting uncontrollably. I learned that I had a bladder infection and that I was dilated 3 centimeters. I don't have contractions throughout the day but at night they start up and make me extremely anxious. Anyone else going through this?