You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Kidney stone disease and explain in detail?
Kidney stone disease, also known as nephrolithiasis or urolithiasis, is a crystallopathy where a solid piece of material (kidney stone) develops in the urinary tract. Kidney stones typically form in the kidney and leave the body in the urine stream. A small stone may pass without causing symptoms. If a stone grows to more than 5 millimeters (0.2 inches), it can cause blockage of the ureter, resulting in sharp and severe pain in the lower back or abdomen. A stone may also result in blood in the urine, vomiting, or painful urination. About half of people who have had a kidney stone will have another within ten years.Most stones form by a combination of genetics and environmental factors. Risk factors include high urine calcium levels, obesity, certain foods, some medications, calcium supplements, hyperparathyroidism, gout and not drinking enough fluids. Stones form in the kidney when minerals in urine are at high concentration. The diagnosis is usually based on symptoms, urine testing, and medical imaging. Blood tests may also be useful. Stones are typically classified by their location: nephrolithiasis (in the kidney), ureterolithiasis (in the ureter), cystolithiasis (in the bladder), or by what they are made of (calcium oxalate, uric acid, struvite, cystine).In those who have had stones, prevention is by drinking fluids such that more than two liters of urine are produced per day. If this is not effective enough, thiazide diuretic, citrate, or allopurinol may be taken. It is recommended that soft drinks containing phosphoric acid (typically colas) be avoided. When a stone causes no symptoms, no treatment is needed; otherwise, pain control is usually the first measure, using medications such as nonsteroidal anti-inflammatory drugs or opioids. Larger stones may be helped to pass with the medication tamsulosin or may require procedures such as extracorporeal shock wave lithotripsy, ureteroscopy, or percutaneous nephrolithotomy.Between 1% and 15% of people globally are affected by kidney stones at some point in their lives. In 2015, 22.1 million cases occurred, resulting in about 16,100 deaths. They have become more common in the Western world since the 1970s. Generally, more men are affected than women. Kidney stones have affected humans throughout history with descriptions of surgery to remove them dating from as early as 600 BC.

Signs and symptoms
The hallmark of a stone that obstructs the ureter or renal pelvis is excruciating, intermittent pain that radiates from the flank to the groin or to the inner thigh. This is due to the transfer of referred pain signals from the lower thoracic splanchnic nerves to the lumbar splanchnic nerves as the stone passes down from the kidney or proximal ureter to the distal ureter. This pain, known as renal colic, is often described as one of the strongest pain sensations known. Renal colic caused by kidney stones is commonly accompanied by urinary urgency, restlessness, hematuria, sweating, nausea, and vomiting. It typically comes in waves lasting 20 to 60 minutes caused by peristaltic contractions of the ureter as it attempts to expel the stone.The embryological link between the urinary tract, the genital system, and the gastrointestinal tract is the basis of the radiation of pain to the gonads, as well as the nausea and vomiting that are also common in urolithiasis. Postrenal azotemia and hydronephrosis can be observed following the obstruction of urine flow through one or both ureters.Pain in the lower-left quadrant can sometimes be confused with diverticulitis because the sigmoid colon overlaps the ureter, and the exact location of the pain may be difficult to isolate due to the proximity of these two structures.

Risk factors
Dehydration from low fluid intake is a major factor in stone formation. Individuals living in warm climates are at higher risk due to increased fluid loss. Obesity, immobility, and sedentary lifestyles are other leading risk factors.High dietary intake of animal protein, sodium, sugars including honey, refined sugars, fructose and high fructose corn syrup, and excessive consumption of fruit juices may increase the risk of kidney stone formation due to increased uric acid excretion and elevated urinary oxalate levels (whereas tea, coffee, wine and beer may decrease the risk).Kidney stones can result from an underlying metabolic condition, such as distal renal tubular acidosis, Dents disease, hyperparathyroidism, primary hyperoxaluria, or medullary sponge kidney. 3–20% of people who form kidney stones have medullary sponge kidney.Kidney stones are more common in people with Crohns disease; Crohns disease is associated with hyperoxaluria and malabsorption of magnesium.A person with recurrent kidney stones may be screened for such disorders. This is typically done with a 24-hour urine collection. The urine is analyzed for features that promote stone formation.

Calcium oxalate
Calcium is one component of the most common type of human kidney stones, calcium oxalate. Some studies suggest that people who take calcium or vitamin D as a dietary supplement have a higher risk of developing kidney stones.  In the United States, kidney stone formation was used as an indicator of excess calcium intake by the Reference Daily Intake committee for calcium in adults.In the early 1990s, a study conducted for the Womens Health Initiative in the US found that postmenopausal women who consumed 1000 mg of supplemental calcium and 400 international units of vitamin D per day for seven years had a 17% higher risk of developing kidney stones than subjects taking a placebo. The Nurses Health Study also showed an association between supplemental calcium intake and kidney stone formation.Unlike supplemental calcium, high intakes of dietary calcium do not appear to cause kidney stones and may actually protect against their development. This is perhaps related to the role of calcium in binding ingested oxalate in the gastrointestinal tract. As the amount of calcium intake decreases, the amount of oxalate available for absorption into the bloodstream increases; this oxalate is then excreted in greater amounts into the urine by the kidneys. In the urine, oxalate is a very strong promoter of calcium oxalate precipitation—about 15 times stronger than calcium.
A 2004 study found that diets low in calcium are associated with a higher overall risk for kidney stone formation. For most individuals, other risk factors for kidney stones, such as high intakes of dietary oxalates and low fluid intake, play a greater role than calcium intake.

