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 Metabolic acidosis and explain in detail?
Metabolic acidosis is a serious electrolyte disorder characterized by an imbalance in the bodys acid-base balance. Metabolic acidosis has three main root causes: increased acid production, loss of bicarbonate, and a reduced ability of the kidneys to excrete excess acids. Metabolic acidosis can lead to acidemia, which is defined as arterial blood pH that is lower than 7.35. Acidemia and acidosis are not mutually exclusive – pH and hydrogen ion concentrations also depend on the coexistence of other acid-base disorders; therefore, pH levels in people with metabolic acidosis can range from low to high.
Acute metabolic acidosis, lasting from minutes to several days, often occurs during serious illnesses or hospitalizations, and is generally caused when the body produces an excess amount of organic acids (ketoacids in ketoacidosis, or lactic acid in lactic acidosis). A state of chronic metabolic acidosis, lasting several weeks to years, can be the result of impaired kidney function (chronic kidney disease) and/or bicarbonate wasting. The adverse effects of acute versus chronic metabolic acidosis also differ, with acute metabolic acidosis impacting the cardiovascular system in hospital settings, and chronic metabolic acidosis affecting muscles, bones, kidney and cardiovascular health.

Signs and symptoms
Acute metabolic acidosis
Symptoms are not specific, and diagnosis can be difficult unless patients present with clear indications for arterial blood gas sampling. Symptoms may include palpitations, headache, altered mental status such as severe anxiety due to hypoxia, decreased visual acuity, nausea, vomiting, abdominal pain, altered appetite and weight gain, muscle weakness, bone pain, and joint pain. People with acute metabolic acidosis may exhibit deep, rapid breathing called Kussmaul respirations which is classically associated with diabetic ketoacidosis. Rapid deep breaths increase the amount of carbon dioxide exhaled, thus lowering the serum carbon dioxide levels, resulting in some degree of compensation. Overcompensation via respiratory alkalosis to form an alkalemia does not occur.
Extreme acidemia can also lead to neurological and cardiac complications:

Neurological: lethargy, stupor, coma, seizures
Cardiac: Abnormal heart rhythms (e.g., ventricular tachycardia) and decreased response to epinephrine, both leading to low blood pressurePhysical examination can occasionally reveal signs of the disease, but is often otherwise normal. Cranial nerve abnormalities are reported in ethylene glycol poisoning, and retinal edema can be a sign of methanol intoxication.

Chronic metabolic acidosis
Chronic metabolic acidosis has non-specific clinical symptoms but can be readily diagnosed by testing serum bicarbonate levels in patients with Chronic Kidney Disease (CKD) as part of a comprehensive metabolic panel. Patients with CKD Stages G3-G5 should be routinely screened for metabolic acidosis.

Diagnostic approach and causes
Metabolic acidosis is defined as a reduced serum pH, and an abnormal serum bicarbonate concentration of <22 mEq/L, below the normal range of 22 to 29 mEq/L. However, if a patient has other coexisting acid-base disorders, the pH level may be low, normal or high in the setting of metabolic acidosis. In the absence of chronic respiratory alkalosis, metabolic acidosis can be clinically diagnosed by measuring serum bicarbonate levels in the blood, which is generally a standard component of blood panels. Imperatively, when weighing a metabolic acidosis diagnosis, the change in serum bicarbonate levels over time should be considered; if baseline bicarbonate results are unknown, a single set of values may be misinterpreted.

Causes
Generally, metabolic acidosis occurs when the body produces too much acid (e.g., lactic acidosis, see below section), there is a loss of bicarbonate from the blood, or when the kidneys are not removing enough acid from the body. 
Chronic metabolic acidosis is most often caused by a decreased capacity of the kidneys to excrete excess acids through renal ammoniagenesis. The typical Western diet generates 75-100 mEq of acid daily, and individuals with normal kidney function increase the production of ammonia to get rid of this dietary acid. As kidney function declines, the tubules lose the ability to excrete excess acid, and this results in buffering of acid using serum bicarbonate, as well as bone and muscle stores.There are many causes of acute metabolic acidosis, and thus it is helpful to group them by the presence or absence of a normal anion gap.
Increased anion gap
Causes of increased anion gap include: 

