Ftm. No idea what's going on

Claire
36 weeks. I was in L&d Saturday contracting every 2-3 minutes I was dilated to a 1 which I hadn't been before. I was sent home because my cervix wasnt dilating. Last night and this morning I've been having some pain at my cervix and some contractions a few hurt. And I also noticed some thick discharge and I haven't discharged at all this pregnancy. I have no idea what this means or what's going on.