Hello. Thanks for using the forum. Pain on the right side under the rib can be due to various reasons, the first one being gall stones
. However ultrasound
scans should easily be able to diagnose those. Kidney
infections also can cause such symptoms, however then you would also have other symptoms such as burning sensation when passing urine, increase frequency of urination or pain radiating towards the urinary bladder
. Follow this up with a urine test.
Muscles spasms and inflammation of the last pair of ribs is another cause, since you also did mention that you feel it after taking deep breath. Continue to take your anti-inflammatory medication and if pain does not subside go for a rescan and also for a chest xray. If you have questions for further clarifications feel free to ask. Regards.