Google Costochondritis. Many of the symptoms you describe sound like this. I suffered from this for years, and I suspect you are well onto a diagnosis of this from your doctor.
Costochondritis is inflammation of the rib cartilidge. It is very painful and can broadcast throughout your body as well as around to your back.
Here is a test when you are feeling pain...press on the bottom right ribs. If they feel tender then this might be a possiblity. Gallstones mimic costo, and visa versa.
If you think this is what you have unfortunately there is no cure for it according to allopathic medicine. I cured my year year debilitating battle with it after starting a series of liver flushes. There is no doubt in my mind that it is an inflammation disease, and that is how I've attacked the problem. Many people with costo actually have fibromyalgia.
It's just a thought considering the pain you have described.