Lactic acidosis
Ketoacidosis (e.g., Diabetic, alcoholic, or starvation)
Chronic kidney failure
Transient 5-oxoprolinemia due to long-term ingestion of high-doses of acetaminophen (often seen with sepsis, liver failure, kidney failure, or malnutrition)
Intoxication:
Salicylates, methanol, ethylene glycol
Organic acids, paraldehyde, ethanol, formaldehyde
Carbon monoxide, cyanide, ibuprofen, metformin
Propylene glycol (metabolized to L and D-lactate and is often found in infusions for certain intravenous medications used in the intensive care unit)
Massive rhabdomyolysis
Isoniazid, iron, phenelzine, tranylcypromine, valproic acid, verapamil
Topiramate
SulfatesNormal anion gap
Causes of normal anion gap include
Inorganic acid addition
Infusion/ingestion of HCl, NH4Cl
Gastrointestinal base loss
Diarrhea
Small bowel fistula/drainage
Surgical diversion of urine into gut loops
Renal base loss/acid retention:
Proximal renal tubular acidosis
Distal renal tubular acidosisHyperalimentation
Addison disease
Acetazolamide
Spironolactone
Saline infusionTo distinguish between the main types of metabolic acidosis, a clinical tool called the anion gap is considered very useful. It is calculated by subtracting the sum of the chloride and bicarbonate levels from the sum of the sodium and potassium levels.
As sodium is the main extracellular cation, and chloride and bicarbonate are the main anions, the result should reflect the remaining anions. Normally, this concentration is about 8–16 mmol/L (12±4). An elevated anion gap (i.e. > 16 mmol/L) can indicate particular types of metabolic acidosis, such as types caused by certain poisons, lactate acidosis, and ketoacidosis. It is important to note that the anion gap can be spuriously normal in sampling errors of the sodium level, e.g. in extreme hypertriglyceridemia. The anion gap can also be increased due to relatively low levels of cations other than sodium and potassium (e.g. calcium or magnesium).As a differential diagnosis is made, other tests may be necessary, including toxicological screening and imaging of the kidneys, along with testing of electrolytes (including chloride), glucose, kidney function, and a full blood count. Urinalysis can reveal acidity (salicylate poisoning) or alkalinity (renal tubular acidosis type I). In addition, it can show ketones in ketoacidosis. It is also important to differentiate between acidosis-induced hyperventilation and asthma; otherwise, treatment could lead to inappropriate bronchodilation.

Pathophysiology
Compensatory mechanisms
Metabolic acidosis is characterized by a low concentration of bicarbonate (HCO−3), which can happen with increased generation of acids (such as ketoacids or lactic acid), excess loss of HCO−3 by the kidneys or gastrointestinal tract, or an inability to generate sufficient HCO−3. Thus demonstrating the importance of maintaining balance between acids and bases in the body for maintaining optimal functioning of organs, tissues and cells.
The body regulates the acidity of the blood by four buffering mechanisms.

Bicarbonate buffering system
Intracellular buffering by absorption of hydrogen atoms by various molecules, including proteins, phosphates and carbonate in bone.
Respiratory compensation. Hyperventilation will cause more carbon dioxide to be removed from the body and thereby increases pH.
Kidney compensation

