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 Gastroparesis and explain in detail?
Gastroparesis (gastro- from Ancient Greek γαστήρ - gaster, "stomach"; and -paresis, πάρεσις - "partial paralysis"), also called delayed gastric emptying, is a medical disorder consisting of weak muscular contractions (peristalsis) of the stomach, resulting in food and liquid remaining in the stomach for a prolonged period of time. Stomach contents thus exit more slowly into the duodenum of the digestive tract.  This can result in irregular absorption of nutrients, inadequate nutrition, and poor glycemic control.Symptoms include nausea, vomiting, abdominal pain, feeling full soon after beginning to eat (early satiety), abdominal bloating, and heartburn. The most common known mechanism is autonomic neuropathy of the nerve which innervates the stomach: the vagus nerve. Uncontrolled diabetes mellitus is a major cause of this nerve damage; other causes include post-infectious and trauma to the vagus nerve.
Diagnosis is via one or more of the following: barium swallow X-ray, barium beefsteak meal, radioisotope gastric-emptying scan, gastric manometry, and esophagogastroduodenoscopy (EGD). Complications include malnutrition, fatigue, weight loss, vitamin deficiencies, intestinal obstruction due to bezoars, and  small intestine bacterial overgrowth.
Treatment includes dietary modifications, medications to stimulate gastric emptying, medications to reduce vomiting, and surgical approaches.

Signs and symptoms
The most common symptoms of gastroparesis are the following:
Chronic nausea
Vomiting (especially of undigested food)
Abdominal pain
A feeling of fullness after eating just a few bitesOther symptoms include the following:

Abdominal bloating
Body aches (myalgia)
Erratic blood glucose levels
Acid reflux (GERD)
Heartburn
Lack of appetite
Morning nausea
Muscle weakness
Night sweats
Palpitations
Spasms of the stomach wall
Constipation or infrequent bowel movements
Weight loss, malnutrition
Difficulty swallowingVomiting may not occur in all cases, as those affected may adjust their diets to include only small amounts of food.

Causes
Transient gastroparesis may arise in acute illness of any kind, as a consequence of certain cancer treatments or other drugs which affect digestive action, or due to abnormal eating patterns. The symptoms are almost identical to those of low stomach acid, therefore most doctors will usually recommend trying out supplemental hydrochloric acid before moving on to the invasive procedures required to confirm a damaged nerve. Patients with cancer may develop gastroparesis because of chemotherapy-induced neuropathy, immunosuppression followed by viral infections involving the GI tract, procedures such as celiac blocks, paraneoplastic neuropathy or myopathy, or after an allogeneic bone marrow transplant via graft-versus-host disease.Gastroparesis present similar symptoms to slow gastric emptying caused by certain opioid medications, antidepressants, and allergy medications, along with high blood pressure. For patients already with gastroparesis, these can make the condition worse. More than 50% of all gastroparesis cases are idiopathic in nature, with unknown causes. It is, however, frequently caused by autonomic neuropathy. This may occur in people with type 1 or type 2 diabetes, about 30–50% among long-standing diabetics. In fact, diabetes mellitus has been named as the most common cause of gastroparesis, as high levels of blood glucose may effect chemical changes in the nerves. The vagus nerve becomes damaged by years of high blood glucose or insufficient transport of glucose into cells resulting in gastroparesis. Adrenal and thyroid gland problems could also be a cause.Gastroparesis has also been associated with connective tissue diseases such as scleroderma and Ehlers–Danlos syndrome, and neurological conditions such as Parkinsons disease and multiple system atrophy. It may occur as part of a mitochondrial disease. Opioids and anticholinergic medications can cause medication-induced gastroparesis. Chronic gastroparesis can be caused by other types of damage to the vagus nerve, such as abdominal surgery. Heavy cigarette smoking is also a plausible cause since smoking causes damage to the stomach lining. Idiopathic gastroparesis (gastroparesis with no known cause) accounts for a third of all chronic cases; it is thought that many of these cases are due to an autoimmune response triggered by an acute viral infection. Gastroenteritis, mononucleosis, and other ailments have been anecdotally linked to the onset of the condition, but no systematic study has proven a link.People with gastroparesis are disproportionately female. One possible explanation for this finding is that women have an inherently slower stomach emptying time than men. A hormonal link has been suggested, as gastroparesis symptoms tend to worsen the week before menstruation when progesterone levels are highest. Neither theory has been proven definitively.

Mechanism
On the molecular level, it is thought that gastroparesis can be caused by the loss of neuronal nitric oxide expression since the cells in the GI tract secrete nitric oxide. This important signaling molecule has various responsibilities in the GI tract and in muscles throughout the body. When nitric oxide levels are low, the smooth muscle and other organs may not be able to function properly. Other important components of the stomach are the interstitial cells of Cajal (ICC) which act as a pacemaker since they transduce signals from motor neurons to produce an electrical rhythm in the smooth muscle cells. Lower nitric oxide levels also correlate with loss of ICC cells, which can ultimately lead to the loss of function in the smooth muscle in the stomach, as well as in other areas of the gastrointestinal tract.Pathogenesis of symptoms in diabetic gastroparesis include:

Loss of gastric neurons containing nitric oxide synthase (NOS) is responsible for defective accommodation reflex, which leads to early satiety and postprandial fullness.
Impaired electromechanical activity in the myenteric plexus is responsible for delayed gastric emptying, resulting in nausea and vomiting.
Sensory neuropathy in the gastric wall may be responsible for epigastric pain.
Abnormal pacemaker activity (tachybradyarrhythmia) may generate a noxious signal transmitted to the CNS to evoke nausea and vomiting.