Other electrolytes
Calcium is not the only electrolyte that influences the formation of kidney stones. For example, by increasing urinary calcium excretion, high dietary sodium may increase the risk of stone formation.Drinking fluoridated tap water may increase the risk of kidney stone formation by a similar mechanism, though further epidemiologic studies are warranted to determine whether fluoride in drinking water is associated with an increased incidence of kidney stones. High dietary intake of potassium appears to reduce the risk of stone formation because potassium promotes the urinary excretion of citrate, an inhibitor of calcium crystal formation.Kidney stones are more likely to develop, and to grow larger, if a person has low dietary magnesium. Magnesium inhibits stone formation.

Animal protein
Diets in Western nations typically contain a large proportion of animal protein. Eating animal protein creates an acid load that increases urinary excretion of calcium and uric acid and reduced citrate. Urinary excretion of excess sulfurous amino acids (e.g., cysteine and methionine), uric acid, and other acidic metabolites from animal protein acidifies the urine, which promotes the formation of kidney stones. Low urinary-citrate excretion is also commonly found in those with a high dietary intake of animal protein, whereas vegetarians tend to have higher levels of citrate excretion. Low urinary citrate, too, promotes stone formation.

Vitamins
The evidence linking vitamin C supplements with an increased rate of kidney stones is inconclusive. The excess dietary intake of vitamin C might increase the risk of calcium-oxalate stone formation. The link between vitamin D intake and kidney stones is also tenuous.
Excessive vitamin D supplementation may increase the risk of stone formation by increasing the intestinal absorption of calcium; correction of a deficiency does not.

Pathophysiology
Supersaturation of urine
When the urine becomes supersaturated (when the urine solvent contains more solutes than it can hold in solution) with one or more calculogenic (crystal-forming) substances, a seed crystal may form through the process of nucleation. Heterogeneous nucleation (where there is a solid surface present on which a crystal can grow) proceeds more rapidly than homogeneous nucleation (where a crystal must grow in a liquid medium with no such surface), because it requires less energy. Adhering to cells on the surface of a renal papilla, a seed crystal can grow and aggregate into an organized mass. Depending on the chemical composition of the crystal, the stone-forming process may proceed more rapidly when the urine pH is unusually high or low.Supersaturation of the urine with respect to a calculogenic compound is pH-dependent. For example, at a pH of 7.0, the solubility of uric acid in urine is 158 mg/100 ml. Reducing the pH to 5.0 decreases the solubility of uric acid to less than 8 mg/100 ml. The formation of uric-acid stones requires a combination of hyperuricosuria (high urine uric-acid levels) and low urine pH; hyperuricosuria alone is not associated with uric-acid stone formation if the urine pH is alkaline. Supersaturation of the urine is a necessary, but not a sufficient, condition for the development of any urinary calculus. Supersaturation is likely the underlying cause of uric acid and cystine stones, but calcium-based stones (especially calcium oxalate stones) may have a more complex cause.

Randalls plaque
While supersaturation of urine may lead to crystalluria, it does not necessarily promote the formation of a kidney stone because the particle may not reach the sufficient size needed for renal attachment. On the other hand, Randalls plaques, which were first identified by Alexander Randall in 1937, are calcium phosphate deposits that form in the papillary interstitium and are thought to be the nidus required for stone development. In addition to Randalls plugs, which form in the Duct of Bellini, these structures can generate reactive oxygen species that further enhance stone formation.

Pathogenic bacteria
Some bacteria have roles in promoting stone formation. Specifically, urease-positive bacteria, such as Proteus mirabilis can produce the enzyme urease, which converts urea to ammonia and carbon dioxide. This increases the urinary pH and promotes struvite stone formation. Additionally, non-urease producing bacteria can provide bacteria components that can promote calcium oxalate crystallization, though this mechanism is poorly understood.

Inhibitors of stone formation
Normal urine contains chelating agents, such as citrate, that inhibit the nucleation, growth, and aggregation of calcium-containing crystals. Other endogenous inhibitors include calgranulin (an S-100 calcium-binding protein), Tamm–Horsfall protein, glycosaminoglycans, uropontin (a form of osteopontin), nephrocalcin (an acidic glycoprotein), prothrombin F1 peptide, and bikunin (uronic acid-rich protein). The biochemical mechanisms of action of these substances have not yet been thoroughly elucidated. However, when these substances fall below their normal proportions, stones can form from an aggregation of crystals.Sufficient dietary intake of magnesium and citrate inhibits the formation of calcium oxalate and calcium phosphate stones; in addition, magnesium and citrate operate synergistically to inhibit kidney stones. The efficacy of magnesium in subduing stone formation and growth is dose-dependent.