Buffer
The decreased bicarbonate that distinguishes metabolic acidosis is therefore due to two separate processes: the buffer (from water and carbon dioxide) and additional renal generation. The buffer reactions are:

  
    
      
        
          
            H
            
              +
            
          
          +
          
            HCO
            
              3
            
            
              −
            
          
          
            
              
                
                  
                    
                      ↽
                    
                    
                    
                    
                      −
                    
                  
                
              
              
                
                  
                    
                      −
                    
                    
                    
                    
                      ⇀
                    
                  
                
              
            
          
          
            H
            
              2
            
            
              
            
          
          
            CO
            
              3
            
            
              
            
          
          
            
              
                
                  
                    
                      ↽
                    
                    
                    
                    
                      −
                    
                  
                
              
              
                
                  
                    
                      −
                    
                    
                    
                    
                      ⇀
                    
                  
                
              
            
          
          
            CO
            
              2
            
            
              
            
          
          +
          
            H
            
              2
            
            
              
            
          
          O
        
      
    
    {\displaystyle {\ce {H+ + HCO3- <=> H2CO3 <=> CO2 + H2O}}}
  The Henderson-Hasselbalch equation mathematically describes the relationship between blood pH and the components of the bicarbonate buffering system:

  
    
      
        
          pH
        
        =
        
          
            pK
          
          
            a
          
        
        +
        
          
            L
            o
            g
          
        
        ⁡
        
          
            
              [
              
                
                  HCO
                
                
                  3
                
                
                  −
                
              
              ]
            
            
              [
              
                
                  CO
                
                
                  2
                
              
              ]
            
          
        
      
    
    {\displaystyle {\text{pH}}={\text{pK}}_{a}+\mathop {\mathrm {Log} } {\frac {\left[{\text{HCO}}_{3}^{-}\right]}{\left[{\text{CO}}_{2}\right]}}}
  

Using Henrys law, we can say that [CO2] = 0.03 × PaCO2
(PaCO2 is the pressure of CO2 in arterial blood)
Adding the other normal values, we get
  
    
      
        
          pH
        
        =
        6.1
        +
        
          
            L
            o
            g
          
        
        ⁡
        
          [
          
            
              24
              
                0.03
                ×
                40
              
            
          
          ]
        
      
    
    {\displaystyle {\text{pH}}=6.1+\mathop {\mathrm {Log} } \left[{\frac {24}{0.03\times 40}}\right]}
  

  
    
      
        =
        6.1
        +
        1.3
      
    
    {\displaystyle =6.1+1.3}
  

  
    
      
        =
        7.4
      
    
    {\displaystyle =7.4}

Consequences
Acute Metabolic Acidosis
Acute Metabolic Acidosis most often occurs during hospitalizations, and acute critical illnesses. It is often associated with poor prognosis, with a mortality rate as high as 57% if the pH remains untreated at 7.20. At lower pH levels, acute metabolic acidosis can lead to impaired circulation and end organ function.

Chronic Metabolic Acidosis
Chronic metabolic acidosis commonly occurs in people with Chronic Kidney Disease with an eGFR of less than 45 ml/min/1.73m2, most often with mild to moderate severity; however, metabolic acidosis can manifest earlier on in the course of Chronic Kidney Disease. Multiple animal and human studies have shown that metabolic acidosis in Chronic Kidney Disease, given its chronic nature, has a profound adverse impact on cellular function, overall contributing to high morbidities in patients.
The most adverse consequences of chronic metabolic acidosis in people with Chronic Kidney Disease and in particular, for those who have end-stage renal disease (ESRD), are detrimental changes to the bones and muscles. Acid buffering leads to loss of bone density, resulting in an increased risk of bone fractures, renal osteodystrophy, and bone disease; as well, increased protein catabolism leads to muscle wasting. Furthermore, metabolic acidosis in Chronic Kidney Disease is also associated with a reduction in eGFR; it is both a complication of Chronic Kidney Disease, as well as an underlying cause of Chronic Kidney Disease progression.

Treatment
Treatment of metabolic acidosis depends on the underlying cause, and should target reversing the main process. When considering course of treatment, it is important to distinguish between acute versus chronic forms.

Acute Metabolic Acidosis
Bicarbonate therapy is generally administered In patients with severe acute acidemia (pH < 7.11), or with less severe acidemia (pH 7.1-7.2) who have severe acute kidney injury