this seems to be due to the presence of kidney stones.Kidney stones typically leave the body by passage in the urine stream, and many stones are formed and passed without causing symptoms. If stones grow to sufficient size before passage—on the order of at least 2-3 millimeters—they can cause obstruction of the ureter.
The resulting obstruction with dilation or stretching of the upper ureter as well as spasm of muscle, trying to move the stone, can cause severe episodic pain, most commonly felt in the flank, lower abdomen and groin (a condition called renal colic).
The pain described by you sounds like a classic renal colic.Renal colic can be associated with nausea and vomiting .
Hematuria (bloody urine) is commonly present due to damage to the lining of the urinary tract.
Imaging is used to confirm the diagnosis and a number of other tests can be undertaken to help establish both the possible cause and consequences of the stone.
Narcotics like codeine can be prescribed for the pain.Taken at the first sign of pain, hydrocodone can eliminate much of the acute pain, nausea and vomiting which necessitates the hospital visit and still facilitate stone passage, although a follow-up with a physician is still necessary.
About 90% of stones 4 mm or less in size usually will pass spontaneously, you just need to keep drinking plenty of water to help in the flushing-out of the stone.