Hi,
How are you? If flank pain is accompanied by fever, chills, blood in the urine, or frequent or urgent urination, then a kidney problem is the likely cause. Other differentials include: pyelonephritis, kidney stone or kidney abscess; spinal arthritis; disk disease and even muscle spasm. What tests were done? I would recommend that you drink plenty of fluids and have a regular follow-up with your doctor.
Take care and keep us posted.
I am going through the same thing. Some people say that I have endo and others think that I have something called polycystic kidney disease. I am still waiting for someone to figure it out but you may want to mention that to your doctor. Good Luck