Hypocitraturia
Hypocitraturia or low urinary-citrate excretion (variably defined as less than 320 mg/day) can be a contributing cause of kidney stones in up to 2/3 of cases. The protective role of citrate is linked to several mechanisms; citrate reduces urinary supersaturation of calcium salts by forming soluble complexes with calcium ions and by inhibiting crystal growth and aggregation. Therapy with potassium citrate  is commonly prescribed in clinical practice to increase urinary citrate and to reduce stone formation rates. Alkali citrate is also used to increase urine citrate levels. It can be prescribed or found over-the-counter in pill, liquid or powder form.

Diagnosis
Diagnosis of kidney stones is made on the basis of information obtained from the history, physical examination, urinalysis, and radiographic studies. Clinical diagnosis is usually made on the basis of the location and severity of the pain, which is typically colicky in nature (comes and goes in spasmodic waves). Pain in the back occurs when calculi produce an obstruction in the kidney. Physical examination may reveal fever and tenderness at the costovertebral angle on the affected side.

Imaging studies
Calcium-containing stones are relatively radiodense, and they can often be detected by a traditional radiograph of the abdomen that includes the kidneys, ureters, and bladder (KUB film). KUB radiograph, although useful in monitoring size of stone or passage of stone in stone formers, might not be useful in the acute setting due to low sensitivity. Some 60% of all renal stones are radiopaque. In general, calcium phosphate stones have the greatest density, followed by calcium oxalate and magnesium ammonium phosphate stones. Cystine calculi are only faintly radiodense, while uric acid stones are usually entirely radiolucent.In people with a history of stones, those who are less than 50 years of age and are presenting with the symptoms of stones without any concerning signs do not require helical CT scan imaging. A CT scan is also not typically recommended in children.Otherwise a noncontrast helical CT scan with 5 millimeters (0.2 in) sections is the diagnostic method to use to detect kidney stones and confirm the diagnosis of kidney stone disease. Near all stones are detectable on CT scans with the exception of those composed of certain drug residues in the urine, such as from indinavir.
Where a CT scan is unavailable, an intravenous pyelogram may be performed to help confirm the diagnosis of urolithiasis. This involves intravenous injection of a contrast agent followed by a KUB film. Uroliths present in the kidneys, ureters, or bladder may be better defined by the use of this contrast agent. Stones can also be detected by a retrograde pyelogram, where a similar contrast agent is injected directly into the distal ostium of the ureter (where the ureter terminates as it enters the bladder).Renal ultrasonography can sometimes be useful, because it gives details about the presence of hydronephrosis, suggesting that the stone is blocking the outflow of urine. Radiolucent stones, which do not appear on KUB, may show up on ultrasound imaging studies. Other advantages of renal ultrasonography include its low cost and absence of radiation exposure. Ultrasound imaging is useful for detecting stones in situations where X-rays or CT scans are discouraged, such as in children or pregnant women. Despite these advantages, renal ultrasonography in 2009 was not considered a substitute for noncontrast helical CT scan in the initial diagnostic evaluation of urolithiasis. The main reason for this is that, compared with CT, renal ultrasonography more often fails to detect small stones (especially ureteral stones) and other serious disorders that could be causing the symptoms.On the contrary, a 2014 study suggested that ultrasonography should be used as the initial diagnostic imaging test, with further imaging studies be performed at the discretion of the physician on the basis of clinical judgment, and using ultrasonography rather than CT as an initial diagnostic test results in less radiation exposure and equally good outcome.

Laboratory examination
Laboratory investigations typically carried out include
microscopic examination of the urine, which may show red blood cells, bacteria, leukocytes, urinary casts, and crystals;
urine culture to identify any infecting organisms present in the urinary tract and sensitivity to determine the susceptibility of these organisms to specific antibiotics;
complete blood count, looking for neutrophilia (increased neutrophil granulocyte count) suggestive of bacterial infection, as seen in the setting of struvite stones;
renal function tests to look for abnormally high blood calcium levels (hypercalcemia);
24 hour urine collection to measure total daily urinary volume, magnesium, sodium, uric acid, calcium, citrate, oxalate, and phosphate;
collection of stones (by urinating through a StoneScreen kidney stone collection cup or a simple tea strainer) is useful. Chemical analysis of collected stones can establish their composition, which in turn can help to guide future preventive and therapeutic management.

