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 Porphyria and explain in detail?
Porphyria is a group of liver disorders in which substances called porphyrins build up in the body, negatively affecting the skin or nervous system. The types that affect the nervous system are also known as acute porphyria, as symptoms are rapid in onset and short in duration. Symptoms of an attack include abdominal pain, chest pain, vomiting, confusion, constipation, fever, high blood pressure, and high heart rate. The attacks usually last for days to weeks. Complications may include paralysis, low blood sodium levels, and seizures. Attacks may be triggered by alcohol, smoking, hormonal changes, fasting, stress, or certain medications. If the skin is affected, blisters or itching may occur with sunlight exposure.Most types of porphyria are inherited from one or both of a persons parents and are due to a mutation in one of the genes that make heme. They may be inherited in an autosomal dominant, autosomal recessive, or X-linked dominant manner. One type, porphyria cutanea tarda, may also be due to hemochromatosis (increased iron in the liver), hepatitis C, alcohol, or HIV/AIDS. The underlying mechanism results in a decrease in the amount of heme produced and a build-up of substances involved in making heme. Porphyrias may also be classified by whether the liver or bone marrow is affected. Diagnosis is typically made by blood, urine, and stool tests. Genetic testing may be done to determine the specific mutation.Treatment depends on the type of porphyria and the persons symptoms. Treatment of porphyria of the skin generally involves the avoidance of sunlight, while treatment for acute porphyria may involve giving intravenous heme or a glucose solution. Rarely, a liver transplant may be carried out.The precise prevalence of porphyria is unclear, but it is estimated to affect between 1 and 100 per 50,000 people. Rates are different around the world. Porphyria cutanea tarda is believed to be the most common type. The disease was described as early as 370 BC by Hippocrates. The underlying mechanism was first described by German physiologist and chemist Felix Hoppe-Seyler in 1871. The name porphyria is from the Greek πορφύρα, porphyra, meaning "purple", a reference to the color of the urine that may be present during an attack.

Signs and symptoms
Acute porphyrias
Acute intermittent porphyria (AIP), variegate porphyria (VP), aminolevulinic acid dehydratase deficiency porphyria (ALAD) and hereditary coproporphyria (HCP). These diseases primarily affect the nervous system, resulting in episodic crises known as acute attacks. The major symptom of an acute attack is abdominal pain, often accompanied by vomiting, hypertension (elevated blood pressure), and tachycardia (an abnormally rapid heart rate).The most severe episodes may involve neurological complications: typically motor neuropathy (severe dysfunction of the peripheral nerves that innervate muscle), which leads to muscle weakness and potentially to quadriplegia (paralysis of all four limbs) and central nervous system symptoms such as seizures and coma. Occasionally, there may be short-lived psychiatric symptoms such as anxiety, confusion, hallucinations, and, very rarely, overt psychosis. All these symptoms resolve once the acute attack passes.Given the many presentations and the relatively low occurrence of porphyria, patients may initially be suspected to have other, unrelated conditions. For instance, the polyneuropathy of acute porphyria may be mistaken for Guillain–Barré syndrome, and porphyria testing is commonly recommended in those situations. Elevation of aminolevulinic acid from lead-induced disruption of heme synthesis results in lead poisoning having symptoms similar to acute porphyria.

Chronic porphyrias
The non-acute porphyrias are X-linked dominant protoporphyria (XLDPP), congenital erythropoietic porphyria (CEP), porphyria cutanea tarda (PCT), and erythropoietic protoporphyria (EPP). None of these are associated with acute attacks; their primary manifestation is with skin disease. For this reason, these four porphyrias—along with two acute porphyrias, VP and HCP, that may also involve skin manifestations—are sometimes called cutaneous porphyrias.
Skin disease is encountered where excess porphyrins accumulate in the skin. Porphyrins are photoactive molecules, and exposure to light results in promotion of electrons to higher energy levels. When these return to the resting energy level or ground state, energy is released. This accounts for the property of fluorescence typical of the porphyrins. This causes local skin damage.
Two distinct patterns of skin disease are seen in porphyria:

Immediate photosensitivity. This is typical of XLDPP and EPP. Following a variable period of sun exposure—typically about 30 minutes—patients complain of severe pain, burning, and discomfort in exposed areas. Typically, the effects are not visible, though occasionally there may be some redness and swelling of the skin.
Vesiculo-erosive skin disease. This—a reference to the characteristic blistering (vesicles) and open sores (erosions) noted in patients—is the pattern seen in CEP, PCT, VP, and HCP. The changes are noted only in sun-exposed areas such as the face and back of the hands. Milder skin disease, such as that seen in VP and HCP, consists of increased skin fragility in exposed areas with a tendency to form blisters and erosions, particularly after minor knocks or scrapes. These heal slowly, often leaving small scars that may be lighter or darker than normal skin. More severe skin disease is sometimes seen in PCT, with prominent lesions, darkening of exposed skin such as the face, and hypertrichosis: abnormal hair growth on the face, particularly the cheeks. The most severe disease is seen in CEP and a rare variant of PCT known as hepatoerythropoietic porphyria (HEP); symptoms include severe shortening of digits, loss of skin appendages such as hair and nails, and severe scarring of the skin with progressive disappearance of ears, lips, and nose. Patients may also show deformed, discolored teeth or gum and eye abnormalities.

Cause
The porphyrias are generally considered genetic in nature.

Genetics
Subtypes of porphyrias depend on which enzyme is deficient.

X-linked dominant protoporphyria is a rare form of erythropoietic protoporphyria caused by a gain-of-function mutation in ALAS2 characterized by severe photosensitivity.In the autosomal recessive types, if a person inherits a single gene they may become a carrier. Generally they do not have symptoms, but may pass the gene onto offspring.

Triggers
Acute porphyria can be triggered by a number of drugs, most of which are believed to trigger it by interacting with enzymes in the liver which are made with heme. Such drugs include:
Sulfonamides, including sulfadiazine, sulfasalazine and trimethoprim/sulfamethoxazole.
Sulfonylureas like glibenclamide, gliclazide and glimepiride, although glipizide is thought to be safe.
Barbiturates including thiopental, phenobarbital, primidone, etc.
Systemic treatment with antifungals including fluconazole, griseofulvin, ketoconazole and voriconazole. (Topical use of these agents is thought to be safe due to minimal systemic absorption.)
Certain antibiotics like rifapentine, rifampicin, rifabutine, isoniazid, nitrofurantoin and, possibly, metronidazole.
Ergot derivatives including dihydroergotamine, ergometrine, ergotamine, methysergide, etc.
Certain antiretroviral medications (e.g. indinavir, nevirapine, ritonavir, saquinavir, etc.)
Progestogens
Some anticonvulsants including: carbamazepine, ethosuximide, phenytoin, topiramate, valproate.
Some painkillers like dextropropoxyphene, ketorolac, metamizole, pentazocine
Some cancer treatments like bexarotene, busulfan, chlorambucil, estramustine, etoposide, flutamide, idarubicin, ifosfamide, irinotecan, ixabepilone, letrozole, lomustine, megestrol, mitomycin, mitoxantrone, paclitaxel, procarbazine, tamoxifen, topotecan
Some antidepressants like imipramine, phenelzine, trazodone
Some antipsychotics like risperidone, ziprasidone
Some retinoids used for skin conditions like acitretin and isotretinoin
Miscellaneous others including: cocaine, methyldopa, fenfluramine, disulfiram, orphenadrine, pentoxifylline, and sodium aurothiomalate.

Pathogenesis
In humans, porphyrins are the main precursors of heme, an essential constituent of hemoglobin, myoglobin, catalase, peroxidase, and P450 liver cytochromes.The body requires porphyrins to produce heme, which is used to carry oxygen in the blood among other things, but in the porphyrias there is a deficiency (inherited or acquired) of the enzymes that transform the various porphyrins into others, leading to abnormally high levels of one or more of these substances. Porphyrias are classified in two ways, by symptoms and by pathophysiology. Physiologically, porphyrias are classified as liver or erythropoietic based on the sites of accumulation of heme precursors, either in the liver or in the bone marrow and red blood cells.Deficiency in the enzymes of the porphyrin pathway leads to insufficient production of heme. Heme function plays a central role in cellular metabolism. This is not the main problem in the porphyrias; most heme synthesis enzymes—even dysfunctional enzymes—have enough residual activity to assist in heme biosynthesis. The principal problem in these deficiencies is the accumulation of porphyrins, the heme precursors, which are toxic to tissue in high concentrations. The chemical properties of these intermediates determine the location of accumulation, whether they induce photosensitivity, and whether the intermediate is excreted (in the urine or feces).There are eight enzymes in the heme biosynthetic pathway, four of which—the first one and the last three—are in the mitochondria, while the other four are in the cytosol. Defects in any of these can lead to some form of porphyria. The hepatic porphyrias are characterized by acute neurological attacks (seizures, psychosis, extreme back and abdominal pain, and an acute polyneuropathy), while the erythropoietic forms present with skin problems, usually a light-sensitive blistering rash and increased hair growth.Variegate porphyria (also porphyria variegata or mixed porphyria), which results from a partial deficiency in PROTO oxidase, manifests itself with skin lesions similar to those of porphyria cutanea tarda combined with acute neurologic attacks. Hereditary coproporphyria, which is characterized by a deficiency in coproporphyrinogen oxidase, coded for by the CPOX gene, may also present with both acute neurologic attacks and cutaneous lesions. All other porphyrias are either skin- or nerve-predominant.

