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 Erythromycin and explain in detail?
Erythromycin is an antibiotic used for the treatment of a number of bacterial infections. This includes respiratory tract infections, skin infections, chlamydia infections, pelvic inflammatory disease, and syphilis. It may also be used during pregnancy to prevent Group B streptococcal infection in the newborn, as well as to improve delayed stomach emptying. It can be given intravenously and by mouth. An eye ointment is routinely recommended after delivery to prevent eye infections in the newborn.Common side effects include abdominal cramps, vomiting, and diarrhea. More serious side effects may include Clostridium difficile colitis, liver problems, prolonged QT, and allergic reactions. It is generally safe in those who are allergic to penicillin. Erythromycin also appears to be safe to use during pregnancy. While generally regarded as safe during breastfeeding, its use by the mother during the first two weeks of life may increase the risk of pyloric stenosis in the baby. This risk also applies if taken directly by the baby during this age. It is in the macrolide family of antibiotics and works by decreasing bacterial protein production.Erythromycin was first isolated in 1952 from the bacteria Saccharopolyspora erythraea. It is on the World Health Organizations List of Essential Medicines. In 2017, it was the 215th most commonly prescribed medication in the United States, with more than two million prescriptions.

Medical uses
Erythromycin can be used to treat bacteria responsible for causing infections of the skin and upper respiratory tract, including Streptococcus, Staphylococcus, Haemophilus and Corynebacterium genera. The following represents MIC susceptibility data for a few medically significant bacteria:
Haemophilus influenzae: 0.015 to 256 μg/ml
Staphylococcus aureus: 0.023 to 1024 μg/ml
Streptococcus pyogenes: 0.004 to 256 μg/ml
Corynebacterium minutissimum: 0.015 to 64 μg/mlIt may be useful in treating gastroparesis due to this promotility effect. It has been shown to improve feeding intolerances in those who are critically ill. Intravenous erythromycin may also be used in endoscopy to help clear stomach contents.

Available forms
Erythromycin is available in enteric-coated tablets, slow-release capsules, oral suspensions, ophthalmic solutions, ointments, gels, enteric-coated capsules, non enteric-coated tablets, non enteric-coated capsules, and injections.
The following erythromycin combinations are available for oral dosage:
erythromycin base (capsules, tablets)
erythromycin estolate (capsules, oral suspension, tablets),  contraindicated during pregnancy
erythromycin ethylsuccinate (oral suspension, tablets)
erythromycin stearate (oral suspension, tablets)For injection, the available combinations are:
erythromycin gluceptate
erythromycin lactobionateFor ophthalmic use:

erythromycin base (ointment)

Adverse effects
Gastrointestinal disturbances, such as diarrhea, nausea, abdominal pain, and vomiting, are very common because erythromycin is a motilin agonist. Because of this, erythromycin tends not to be prescribed as a first-line drug.
More serious side effects include arrhythmia with prolonged QT intervals, including torsades de pointes, and reversible deafness. Allergic reactions range from urticaria to anaphylaxis. Cholestasis, Stevens–Johnson syndrome, and toxic epidermal necrolysis are some other rare side effects that may occur.
Studies have shown evidence both for and against the association of pyloric stenosis and exposure to erythromycin prenatally and postnatally. Exposure to erythromycin (especially long courses at antimicrobial doses, and also through breastfeeding) has been linked to an increased probability of pyloric stenosis in young infants. Erythromycin used for feeding intolerance in young infants has not been associated with hypertrophic pyloric stenosis.Erythromycin estolate has been associated with reversible hepatotoxicity in pregnant women in the form of elevated serum glutamic-oxaloacetic transaminase and is not recommended during pregnancy. Some evidence suggests similar hepatotoxicity in other populations.It can also affect the central nervous system, causing psychotic reactions, nightmares, and night sweats.

Interactions
Erythromycin is metabolized by enzymes of the cytochrome P450 system, in particular, by isozymes of the CYP3A superfamily. The activity of the CYP3A enzymes can be induced or inhibited by certain drugs (e.g., dexamethasone), which can cause it to affect the metabolism of many different drugs, including erythromycin. If other CYP3A substrates — drugs that are broken down by CYP3A — such as simvastatin (Zocor), lovastatin (Mevacor), or atorvastatin (Lipitor)—are taken concomitantly with erythromycin, levels of the substrates increase, often causing adverse effects. A noted drug interaction involves erythromycin and simvastatin, resulting in increased simvastatin levels and the potential for rhabdomyolysis. Another group of CYP3A4 substrates are drugs used for migraine such as ergotamine and dihydroergotamine; their adverse effects may be more pronounced if erythromycin is associated.
Earlier case reports on sudden death prompted a study on a large cohort that confirmed a link between erythromycin, ventricular tachycardia, and sudden cardiac death in patients also taking drugs that prolong the metabolism of erythromycin (like verapamil or diltiazem) by interfering with CYP3A4. Hence, erythromycin should not be administered to people using these drugs, or drugs that also prolong the QT interval. Other examples include terfenadine (Seldane, Seldane-D), astemizole (Hismanal), cisapride (Propulsid, withdrawn in many countries for prolonging the QT time) and pimozide (Orap). Theophylline, which is used mostly in asthma, is also contraindicated.
Erythromycin and doxycycline can have a synergistic effect when combined and kill bacteria (E. coli) with a higher potency than the sum of the two drugs together. This synergistic relationship is only temporary. After approximately 72 hours, the relationship shifts to become antagonistic, whereby a 50/50 combination of the two drugs kills less bacteria than if the two drugs were administered separately.It may alter the effectiveness of combined oral contraceptive pills because of its effect on the gut flora. A review found that when erythromycin was given with certain oral contraceptives, there was an increase in the maximum serum concentrations and AUC of estradiol and dienogest.Erythromycin is an inhibitor of the cytochrome P450 system, which means it can have a rapid effect on levels of other drugs metabolised by this system, e.g., warfarin.