Composition
Calcium-containing stones
By far, the most common type of kidney stones worldwide contains calcium. For example, calcium-containing stones represent about 80% of all cases in the United States; these typically contain calcium oxalate either alone or in combination with calcium phosphate in the form of apatite or brushite. Factors that promote the precipitation of oxalate crystals in the urine, such as primary hyperoxaluria, are associated with the development of calcium oxalate stones. The formation of calcium phosphate stones is associated with conditions such as hyperparathyroidism and renal tubular acidosis.Oxaluria is increased in patients with certain gastrointestinal disorders including inflammatory bowel disease such as Crohns disease or in patients who have undergone resection of the small bowel or small-bowel bypass procedures. Oxaluria is also increased in patients who consume increased amounts of oxalate (found in vegetables and nuts). Primary hyperoxaluria is a rare autosomal recessive condition that usually presents in childhood.Calcium oxalate crystals can come in two varieties. Calcium oxalate monohydrate can appear as dumbbells or as long ovals that resemble the individual posts in a picket fence. Calcium oxalate dihydrate have a tetragonal “envelope” appearance.

Struvite stones
About 10–15% of urinary calculi are composed of struvite (ammonium magnesium phosphate, NH4MgPO4·6H2O). Struvite stones (also known as "infection stones," urease, or triple-phosphate stones) form most often in the presence of infection by urea-splitting bacteria. Using the enzyme urease, these organisms metabolize urea into ammonia and carbon dioxide. This alkalinizes the urine, resulting in favorable conditions for the formation of struvite stones. Proteus mirabilis, Proteus vulgaris, and Morganella morganii are the most common organisms isolated; less common organisms include Ureaplasma urealyticum and some species of Providencia, Klebsiella, Serratia, and Enterobacter. These infection stones are commonly observed in people who have factors that predispose them to urinary tract infections, such as those with spinal cord injury and other forms of neurogenic bladder, ileal conduit urinary diversion, vesicoureteral reflux, and obstructive uropathies. They are also commonly seen in people with underlying metabolic disorders, such as idiopathic hypercalciuria, hyperparathyroidism, and gout. Infection stones can grow rapidly, forming large calyceal staghorn (antler-shaped) calculi requiring invasive surgery such as percutaneous nephrolithotomy for definitive treatment.Struvite stones (triple-phosphate/magnesium ammonium phosphate) have a coffin lid morphology by microscopy.

Uric acid stones
About 5–10% of all stones are formed from uric acid. People with certain metabolic abnormalities, including obesity, may produce uric acid stones. They also may form in association with conditions that cause hyperuricosuria (an excessive amount of uric acid in the urine) with or without hyperuricemia (an excessive amount of uric acid in the serum). They may also form in association with disorders of acid/base metabolism where the urine is excessively acidic (low pH), resulting in precipitation of uric acid crystals. A diagnosis of uric acid urolithiasis is supported by the presence of a radiolucent stone in the face of persistent urine acidity, in conjunction with the finding of uric acid crystals in fresh urine samples.As noted above (section on calcium oxalate stones), people with inflammatory bowel disease (Crohns disease, ulcerative colitis) tend to have hyperoxaluria and form oxalate stones. They also have a tendency to form urate stones. Urate stones are especially common after colon resection.
Uric acid stones appear as pleomorphic crystals, usually diamond-shaped.  They may also look like squares or rods which are polarizable.

Other types
People with certain rare inborn errors of metabolism have a propensity to accumulate crystal-forming substances in their urine. For example, those with cystinuria, cystinosis, and Fanconi syndrome may form stones composed of cystine. Cystine stone formation can be treated with urine alkalinization and dietary protein restriction.  People affected by xanthinuria often produce stones composed of xanthine. People affected by adenine phosphoribosyltransferase deficiency may produce 2,8-dihydroxyadenine stones, alkaptonurics produce homogentisic acid stones, and iminoglycinurics produce stones of glycine, proline, and hydroxyproline. Urolithiasis has also been noted to occur in the setting of therapeutic drug use, with crystals of drug forming within the renal tract in some people currently being treated with agents such as indinavir, sulfadiazine, and triamterene.

Location
Urolithiasis refers to stones originating anywhere in the urinary system, including the kidneys and bladder. Nephrolithiasis refers to the presence of such stones in the kidneys. Calyceal calculi are aggregations in either the minor or major calyx, parts of the kidney that pass urine into the ureter (the tube connecting the kidneys to the urinary bladder). The condition is called ureterolithiasis when a calculus is located in the ureter. Stones may also form or pass into the bladder, a condition referred to as bladder stones.

Size
Stones less than 5 mm (0.2 in) in diameter pass spontaneously in up to 98% of cases, while those measuring 5 to 10 mm (0.2 to 0.4 in) in diameter pass spontaneously in less than 53% of cases.Stones that are large enough to fill out the renal calyces are called staghorn stones and are composed of struvite in a vast majority of cases, which forms only in the presence of urease-forming bacteria. Other forms that can possibly grow to become staghorn stones are those composed of cystine, calcium oxalate monohydrate, and uric acid.

Prevention
Preventative measures depend on the type of stones. In those with calcium stones, drinking plenty of fluids, thiazide diuretics and citrate are effective as is allopurinol in those with high uric acid levels in urine.

Dietary measures
Specific therapy should be tailored to the type of stones involved. Diet can have an effect on the development of kidney stones. Preventive strategies include some combination of dietary modifications and medications with the goal of reducing the excretory load of calculogenic compounds on the kidneys. Dietary recommendations to minimize the formation of kidney stones include

