If you're experiencing severe pain at 31 weeks then I would call your maternity ward / Ob... any out of place severe pain should be checked or discussed asap just to be on the safe side.