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 Ranolazine and explain in detail?
Ranolazine, sold under the brand name Ranexa among others, is a medication used to treat heart related chest pain. Typically it is used together with other medications when those are insufficient. Benefits appear smaller in women than men. It is taken by mouth.Common side effects include constipation, headache, nausea, and dizziness. Serious side effects may include QT prolongation. Use is not recommended in those with liver cirrhosis. How it works is not clear but may involve adenosine triphosphate.Ranolazine was approved for medical use in the United States in 2006. In 2019, it was the 211th most commonly prescribed medication in the United States, with more than 2 million prescriptions.

Medical uses
Ranolazine is used to treat chronic angina. It may be used concomitantly with β blockers, nitrates, calcium channel blockers, antiplatelet therapy, lipid-lowering therapy, ACE inhibitors, and angiotensin receptor blockers. It is also effective at preventing atrial fibrillation, and has been studied as monotherapy as well as in combination with other medications used to treat irregular heartbeat.Its use is not recommended in Scotland as of 2019.

Contraindications
Some contraindications for ranolazine are related to its metabolism and are described under Drug Interactions. Additionally, in clinical trials ranolazine slightly increased QT interval in some patients and the FDA label contains a warning for doctors to beware of this effect in their patients. The drugs effect on the QT interval is increased in the setting of liver dysfunction; thus it is contraindicated in persons with mild to severe liver disease.

Side effects
The most common side effects are dizziness (11.5%) and constipation (10.9%).  Other side effects include headache and nausea.

Drug interactions
Ranolazine is metabolized mainly by the CYP3A enzyme. It also inhibits another metabolizing enzyme, cytochrome CYP2D6. For this reason, the doses of ranolazine and drugs that interact with those enzymes need to be adjusted when they are used by the same patient.
Ranolazine should not be used with drugs such as ketoconazole, clarithromycin, and nelfinavir that strongly inhibit CYP3A, nor with drugs that activate CYP3A, such as rifampin and phenobarbital.For drugs that are moderate CYP3A inhibitors, such as diltiazem, verapamil, and erythromycin, the dose of ranolazine should be reduced.Drugs that are metabolized by CYP2D6, such as tricyclic antidepressants, may need to be given at reduced doses when administered with ranolazine.

Mechanism of action
Ranolazine inhibits persistent or late inward sodium current (INa) in heart muscle in a variety of voltage-gated sodium channels.  Inhibiting that current leads to reductions in intracellular calcium levels.  This in turn leads to reduced tension in the heart wall, leading to reduced oxygen requirements for the muscle. The QT prolongation effect of ranolazine on the surface electrocardiogram is the result of inhibition of IKr, which prolongs the ventricular action potential. Ranolazine also exhibits its effects on the delayed rectifier current (hERG/IKr potassium channels), it readily stimulates myogenesis, it reduces a pro-oxidant inflammation/oxidative condition, and activates the calcium signaling pathway.Ranolazine prolongs the action potential duration, with corresponding QT interval prolongation on electrocardiography, blocks the INa current, and prevents calcium overload caused by the hyperactive INa current, thus it stabilizes the membrane and reducing excitability.

History
Syntex Inc. originally began developing ranolazine in 1985 and 61 studies were completed from then until 1994. Afterwards, Phase 2 studies were done however it was found that the formulation did not result in adequate plasma concentrations of drug