As the pain is below your rib cage on the right side,liver and Gall bladder
diseases have to be ruled out.
Ultrasound abdomen will diagnose them,particularly Gall stones.
Till then,please take Anti inflammatory drug along with PPI like Rabeprazole
. You also add Smooth muscle relaxant
If you come back after Ultrasound report,i will clarify further.
Wish you good health