Diagnosis
Porphyrin studies
Porphyria is diagnosed through biochemical analysis of blood, urine, and stool. In general, urine estimation of porphobilinogen (PBG) is the first step if acute porphyria is suspected. As a result of feedback, the decreased production of heme leads to increased production of precursors, PBG being one of the first substances in the porphyrin synthesis pathway. In nearly all cases of acute porphyria syndromes, urinary PBG is markedly elevated except for the very rare ALA dehydratase deficiency or in patients with symptoms due to hereditary tyrosinemia type I. In cases of
mercury- or arsenic poisoning-induced porphyria, other changes in porphyrin profiles appear, most notably elevations of uroporphyrins I & III, coproporphyrins I & III, and pre-coproporphyrin.Repeat testing during an attack and subsequent attacks may be necessary in order to detect a porphyria, as levels may be normal or near-normal between attacks. The urine screening test has been known to fail in the initial stages of a severe, life-threatening attack of acute intermittent porphyria.Up to 90% of the genetic carriers of the more common, dominantly inherited acute hepatic porphyrias (acute intermittent porphyria, hereditary coproporphyria, variegate porphyria) have been noted in DNA tests to be latent for classic symptoms and may require DNA or enzyme testing. The exception to this may be latent post-puberty genetic carriers of hereditary coproporphyria.As most porphyrias are rare conditions, general hospital labs typically do not have the expertise, technology, or staff time to perform porphyria testing. In general, testing involves sending samples of blood, stool, and urine to a reference laboratory. All samples to detect porphyrins must be handled properly. Samples should be taken during an acute attack; otherwise a false negative result may occur. Samples must be protected from light and either refrigerated or preserved.If all the porphyrin studies are negative, one must consider pseudoporphyria. A careful medication review often will find the cause of pseudoporphyria.

Additional tests
Further diagnostic tests of affected organs may be required, such as nerve conduction studies for neuropathy or an ultrasound of the liver. Basic biochemical tests may assist in identifying liver disease, hepatocellular carcinoma, and other organ problems.

Management
Acute porphyria
Carbohydrate administration
Often, empirical treatment is required if the diagnostic suspicion of a porphyria is high since acute attacks can be fatal. A high-carbohydrate diet is typically recommended; in severe attacks, a dextrose 10% infusion is commenced, which may aid in recovery by suppressing heme synthesis, which in turn reduces the rate of porphyrin accumulation.  However, this can worsen cases of low blood sodium levels (hyponatraemia) and should be done with extreme caution as it can prove fatal.

Heme analogs
Hematin (trade name Panhematin) and heme arginate (trade name NormoSang) 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 theoretically inhibit ALA synthase and hence the accumulation of toxic precursors. In the United Kingdom, supplies of NormoSang are kept at two national centers; emergency supply is available from St Thomass Hospital, London. In the United States, Lundbeck manufactures and supplies Panhematin for infusion.Heme arginate (NormoSang) is used during crises but also in preventive treatment to avoid crises, one treatment every 10 days.Any sign of low blood sodium (hyponatremia) or weakness should be treated with the addition of hematin, heme arginate, or even tin mesoporphyrin, as these are signs of impending syndrome of inappropriate antidiuretic hormone (SIADH) or peripheral nervous system involvement that may be localized or severe, progressing to bulbar paresis and respiratory paralysis.

Cimetidine
Cimetidine has also been reported to be effective for acute porphyric crisis and possibly effective for long-term prophylaxis.

