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 Hydronephrosis and explain in detail?
Hydronephrosis describes hydrostatic dilation of the renal pelvis and calyces as a result of obstruction to urine flow downstream.  Alternatively, hydroureter describes the dilation of the ureter, and hydronephroureter describes the dilation of the entire upper urinary tract (both the renal pelvicalyceal system and the ureter).

Signs and symptoms
The signs and symptoms of hydronephrosis depend upon whether the obstruction is acute or chronic, partial or complete, unilateral or bilateral. Hydronephrosis that occurs acutely with sudden onset (as caused by a kidney stone) can cause intense pain in the flank area (between the hips and ribs) known as a renal colic.  Historically, this type of pain has been described as "Dietls crisis". Conversely, hydronephrosis that develops gradually over time will generally cause either a dull discomfort or no pain.  Nausea and vomiting may also occur.  An obstruction that occurs at the urethra or bladder outlet can cause pain and pressure resulting from distension of the bladder.  Blocking the flow of urine will commonly be prone to urinary tract infections which can lead to further development of stones, fever, and blood or pus in the urine.  If complete obstruction occurs, a postrenal kidney failure (obstructive nephropathy) may follow.Blood tests may show impaired kidney function (elevated urea or creatinine) or electrolyte imbalances such as hyponatremia or hyperchloremic metabolic acidosis.  Urinalysis may indicate an elevated pH due to the secondary destruction of nephrons within the affected kidney, which impairs acid excretion.  Physical examination in a thin patient may detect a palpable abdominal or flank mass caused by the enlarged kidney.

Causes
Hydronephrosis is the result of any of several abnormal pathophysiological occurrences.  Structural abnormalities of the junctions between the kidney, ureter and bladder that lead to hydronephrosis can occur during fetal development.  Some of these congenital defects have been identified as inherited conditions, however, the benefits of linking genetic testing to early diagnosis have not been determined.  Other structural abnormalities could be caused by injury, surgery, or radiation therapy.The most common causes of hydronephrosis in children are anatomical abnormalities. These include vesicoureteral reflux, urethral stricture, and stenosis. The most common cause of hydronephrosis in young adults is kidney stones. In older adults, the most common cause of hydronephrosis is benign prostate hyperplasia (BPH), or intrapelvic neoplasms such as prostate cancer. Compression of one or both ureters can also be caused by other developmental defects not completely occurring during the fetal stage such as an abnormally placed vein, artery, or tumor.  Bilateral compression of the ureters can occur during pregnancy due to enlargement of the uterus.  Changes in hormone levels during this time may also affect the muscle contractions of the bladder, further complicating this condition.Sources of obstruction that can arise from other various causes include kidney stones, blood clots or retroperitoneal fibrosis.The obstruction may be either partial or complete, and can occur anywhere from the urethral meatus to the renal calyces.  Hydronephrosis can also result from the retrograde flow of urine from the bladder back into the kidneys (vesicoureteral reflux), which can be caused by some of the factors listed above as well as compression of the bladder outlet into the urethra by prostate enlargement or fecal impaction in the rectum (which sits immediately behind the prostate), as well as abnormal contractions of bladder detrusor muscles resulting from neurological dysfunction (neurogenic bladder) or other muscular disorders.

Pathophysiology
Hydronephrosis is caused by obstruction of urine before the renal pelvis. The obstruction causes dilation of the nephron tubules and flattening of the lining of the tubules within the kidneys which in turn causes swelling of the renal calyces. Hydronephrosis can either be acute or chronic. In acute hydronephrosis full recovery of kidney function is seen. However, with chronic hydronephrosis, permanent loss of kidney function is seen even once obstruction is removed. Obstruction that occurs anywhere along the upper urinary tract will lead to increased pressure within the structures of the kidney due to the inability to pass urine from the kidney to the bladder.  Common causes of upper tract obstruction include obstructing stones and ureteropelvic junction (UPJ) obstruction caused by intrinsic narrowing of the ureters or an overlying vessel.
Obstruction occurring in the lower urinary tract can also cause this increased pressure through the reflux of urine into the kidney.  Common causes include bladder dysfunction (such as neurogenic bladder) and urethral obstruction (such as posterior urethral valves in male infants) or compression (such as from prostatic hypertrophy in older male adults).
In pregnancy, dextrorotation (rotation to the right) of the uterus can cause compression on the right ureter, thus making hydronephrosis more common in right kidney than left kidney. Besides, hormones such as oestrogen, progestrerone, and prostaglandin can cause ureter dilatation, thus causing hydronephrosis despite the absence of visible obstruction along the urinary tract.

