Sharp pain

Severe R pelvic pain&cramps.Misscarriage last year&didn't get checked.No STD.What could it be?What tests would my gynecologist want to do on me&why?