increasing total fluid intake to achieve more than two liters per day of urine output;
limiting cola, including sugar-sweetened soft drinks; to less than one liter per week.
limiting animal protein intake to no more than two meals daily (an association between animal protein and recurrence of kidney stones has been shown in men);
increasing citrate, or alkali intake, including from lemon and lime juice. However, citric acid does not alkalinize urine like alkali citrate, which is citrate bonded with sodium, potassium and magnesium. This is because when citrate is metabolized (mostly by liver and some by kidney), the protons in citric acid will neutralize the bicarbonate generated, so that no net effect on blood or urine pH will occur.
Reducing sodium intake is associated with a reduction in urine calcium excretion.Maintenance of dilute urine by means of vigorous fluid therapy is beneficial in all forms of kidney stones, so increasing urine volume is a key principle for the prevention of kidney stones. Fluid intake should be sufficient to maintain a urine output of at least 2 litres (68 US fl oz) per day. A high fluid intake may reduce the likelihood of kidney stone recurrence or may increase the time between stone development without unwanted effects. 
Calcium binds with available oxalate in the gastrointestinal tract, thereby preventing its absorption into the bloodstream. Reducing oxalate absorption decreases kidney stone risk in susceptible people. Because of this, some doctors recommend increasing dairy intake so that its calcium content will serve as an oxalate binder. Taking calcium citrate tablets during or after meals containing high oxalate foods may be useful if dietary calcium cannot be increased by other means as in those with lactose intolerance. The preferred calcium supplement for people at risk of stone formation is calcium citrate, as opposed to calcium carbonate, because it helps to increase urinary citrate excretion.Aside from vigorous oral hydration and eating more dietary calcium, other prevention strategies include avoidance of higher doses of supplemental vitamin C (since ascorbate is metabolized to oxalate) and restriction of oxalate-rich foods such as leaf vegetables, rhubarb, soy products and chocolate. However, no randomized, controlled trial of oxalate restriction has been performed to test the hypothesis that oxalate restriction reduces stone formation. Some evidence indicates magnesium intake decreases the risk of symptomatic kidney stones.

Urine alkalinization
The mainstay for medical management of uric acid stones is alkalinization (increasing the pH) of the urine. Uric acid stones are among the few types amenable to dissolution therapy, referred to as chemolysis. Chemolysis is usually achieved through the use of oral medications, although in some cases, intravenous agents or even instillation of certain irrigating agents directly onto the stone can be performed, using antegrade nephrostomy or retrograde ureteral catheters. Acetazolamide is a medication that alkalinizes the urine. In addition to acetazolamide or as an alternative, certain dietary supplements are available that produce a similar alkalinization of the urine. These include alkali citrate, sodium bicarbonate, potassium citrate, magnesium citrate, and Bicitra (a combination of citric acid monohydrate and sodium citrate dihydrate). Aside from alkalinization of the urine, these supplements have the added advantage of increasing the urinary citrate level, which helps to reduce the aggregation of calcium oxalate stones.Increasing the urine pH to around 6.5 provides optimal conditions for dissolution of uric acid stones. Increasing the urine pH to a value higher than 7.0 may increase the risk of calcium phosphate stone formation, though this concept is controversial since citrate does inhibit calcium phosphate crystallization. Testing the urine periodically with nitrazine paper can help to ensure the urine pH remains in this optimal range. Using this approach, stone dissolution rate can be expected to be around 10 mm (0.4 in) of stone radius per month.

Slaked lime
It decreases urinary calcium when combined with food rich in oxalic acid such as green leafy vegetables.

Diuretics
One of the recognized medical therapies for prevention of stones is the thiazide and thiazide-like diuretics, such as chlorthalidone or indapamide. These drugs inhibit the formation of calcium-containing stones by reducing urinary calcium excretion. Sodium restriction is necessary for clinical effect of thiazides, as sodium excess promotes calcium excretion. Thiazides work best for renal leak hypercalciuria (high urine calcium levels), a condition in which high urinary calcium levels are caused by a primary kidney defect. Thiazides are useful for treating absorptive hypercalciuria, a condition in which high urinary calcium is a result of excess absorption from the gastrointestinal tract.

Allopurinol
For people with hyperuricosuria and calcium stones, allopurinol is one of the few treatments that have been shown to reduce kidney stone recurrences. Allopurinol interferes with the production of uric acid in the liver. The drug is also used in people with gout or hyperuricemia (high serum uric acid levels). Dosage is adjusted to maintain a reduced urinary excretion of uric acid. Serum uric acid level at or below 6 mg/100 ml is often a therapeutic goal. Hyperuricemia is not necessary for the formation of uric acid stones; hyperuricosuria can occur in the presence of normal or even low serum uric acid. Some practitioners advocate adding allopurinol only in people in whom hyperuricosuria and hyperuricemia persist, despite the use of a urine-alkalinizing agent such as sodium bicarbonate or potassium citrate.

