Since blood and urine tests would rule out problems with the kidneys and liver, I guess it's possible that you have some kind of infection or inflammation in your colon, something not detectable via sonogram. The left side sounds odd since it's the right side that has everything like the gall bladder and the appendix, so colon was all I could think of. If it's something like that, it would stand to reason that it could travel to other bodily systems, such as your ovaries. I don't know too much about this, but from what I understand the colon is the likeliest culprit. It could be anything from an infection, to IBS, to polyps, to even cancer. Ask your doctor to arrange a colonoscopy for you. I know there are two kinds. I don't know what they're called, but I know that the lower colon is the portion routinely screened. I also know that you can request to have your upper colon screened as well (which it sounds like you may need since the pain is so high up.)
Best of luck to you, I hope this gets resolved for you soon.
I'm editing my response because I thought of something else it might be. You could be experiecing some type of regular spasm in your intercostal muscles. They are the muscles that bind your ribs together. Talk to your doctor about that too.