One of the considerations for the flank pain would be kidney stones. This should be evaluated by your personal physician.
A urine test can be obtained to ensure there is no blood in the urine. The most sensitive test to evaluate for stones would be a non-contrast CT scan, although an ultrasound or plain films can be considered as well.
In any cause, I would discuss these tests with your personal physician.
Followup with your personal physician is essential.
This answer is not intended as and does not substitute for medical advice - the information presented is for patient education only. Please see your personal physician for further evaluation of your individual case.
Thanks,
Kevin, M.D.