Pharmacology
Mechanism of action
Erythromycin displays bacteriostatic activity or inhibits growth of bacteria, especially at higher concentrations. By binding to the 50s subunit of the bacterial  rRNA complex, protein synthesis and subsequent structure and function processes critical for life or replication are inhibited. Erythromycin interferes with aminoacyl translocation, preventing the transfer of the tRNA bound at the A site of the rRNA complex to the P site of the rRNA complex. Without this translocation, the A site remains occupied, thus the addition of an incoming tRNA and its attached amino acid to the nascent polypeptide chain is inhibited. This interferes with the production of functionally useful proteins, which is the basis of this antimicrobial action.
Erythromycin increases gut motility by binding to Motillin receptor, thus it is a Motillin receptor agonist in addition to its antimicrobial properties.

Pharmacokinetics
Erythromycin is easily inactivated by gastric acid; therefore, all orally administered formulations are given as either enteric-coated or more-stable salts or esters, such as erythromycin ethylsuccinate. Erythromycin is very rapidly absorbed, and diffuses into most tissues and phagocytes. Due to the high concentration in phagocytes, erythromycin is actively transported to the site of infection, where, during active phagocytosis, large concentrations of erythromycin are released.

Metabolism
Most of erythromycin is metabolised by demethylation in the liver by the hepatic enzyme CYP3A4. Its main elimination route is in the bile with little renal excretion, 2%-15% unchanged drug. Erythromycins elimination half-life ranges between 1.5 and 2.0 hours and is between 5 and 6 hours in patients with end-stage renal disease.  Erythromycin levels peak in the serum 4 hours after dosing; ethylsuccinate peaks 0.5-2.5 hours after dosing, but can be delayed if digested with food.Erythromycin crosses the placenta and enters breast milk.  The American Association of Pediatrics determined erythromycin is safe to take while breastfeeding. Absorption in pregnant patients has been shown to be variable, frequently resulting in levels lower than in nonpregnant patients.

Chemistry
Composition
Standard-grade erythromycin is primarily composed of four related compounds known as erythromycins A, B, C, and D. Each of these compounds can be present in varying amounts and can differ by lot. Erythromycin A has been found to have the most antibacterial activity, followed by erythromycin B. Erythromycins C and D are about half as active as erythromycin A. Some of these related compounds have been purified and can be studied and researched individually.

Synthesis
Over the three decades after the discovery of erythromycin A and its activity as an antimicrobial, many attempts were  made to synthesize it in the laboratory. The presence of 10 stereogenic carbons and several points of distinct substitution has made the total synthesis of erythromycin A a formidable task. Complete syntheses of erythromycins’ related structures and precursors such as 6-deoxyerythronolide B have been accomplished, giving way to possible syntheses of different erythromycins and other macrolide antimicrobials. Woodward successfully completed the synthesis of erythromycin A.

Erythromycin related compounds
History
In 1949 Abelardo B. Aguilar, a Filipino scientist, sent some soil samples to his employer at Eli Lilly. Aguilar managed to isolate erythromycin from the metabolic products of a strain of Streptomyces erythreus (designation changed to Saccharopolyspora erythraea) found in the samples. Aguilar received no further credit or compensation for his discovery. 
The scientist was allegedly promised a trip to the company’s manufacturing plant in Indianapolis, but it was never fulfilled. In a letter to the company’s president, Aguilar wrote: “A leave of absence is all I ask as I do not wish to sever my connection with a great company which has given me wonderful breaks in life.” The request was not granted.Aguilar reached out to Eli Lilly again in 1993, requesting royalties from sales of the drug over the years, intending to use them to put up a foundation for poor and sickly Filipinos. This request was also denied. He died in September of the same year.Lilly filed for patent protection on the compound which was granted in 1953. The product was launched commercially in 1952 under the brand name Ilosone (after the Philippine region of Iloilo where it was originally collected). Erythromycin was formerly also called Ilotycin.
The antibiotic clarithromycin was invented by scientists at the Japanese drug company Taisho Pharmaceutical in the 1970s as a result of their efforts to overcome the acid instability of erythromycin.
Scientists at Chugai Pharmaceuticals discovered an erythromycin-derived motilin agonist called mitemcinal that is believed to have strong prokinetic properties (similar to erythromycin) but lacking antibiotic properties. Erythromycin is commonly used off-label for gastric motility indications such as gastroparesis. If mitemcinal can be shown to be an effective prokinetic agent, it would represent a significant advance in the gastrointestinal field, as treatment with this drug would not carry the risk of unintentional selection for antibiotic-resistant bacteria.

Society and culture
Cost
It is available as a generic medication.In the United States in 2014 the price increased to seven dollars per tablet.The price of Erythromycin rose three times between 2010 and 2015, from 24 cents per tablet in 2010 to $8.96 in 2015. In 2017, a Kaiser Health News study found that the per-unit cost of dozens of generics doubled or even tripled from 2015 to 2016, increasing spending by the Medicaid program. Due to price increases by drug manufacturers, Medicaid paid on average $2,685,330 more for Erythromycin in 2016 compared to 2015 (not including rebates)