I would like to think this may be a case of costochondritis as this may present with sharp stabbing pain that may be associated with deep breathing. However in the presence of swollen extremities, urinary symptoms and back pains then costochondritis is ruled out.
Jus a few questions to clarify:
How would you describe the pain. Is this sharp,stabbing,dull,throbbing,vague or diffuse?
Is there any associated pain in other parts of the body?
Did the pain and urinary symptoms occur at the same time? If not,which came first?
Also, is there any associated change in urine character ( red or tea colored urine), passing of sediments ( stones?) or difficulty initiating urination?
I suggest that you seek immediate consult with a nephrologist to have this completely assessed by your physician .A urinalysis , CT scan of the kidneys,ureter and bladder and certain blood tests to determine kidney functions are essential. Presence of swelling in the extremities with pain and urinary symptoms may suggest kidney disease.
Is the swelling in the extremities more prominent as you sit or stand for a long time? Or is this something not dependent with position or posture?Is the swelling worst in the mornings?
When you press on the swollen area do they form pits from where your fingers pressed on them?