Contractions... 27 weeks 2.days

Olivia
Had period like painful cramps for about 2 almost 3 hrs today. My drs got me in and I saw a dr different than my own. They had me hooked to the monitors for about an hr. I had 5 maybe 6 contractions that registered on the machine. Dr ran a bunch of tests looking for next ions as the cause. I'm not dilating. Contractions stopped but I was told to watch for more pain and to go straight to l&d if anything more happens. I have gestational diabetes and definitely wasn't dehydrated. Anyone having contractions??