Kidney stones are extremely common. Many times, they are caused simply by not drinking enough fluids. This is probably the reason that your urologist
told you to cut back on coffee, as coffee, soda, and similar beverages are all diuretics which can actually contribute to dehydration. For people who have had an episode of kidney stones, it is better to focus on drinking larger volumes of water and non dehydrating beverages.
For people who have recurrent episodes of kidney stones, it is often helpful to perform analysis of the stones and of the urine. This is because there are several genetic dispositions to kidney stones caused by variations in how the kidney modifies the chemical composition of the urine. Similarly, there are several different chemical subtypes of kidney stones. Knowing this information can help your doctors determine whether additional medications or changes to your diet may help to prevent the formation of more stones.
However, if this is just a single episode of kidney stones, it may not be necessary to collect this information - if you make sure to drink plenty of water, it is likely that you will be fine. Please talk to your urologist or your kidney doctor
for more advice.