Urinalysis. If you have fever, chill, sweats, different quality or severity of back pain, groin pain, painful/burning urination, more or less frequent urination, cloudy or bloody/dark urine, it may be related to the bladder, ureters, or kidneys. The first step is a urinalysis at any doctor's office or lab.
History +examination. Kidney: history of blood in urine +ve urinalysis, pain not related to twisting spine, flank muscles and spinal muscles not tender, pain caused by ttapping lower rib cage on back, abnormal ultrasound, normal spine x-rays. Back muscle: no hematuria, twisting + bending painful, may feel muscle "knot", rib tapping ok, ultrasound -> normal kidneys, spinal x-ray ?Abnormal discs, ?Vertebral bone spurs.