Thanks for query,
1,it is likely that you might have some infection in your genital tract.
Keep local hygiene proper.
2,you are having gastroenterits causing diarrhea
Take anti diarrheal tablet like ofloxacillin and meftal spas
Take plenty of water,buttermilk, curd.
3,The pain you got under the rib may be due to costochondritis
Ok and bye.