Symptom control
Pain is severe, frequently out of proportion to physical signs, and often requires the use of opiates to reduce it to tolerable levels. Pain should be treated as early as medically possible. Nausea can be severe; it may respond to phenothiazine drugs but is sometimes intractable. Hot baths and showers may lessen nausea temporarily, though caution should be used to avoid burns or falls.

Early identification
It is recommended that patients with a history of acute porphyria, and even genetic carriers, wear an alert bracelet or other identification at all times. This is in case they develop severe symptoms, or in case of accidents where there is a potential for drug exposure, and as a result they are unable to explain their condition to healthcare professionals. Some drugs are absolutely contraindicated for patients with any form of porphyria.

Neurologic and psychiatric disorders
Patients who experience frequent attacks can develop chronic neuropathic pain in extremities as well as chronic pain in the abdomen. Intestinal pseudo-obstruction, ileus, intussusception, hypoganglionosis, and encopresis in children have been associated with porphyrias. This is thought to be due to axonal nerve deterioration in affected areas of the nervous system and vagal nerve dysfunction. Pain treatment with long-acting opioids, such as morphine, is often indicated, and, in cases where seizure or neuropathy is present, gabapentin is known to improve outcome.Seizures often accompany this disease. Most seizure medications exacerbate this condition. Treatment can be problematic: barbiturates especially must be avoided. Some benzodiazepines are safe and, when used in conjunction with newer anti-seizure medications such as gabapentin, offer a possible regimen for seizure control. Gabapentin has the additional feature of aiding in the treatment of some kinds of neuropathic pain. Magnesium sulfate and bromides have also been used in porphyria seizures; however, development of status epilepticus in porphyria may not respond to magnesium alone. The addition of hematin or heme arginate has been used during status epilepticus.Depression often accompanies the disease and is best dealt with by treating the offending symptoms and if needed the judicious use of antidepressants. Some psychotropic drugs are porphyrinogenic, limiting the therapeutic scope. Other psychiatric symptoms such as anxiety, restlessness, insomnia, depression, mania, hallucinations, delusions, confusion, catatonia, and psychosis may occur.

Underlying liver disease
Some liver diseases may cause porphyria even in the absence of genetic predisposition. These include hemochromatosis and hepatitis C. Treatment of iron overload may be required.Patients with the acute porphyrias (AIP, HCP, VP) are at increased risk over their life for hepatocellular carcinoma (primary liver cancer) and may require monitoring. Other typical risk factors for liver cancer need not be present.

Hormone treatment
Hormonal fluctuations that contribute to cyclical attacks in women have been treated with oral contraceptives and luteinizing hormones to shut down menstrual cycles. However, oral contraceptives have also triggered photosensitivity and withdrawal of oral contraceptives has triggered attacks. Androgens and fertility hormones have also triggered attacks. In 2019, givosiran was approved in the United States for the treatment of acute hepatic porphyria.

Erythropoietic porphyria
These are associated with accumulation of porphyrins in erythrocytes and are rare.
The pain, burning, swelling, and itching that occur in erythropoietic porphyrias generally require avoidance of bright sunlight. Most kinds of sunscreen are not effective, but SPF-rated long-sleeve shirts, hats, bandanas, and gloves can help. Chloroquine may be used to increase porphyrin secretion in some EPs. Blood transfusion is occasionally used to suppress innate heme production.The rarest is congenital erythropoietic porphyria (CEP), otherwise known as Gunthers disease. The signs may present from birth and include severe photosensitivity, brown teeth that fluoresce in ultraviolet light due to deposition of Type 1 porphyrins, and later hypertrichosis. Hemolytic anemia usually develops. Pharmaceutical-grade beta carotene may be used in its treatment. A bone marrow transplant has also been successful in curing CEP in a few cases, although long-term results are not yet available.In December 2014, afamelanotide received authorization from the European Commission as a treatment for the prevention of phototoxicity in adult patients with EPP.

Epidemiology
Rates of all types of porphyria taken together have been estimated to be approximately one in 25,000 in the United States. The worldwide prevalence has been estimated to be between one in 500 and one in 50,000 people.Porphyrias have been detected in all races and in multiple ethnic groups on every continent. There are high incidence reports of AIP in areas of India and Scandinavia. More than 200 genetic variants of AIP are known, some of which are specific to families, although some strains have proven to be repeated mutations.

History
The underlying mechanism was first described by Felix Hoppe-Seyler in 1871, and acute porphyrias were described by the Dutch physician Barend Stokvis in 1889.The links between porphyrias and mental illness have been noted for decades. In the early 1950s, patients with porphyrias (occasionally referred to as "porphyric hemophilia") and severe symptoms of depression or catatonia were treated with electroshock therapy.