Treatment
Stone size influences the rate of spontaneous stone passage. For example, up to 98% of small stones (less than 5 mm (0.2 in) in diameter) may pass spontaneously through urination within four weeks of the onset of symptoms, but for larger stones (5 to 10 mm (0.2 to 0.4 in) in diameter), the rate of spontaneous passage decreases to less than 53%. Initial stone location also influences the likelihood of spontaneous stone passage. Rates increase from 48% for stones located in the proximal ureter to 79% for stones located at the vesicoureteric junction, regardless of stone size. Assuming no high-grade obstruction or associated infection is found in the urinary tract, and symptoms are relatively mild, various nonsurgical measures can be used to encourage the passage of a stone. Repeat stone formers benefit from more intense management, including proper fluid intake and use of certain medications, as well as careful monitoring.

Pain management
Management of pain often requires intravenous administration of NSAIDs or opioids. NSAIDs appear somewhat better than opioids or paracetamol in those with normal kidney function. Medications by mouth are often effective for less severe discomfort. The use of antispasmodics does not have further benefit.

Medical expulsive therapy
The use of medications to speed the spontaneous passage of stones in the ureter is referred to as medical expulsive therapy. Several agents, including alpha adrenergic blockers (such as tamsulosin) and calcium channel blockers (such as nifedipine), may be effective. Alpha-blockers likely result in more people passing their stones, and they may pass their stones in a shorter time. People taking alpha-blockers may also use less pain medication and may not need to visit the hospital. Alpha-blockers appear to be more effective for larger stones (over 5 mm in size) than smaller stones. However, use of alpha-blockers may be associated with a slight increase in serious, unwanted effects from this medication. A combination of tamsulosin and a corticosteroid may be better than tamsulosin alone. These treatments also appear to be useful in addition to lithotripsy.

Lithotripsy
Extracorporeal shock wave lithotripsy (ESWL) is a noninvasive technique for the removal of kidney stones. Most ESWL is carried out when the stone is present near the renal pelvis. ESWL involves the use of a lithotriptor machine to deliver externally applied, focused, high-intensity pulses of ultrasonic energy to cause fragmentation of a stone over a period of around 30–60 minutes. Following its introduction in the United States in February 1984, ESWL was rapidly and widely accepted as a treatment alternative for renal and ureteral stones. It is currently used in the treatment of uncomplicated stones located in the kidney and upper ureter, provided the aggregate stone burden (stone size and number) is less than 20 mm (0.8 in) and the anatomy of the involved kidney is normal.For a stone greater than 10 millimetres (0.39 in), ESWL may not help break the stone in one treatment; instead, two or three treatments may be needed. Some 80-85% of simple renal calculi can be effectively treated with ESWL. A number of factors can influence its efficacy, including chemical composition of the stone, presence of anomalous renal anatomy and the specific location of the stone within the kidney, presence of hydronephrosis, body mass index, and distance of the stone from the surface of the skin.Common adverse effects of ESWL include acute trauma, such as bruising at the site of shock administration, and damage to blood vessels of the kidney. In fact, the vast majority of people who are treated with a typical dose of shock waves using currently accepted treatment settings are likely to experience some degree of acute kidney injury. ESWL-induced acute kidney injury is dose-dependent (increases with the total number of shock waves administered and with the power setting of the lithotriptor) and can be severe, including internal bleeding and subcapsular hematomas. On rare occasions, such cases may require blood transfusion and even lead to acute kidney failure. Hematoma rates may be related to the type of lithotriptor used; hematoma rates of less than 1% and up to 13% have been reported for different lithotriptor machines. Recent studies show reduced acute tissue injury when the treatment protocol includes a brief pause following the initiation of treatment, and both improved stone breakage and a reduction in injury when ESWL is carried out at slow shock wave rate.In addition to the aforementioned potential for acute kidney injury, animal studies suggest these acute injuries may progress to scar formation, resulting in loss of functional renal volume. Recent prospective studies also indicate elderly people are at increased risk of developing new-onset hypertension following ESWL. In addition, a retrospective case-control study published by researchers from the Mayo Clinic in 2006 has found an increased risk of developing diabetes mellitus and hypertension in people who had undergone ESWL, compared with age and gender-matched people who had undergone nonsurgical treatment. Whether or not acute trauma progresses to long-term effects probably depends on multiple factors that include the shock wave dose (i.e., the number of shock waves delivered, rate of delivery, power setting, acoustic characteristics of the particular lithotriptor, and frequency of retreatment), as well as certain intrinsic predisposing pathophysiologic risk factors.To address these concerns, the American Urological Association established the Shock Wave Lithotripsy Task Force to provide an expert opinion on the safety and risk-benefit ratio of ESWL. The task force published a white paper outlining their conclusions in 2009. They concluded the risk-benefit ratio remains favorable for many people. The advantages of ESWL include its noninvasive nature, the fact that it is technically easy to treat most upper urinary tract calculi, and that, at least acutely, it is a well-tolerated, low-morbidity treatment for the vast majority of people. However, they recommended slowing the shock wave firing rate from 120 pulses per minute to 60 pulses per minute to reduce the risk of renal injury and increase the degree of stone fragmentation.Alpha-blockers are sometimes prescribed after shock wave lithotripsy to help the pieces of the stone leave the persons body. By relaxing muscles and helping to keep blood vessels open, alpha blockers may relax the ureter muscles to allow the kidney stone fragments to pass. When compared to usual care or placebo treatment, alpha blockers may lead to faster clearing of stones, a reduced need for extra treatment and fewer unwanted effects. They may also clear kidney stones in more adults than the standard shock wave lithotripsy procedure. The unwanted effects associated with alpha blockers are hospital emergency visits and return to hospital for stone-related issues, but these effects were more common in adults who did not receive alpha-blockers as a part of their treatment.

