Acute intermittant porphyria
Acute intermittent porphyria (AIP) is a rare autosomal dominant metabolic disorder affecting the production of heme, the oxygen-binding prosthetic group of hemoglobin.  It is characterized by a deficiency of the enzyme porphobilinogen deaminase.

# Mechanism of disease
Under normal circumstances, heme synthesis begins in the mitochondrion, proceeds into the cytoplasm, and finishes back in the mitochondrion.  However, without porphobilinogen deaminase, a necessary cytoplasmic enzyme, heme synthesis cannot finish, and the metabolite porphyrin accumulates in the cytoplasm.
Additional factors must also be present such as hormones, drugs, and dietary changes that trigger the appearance of symptoms. Symptoms of AIP may include abdominal pain, constipation, and muscle weakness.

# Treatment
A high-carbohydrate diet is typically recommended; in severe attacks, a glucose 10% infusion is recommended, which may aid in recovery. If drugs have caused the attack, discontinuing the offending substances is essential. Infection is one of the top causes of attacks and requires vigorous treatment. Pain is extremely severe and almost always requires the use of opiates to reduce it to tolerable levels. Pain should be treated early as medically possible due to its severity. Nausea can be severe; it may respond to phenothiazine drugs but is sometimes intractable. Hot water baths or showers may lessen nausea temporarily, but can present a risk of burns or falls. 
Hematin and heme arginate are the drugs of choice in acute porphyria, in the United States and the United Kingdom, respectively. These drugs need to be given very early in an attack to be effective. Effectiveness varies amongst individuals. They are not curative drugs, but can shorten attacks and reduce the intensity of an attack. Side-effects are rare but can be serious. These heme-like substances, in theory, inhibit ALA synthase and, hence, the accumulation of toxic precursors. In the United Kingdom, supplies of this drug are maintained at two national centers. In the United States, one company manufactures Panhematin for infusion. The American Porphyria Foundation has information regarding the quick procurement of the drug.
Patients with a history of acute porphyria are recommended to wear an alert bracelet or other identification at all times in case they develop severe symptoms, a result of which may be that they cannot explain to healthcare professionals about their condition and the fact that some drugs are absolutely contraindicated.  An attack of acute intermittant porphyria may be precipitated by one of the "four M's": medication, menstruation, malnutrition, maladies.
Patients that experience frequent attacks can develop chronic neuropathic pain in extremities as well as chronic pain in the gut.  This is thought to be due to axonal nerve deterioration in affected areas of the nervous system. In these cases, treatment with long-acting opioids may be indicated. Some cases of chronic pain can be difficult to manage and may require treatment using multiple modalities. Depression often accompanies the disease and is best dealt with by treating the offending symptoms and, if needed, the judicious use of anti-depressants.
Seizures often accompany this disease. Most seizure medications exacerbate this condition. Treatment can be problematic: Barbiturates must be avoided. Some benzodiazepines are safe, and, when used in conjunction with newer anti-seizure medications such as gabapentin, offer a possible regime for seizure control.
Urine from a person experiencing an acute attack may be red or "port wine" in color because of the presence of porphyrins. In addition, urine of AIP sufferers may turn purple when exposed to ultraviolet light for a period of time.