Diagnosis
Prenatal diagnosis is possible, and in fact, most cases in pediatric patients are incidentally detected by routine screening ultrasounds obtained during pregnancy.  However, approximately half of all prenatally identified hydronephrosis is transient, and resolves by the time the infant is born, and in another 15%, the hydronephrosis persists but is not associated with urinary tract obstruction (so-called non-refluxing, non-obstructive hydronephrosis).  For these children, regression of the hydronephrosis occurs spontaneously, usually by age 3.  However, in the remaining 35% of cases of prenatal hydronephrosis, a pathological condition can be identified postnatally.Diagnostic workup depends on the age of the patient, as well as whether the hydronephrosis was detected incidentally or prenatally or is associated with other symptoms.  Blood tests (such measurement of creatinine) are typically indicated, though they must be interpreted cautiously.  Even in cases of severe unilateral hydronephrosis, the overall kidney function may remain normal since the unaffected kidney will compensate for the obstructed kidney.Urinalysis is usually performed to determine the presence of blood (which is typical for kidney stones) or signs of infection (such as a positive leukocyte esterase or nitrite).  Impaired concentrating ability or elevated urine pH (distal renal tubular acidosis) are also commonly found due to tubular stress and injury.

Imaging studies
Imaging studies, such as an intravenous urogram (IVU), renal ultrasonography, CT, or MRI, are also important investigations in determining the presence and/ or cause of hydronephrosis. Whilst ultrasound allows for visualisation of the ureters and kidneys (and determine the presence of hydronephrosis and / or hydroureter), an IVU is useful for assessing the anatomical location of the obstruction. Antegrade or retrograde pyelography will show similar findings to an IVU but offer a therapeutic option as well. Real-time ultrasounds and Doppler ultrasound tests in association with vascular resistance testing helps determine how a given obstruction is effecting urinary functionality in hydronephrotic patients.In determining the cause of hydronephrosis, the location of obstruction can be determined with a Whittaker (or pressure perfusion) test, wherein the collecting system of the kidney is accessed percutaneously, and the liquid is introduced at high pressure and constant rate of 10ml/min while measuring the pressure within the renal pelvis. A rise in pressure above 22 cm H2O suggests that the urinary collection system is obstructed. When arriving at this pressure measurement, bladder pressure is subtracted from the initial reading of internal pressure. (The test was first described by Whittaker in 1973 to test the hypothesis that patients whose hydronephrosis persists after the posterior urethral valves have been ablated usually have ureters that are not obstructed, even though they may be dilated.)Kay recommends that a neonate born with untreated in utero hydronephrosis receive a renal ultrasound within two days of birth.  A renal pelvis greater than 12mm in a neonate is considered abnormal and suggests significant dilation and possible abnormalities such as obstruction or morphological abnormalities in the urinary tract.The choice of imaging depends on the clinical presentation (history, symptoms and examination findings).  In the case of renal colic (one sided loin pain usually accompanied by a trace of blood in the urine) the initial investigation is usually a spiral or helical CT scan.  This has the advantage of showing whether there is any obstruction of flow of urine causing hydronephrosis as well as demonstrating the function of the other kidney.  Many stones are not visible on plain X-ray or IVU but 99% of stones are visible on CT and therefore CT is becoming a common choice of initial investigation.  CT is not used, however, when there is a reason to avoid radiation exposure, e.g. in pregnancy.For incidentally detected prenatal hydronephrosis, the first study to obtain is a postnatal renal ultrasound, since as noted, many cases of prenatal hydronephrosis resolve spontaneously.  This is generally done within the first few days after birth, although there is some risk that obtaining an imaging study this early may miss some cases of mild hydronephrosis due to the relative oliguria of a newborn.  Thus, some experts recommend obtaining a follow-up ultrasound at 4–6 weeks to reduce the false-negative rate of the initial ultrasound