Another important cause of such pain along with diarrhea is found in inflammatory bowel disease(Crohn’s disease or ulcerative colitis).Other causes
of pain under the right ribs and diarrhea
may be gastrointestinal infections,irritable bowel syndrome,ovarian
cysts and ectopic pregnancy in females.
Variou investigations are needed to confirm a diagnosis.It includes complete blood count,ultrasound abdomen,CT abdomen,liver profile and colonoscopy and biopsy(in IBS).