Two seperate things.. one is related to stomach pain n headache after eating. Maybe you are allergic/ intolerant to some food like gluten or lactose.. ., may be worm infestation.you need a gastro enterolgy opinion.
Second is your periods. If you have had unprotected sexual intercourse.., you need a
pregnancy test ., if not., your gynaecologist will guide you