Surgery
Most stones under 5 mm (0.2 in) pass spontaneously. Prompt surgery may, nonetheless, be required in persons with only one working kidney, bilateral obstructing stones, a urinary tract infection and thus, it is presumed, an infected kidney, or intractable pain. Beginning in the mid-1980s, less invasive treatments such as extracorporeal shock wave lithotripsy, ureteroscopy, and percutaneous nephrolithotomy began to replace open surgery as the modalities of choice for the surgical management of urolithiasis.  More recently, flexible ureteroscopy has been adapted to facilitate retrograde nephrostomy creation for percutaneous nephrolithotomy.  This approach is still under investigation, though early results are favorable. Percutaneous nephrolithotomy or, rarely, anatrophic nephrolithotomy, is the treatment of choice for large or complicated stones (such as calyceal staghorn calculi) or stones that cannot be extracted using less invasive procedures.

Ureteroscopic surgery
Ureteroscopy has become increasingly popular as flexible and rigid fiberoptic ureteroscopes have become smaller. One ureteroscopic technique involves the placement of a ureteral stent (a small tube extending from the bladder, up the ureter and into the kidney) to provide immediate relief of an obstructed kidney. Stent placement can be useful for saving a kidney at risk for postrenal acute kidney failure due to the increased hydrostatic pressure, swelling and infection (pyelonephritis and pyonephrosis) caused by an obstructing stone. Ureteral stents vary in length from 24 to 30 cm (9.4 to 11.8 in) and most have a shape commonly referred to as a "double-J" or "double pigtail", because of the curl at both ends. They are designed to allow urine to flow past an obstruction in the ureter. They may be retained in the ureter for days to weeks as infections resolve and as stones are dissolved or fragmented by ESWL or by some other treatment. The stents dilate the ureters, which can facilitate instrumentation, and they also provide a clear landmark to aid in the visualization of the ureters and any associated stones on radiographic examinations. The presence of indwelling ureteral stents may cause minimal to moderate discomfort, frequency or urgency incontinence, and infection, which in general resolves on removal. Most ureteral stents can be removed cystoscopically during an office visit under topical anesthesia after resolution of urolithiasis. Research is currently uncertain if placing a temporary stent during ureteroscopy leads to different outcomes than not placing a stent in terms of number of hospital visits for post operative problems, short or long term pain, need for narcotic pain medication, risk of UTI, need for a repeat procedure or narrowing of the ureter from scarring.More definitive ureteroscopic techniques for stone extraction (rather than simply bypassing the obstruction) include basket extraction and ultrasound ureterolithotripsy. Laser lithotripsy is another technique, which involves the use of a holmium:yttrium aluminium garnet (Ho:YAG) laser to fragment stones in the bladder, ureters, and kidneys.Ureteroscopic techniques are generally more effective than ESWL for treating stones located in the lower ureter, with success rates of 93–100% using Ho:YAG laser lithotripsy. Although ESWL has been traditionally preferred by many practitioners for treating stones located in the upper ureter, more recent experience suggests ureteroscopic techniques offer distinct advantages in the treatment of upper ureteral stones. Specifically, the overall success rate is higher, fewer repeat interventions and postoperative visits are needed, and treatment costs are lower after ureteroscopic treatment when compared with ESWL. These advantages are especially apparent with stones greater than 10 mm (0.4 in) in diameter. However, because ureteroscopy of the upper ureter is much more challenging than ESWL, many urologists still prefer to use ESWL as a first-line treatment for stones of less than 10 mm, and ureteroscopy for those greater than 10 mm in diameter. Ureteroscopy is the preferred treatment in pregnant and morbidly obese people, as well as those with bleeding disorders.

