Welcome to the Pain Management forum. We are a community of chronic pain patients. Although none of us are doctors and no doctors monitor this forum, we do have some very smart people here. Like Jaybay who just gave you some great advice.
I agree with Jaybay. You should call your doctor in the morning. It's not something that will get better by itself. You need medical treatment.
Sara
It could be a whole lot of things, but you need a doctor to diagnose it. Right upper quadrant pain that radiates through to the back usually indicates a problem with the gallbladder or somewhere else in the billiary tree. If the pain gets worse when you eat (particularly a fatty meal) then that makes gallbladder an even more likely suspect. The urine issue may be not even be related to the rib cage pain but should be evaluated. Please do call your doctor tomorrow. Something is obviously wrong and it's not something that you should attempt to diagnose and treat yourself.