Vampires and werewolves
Porphyria has been suggested as an explanation for the origin of vampire and werewolf legends, based upon certain perceived similarities between the condition and the folklore.
In January 1964, L. Illiss 1963 paper, "On Porphyria and the Aetiology of Werewolves," was published in Proceedings of the Royal Society of Medicine. Later, Nancy Garden argued for a connection between porphyria and the vampire belief in her 1973 book, Vampires. In 1985, biochemist David Dolphins paper for the American Association for the Advancement of Science, "Porphyria, Vampires, and Werewolves: The Aetiology of European Metamorphosis Legends," gained widespread media coverage, popularizing the idea.The theory has been rejected by a few folklorists and researchers as not accurately describing the characteristics of the original werewolf and vampire legends or the disease, and as potentially stigmatizing people with porphyria.A 1995 article from the Postgraduate Medical Journal (via NIH) explains:

As it was believed that the folkloric vampire could move about freely in daylight hours, as opposed to the 20th century variant, congenital erythropoietic porphyria cannot readily explain the folkloric vampire but may be an explanation of the vampire as we know it in the 20th century. In addition, the folkloric vampire, when unearthed, was always described as looking quite healthy ("as they were in life"), while due to disfiguring aspects of the disease, sufferers would not have passed the exhumation test. Individuals with congenital erythropoietic porphyria do not crave blood. The enzyme (hematin) necessary to alleviate symptoms is not absorbed intact on oral ingestion, and drinking blood would have no beneficial effect on the sufferer. Finally, and most important, the fact that vampire reports were literally rampant in the 18th century, and that congenital erythropoietic porphyria is an extremely rare manifestation of a rare disease, makes it an unlikely explanation of the folkloric vampire.

Notable cases
King George III. The mental illness exhibited by George III in the regency crisis of 1788 has inspired several attempts at retrospective diagnosis. The first, written in 1855, thirty-five years after his death, concluded that he had acute mania. M. Guttmacher, in 1941, suggested manic-depressive psychosis as a more likely diagnosis. The first suggestion that a physical illness was the cause of King Georges mental derangement came in 1966, in a paper called "The Insanity of King George III: A Classic Case of Porphyria", with a follow-up in 1968, "Porphyria in the Royal Houses of Stuart, Hanover and Prussia". The papers, by a mother/son psychiatrist team, were written as though the case for porphyria had been proven, but the response demonstrated that many experts, including those more intimately familiar with the manifestations of porphyria, were unconvinced. Many psychiatrists disagreed with the diagnosis, suggesting bipolar disorder as far more probable. The theory is treated in Purple Secret, which documents the ultimately unsuccessful search for genetic evidence of porphyria in the remains of royals suspected to have had it. In 2005, it was suggested that arsenic (which is known to be porphyrogenic) given to George III with antimony may have caused his porphyria. This study found high levels of arsenic in King Georges hair.  In 2010, one analysis of historical records argued that the porphyria claim was based on spurious and selective interpretation of contemporary medical and historical sources.   The mental illness of George III is the basis of the plot in The Madness of King George, a 1994 British film based upon the 1991 Alan Bennett play, The Madness of George III. The closing credits of the film include the comment that the Kings symptoms suggest that he had porphyria and notes that the disease is "periodic, unpredictable, and hereditary". The traditional argument that George III did NOT have porphyria, but rather bipolar disorder, is thoroughly defended by Andrew Roberts in his new biography, "The Last King of America."
Descendants of George III. Among other descendants of George III theorized by the authors of Purple Secret to have had porphyria (based on analysis of their extensive and detailed medical correspondence) were his great-great-granddaughter Princess Charlotte of Prussia (Emperor William IIs eldest sister) and her daughter Princess Feodora of Saxe-Meiningen. They uncovered better evidence that George IIIs great-great-great-grandson Prince William of Gloucester was reliably diagnosed with variegate porphyria.
Mary, Queen of Scots. It is believed that Mary, Queen of Scots, King George IIIs ancestor, also had acute intermittent porphyria, although this is subject to much debate. It is assumed she inherited the disorder, if indeed she had it, from her father, James V of Scotland. Both father and daughter endured well-documented attacks that could fall within the constellation of symptoms of porphyria.
Maria I of Portugal