Epidemiology
Kidney stones affect all geographical, cultural, and racial groups. The lifetime risk is about 10-15% in the developed world, but can be as high as 20-25% in the Middle East. The increased risk of dehydration in hot climates, coupled with a diet 50% lower in calcium and 250% higher in oxalates compared to Western diets, accounts for the higher net risk in the Middle East. In the Middle East, uric acid stones are more common than calcium-containing stones. The number of deaths due to kidney stones is estimated at 19,000 per year being fairly consistent between 1990 and 2010.In North America and Europe, the annual number of new cases per year of kidney stones is roughly 0.5%. In the United States, the frequency in the population of urolithiasis has increased from 3.2% to 5.2% from the mid-1970s to the mid-1990s. In the United States, about 9% of the population has had a kidney stone.The total cost for treating urolithiasis was US$2 billion in 2003. About 65–80% of those with kidney stones are men; most stones in women are due to either metabolic defects (such as cystinuria) or infections in the case of struvite stones. Urinary tract calculi disorders are more common in men than in women.  Men most commonly experience their first episode between 30 and 40 years of age, whereas for women, the age at first presentation is somewhat later. The age of onset shows a bimodal distribution in women, with episodes peaking at 35 and 55 years. Recurrence rates are estimated at 50% over a 10-year and 75% over 20-year period, with some people experiencing ten or more episodes over the course of a lifetime.A 2010 review concluded that rates of disease are increasing.

History
The existence of kidney stones was first recorded thousands of years ago, with various explanations given; Joseph Glanvilles Saducismus Triumphatus, for example, gives a detailed description of Abraham Mechelburgs voiding of small stones through his penis virga, attributing the issue to witchcraft.In 1901, a stone discovered in the pelvis of an ancient Egyptian mummy was dated to 4,800 BC.
Medical texts from ancient Mesopotamia, India, China, Persia, Greece, and Rome all mentioned calculous disease. Part of the Hippocratic Oath suggests there were practicing surgeons in ancient Greece to whom physicians were to defer for lithotomies, or the surgical removal of stones. The Roman medical treatise De Medicina by Aulus Cornelius Celsus contained a description of lithotomy, and this work served as the basis for this procedure until the 18th century.Examples of people who had kidney stone disease include Napoleon I, Epicurus, Napoleon III, Peter the Great, Louis XIV, George IV, Oliver Cromwell, Lyndon B. Johnson, Benjamin Franklin, Michel de Montaigne, Francis Bacon, Isaac Newton, Samuel Pepys, William Harvey, Herman Boerhaave, and Antonio Scarpa.New techniques in lithotomy began to emerge starting in 1520, but the operation remained risky. After Henry Jacob Bigelow popularized the technique of litholapaxy in 1878, the mortality rate dropped from about 24% to 2.4%. However, other treatment techniques continued to produce a high level of mortality, especially among inexperienced urologists. In 1980, Dornier MedTech introduced extracorporeal shock wave lithotripsy for breaking up stones via acoustical pulses, and this technique has since come into widespread use.

Etymology
The term renal calculus is from the Latin rēnēs, meaning "kidneys", and calculus, meaning "pebble". Lithiasis (stone formation) in the kidneys is called nephrolithiasis (), from nephro-, meaning kidney, + -lith, meaning stone, and -iasis, meaning disorder. A distinction between nephrolithiasis and urolithiasis can be made because not all urinary stones (uroliths) form in the kidney; they can also form in the bladder. But the distinction is often clinically irrelevant (with similar disease process and treatment either way) and the words are thus often used loosely as synonyms.

Children
Although kidney stones do not often occur in children, the incidence is increasing. These stones are in the kidney in two thirds of reported cases, and in the ureter in the remaining cases. Older children are at greater risk independent of whether or not they are male or female.As with adults, most pediatric kidney stones are predominantly composed of calcium oxalate; struvite and calcium phosphate stones are less common. Calcium oxalate stones in children are associated with high amounts of calcium, oxalate, and magnesium in acidic urine.Treatment of kidney stones in children are similar to treatments for adults including: shock wave lithotripsy, medication, and treatment using scope through the bladder, kidney or skin. Of these treatments, research is uncertain if shock waves are more effective than medication or a scope through the bladder, but it is likely less successful than a scope through skin into the kidney. When going in with a scope through the kidney, a regular and a mini-sized scope likely have similar success rates of stone removal. Alpha-blockers, a type of medication, may increase the successful removal of kidney stones when compared with a placebo and without ibuprofen.

Research
Metabolic syndrome and its associated diseases of obesity and diabetes as general risk factors for kidney stone disease are under research  to determine if urinary excretion of calcium, oxalate and urate are higher than in people with normal weight or underweight, and if diet and physical activity have roles. Dietary, fluid intake, and lifestyle factors remain major topics for research on prevention of kidney stones, as of 2017.

Gut microbiota
The gut microbiota has been explored as a contributing factor for stone disease, indicating that some bacteria may be different in people forming kidney stones. One bacterium, Oxalobacter formigenes, is potentially beneficial for mitigating calcium oxalate stones because of its ability to metabolize oxalate as its sole carbon source, but 2018 research suggests that it is instead part of a network of oxalate degrading bacteria. Additionally, one study found that oral antibiotic use, which alters the gut microbiota, can increase the odds of a person developing a kidney stone.

In animals
Among ruminants, uroliths more commonly cause problems in males than in females; the sigmoid flexure of the ruminant male urinary tract is more likely to obstruct passage. Early-castrated males are at greater risk, because of lesser urethral diameter.Low Ca:P intake ratio is conducive to phosphatic (e.g