Diagnosis
Gastroparesis can be diagnosed with tests such as barium swallow X-rays, manometry, and gastric emptying scans. For the X-ray, the patient drinks a liquid containing barium after fasting which will show up in the X-ray and the physician is able to see if there is still food in the stomach as well. This can be an easy way to identify whether the patient has delayed emptying of the stomach. The clinical definition for gastroparesis is based solely on the emptying time of the stomach (and not on other symptoms), and severity of symptoms does not necessarily correlate with the severity of gastroparesis. Therefore, some patients may have marked gastroparesis with few, if any, serious complications.In other cases or if the X-ray is inconclusive, the physician may have the patient eat a meal of toast, water, and eggs containing a radioactive isotope so they can watch as it is digested and see how slowly the digestive tract is moving. This can be helpful for diagnosing patients who are able to digest liquids but not solid foods.

Complications
Complications of gastroparesis include:

Fluctuations in blood glucose due to unpredictable digestion times due to changes in rate and amount of food passing into the small bowel. This makes diabetes worse, but does not cause diabetes. Lack of control of blood sugar levels will make the gastroparesis worsen.
General malnutrition due to the symptoms of the disease (which frequently include vomiting and reduced appetite) as well as the dietary changes necessary to manage it. This is especially true for vitamin deficiencies such as scurvy because of inability to tolerate fresh fruits.
Severe fatigue and weight loss due to calorie deficit
Intestinal obstruction due to the formation of bezoars (solid masses of undigested food). This can cause nausea and vomiting, which can in turn be life-threatening if they prevent food from passing the small intestine.
Small intestine bacterial overgrowth is commonly found in patients with gastroparesis.
Bacterial infection due to overgrowth in undigested food
A decrease in quality of life, since it can make keeping up with work and other responsibilities more difficult.

Treatment
Treatment includes dietary modifications, medications to stimulate gastric emptying, medications to reduce vomiting, and surgical approaches.Dietary treatment involves low fiber diets and, in some cases, restrictions on fat or solids. Eating smaller meals, spaced two to three hours apart has proved helpful. Avoiding foods like rice or beef that cause the individual problems such as pain in the abdomen or constipation will help avoid symptoms.Metoclopramide, a dopamine D2 receptor antagonist, increases contractility and resting tone within the GI tract to improve gastric emptying. In addition, dopamine antagonist action in the central nervous system prevents nausea and vomiting. Similarly, the dopamine receptor antagonist domperidone is used to treat gastroparesis. Erythromycin is known to improve emptying of the stomach but its effects are temporary due to tachyphylaxis and wane after a few weeks of consistent use. Sildenafil citrate, which increases blood flow to the genital area in men, is being used by some practitioners to stimulate the gastrointestinal tract in cases of diabetic gastroparesis. The antidepressant mirtazapine has proven effective in the treatment of gastroparesis unresponsive to conventional treatment. This is due to its antiemetic and appetite stimulant properties. Mirtazapine acts on the same serotonin receptor (5-HT3) as does the popular anti-emetic ondansetron. Camicinal is a motilin agonist for the treatment of gastroparesis.
In specific cases where treatment of chronic nausea and vomiting proves resistant to drugs, implantable gastric stimulation may be utilized. A medical device is implanted that applies neurostimulation to the muscles of the lower stomach to reduce the symptoms. This is only done in refractory cases that have failed all medical management (usually at least two years of treatment). Medically refractory gastroparesis may also be treated with a pyloromyotomy, which widens the gastric outlet by cutting the circular pylorus muscle. This can be done laparoscopically or endoscopically.  Vertical sleeve gastrectomy, a procedure in which a part or all of the affected portion of the stomach is removed, has been shown to have some success in the treatment of gastroparesis in obese patients, even curing it in some instances. Further studies have been recommended due to the limited sample size of previous studies.In cases of postinfectious gastroparesis, patients have symptoms and go undiagnosed for an average of 3 weeks to 6 months before their illness is identified correctly and treatment begins.

Prognosis
Post-infectious
Cases of post-infectious gastroparesis are self‐limiting, with recovery within 12 months of initial symptoms, although some cases last well over 2 years. In children, the duration tends to be shorter and the disease course milder than in adolescent and adults.

Diabetic gastropathy
Diabetic gastropathy is usually slowly progressive, and can become severe and lethal.

Prevalence
Post-infectious gastroparesis, which constitutes the majority of idiopathic gastroparesis cases, affects up to 4% of the American population. Women in their 20s and 30s seem to be susceptible. One study of 146 American gastroparesis patients found the mean age of patients was 34 years with 82% affected being women, while another study found the patients were young or middle aged and up to 90% were women.There has only been one true epidemiological study of idiopathic gastroparesis which was completed by the Rochester Epidemiology Project. They looked at patients from 1996 to 2006 who were seeking medical attention instead of a random population sample and found that the prevalence of delayed gastric emptying was fourfold higher in women. It is difficult for medical professionals and researchers to collect enough data and provide accurate numbers since studying gastroparesis requires specialized laboratories and equipment.

References
Further reading
Overview from NIDDK National Institute of Diabetes, Digestive, and Kidney Diseases at NIH
Camilleri M, Parkman HP, Shafi MA, Abell TL, Gerson L (January 2013). "Clinical guideline: management of gastroparesis"