Diabetic Ketoacidosis (DKA) is an acute, major, life-threatening complication of diabetes that mainly occurs in patients with type 1 diabetes that can lead to diabetic coma or even death. It occurs when the body does not have enough insulin. When your cells don't get the glucose they need for energy, your body starts to burn fat for fuel, and ketones are produced as an acidic byproduct of the fat burned for energy.
Ketones are chemicals that the body creates when it breaks down fat to use for energy. When ketones build up in the blood, they make it more acidic. They are a warning sign that your diabetes is out of control or that you are getting sick.
When DKA is severe, it must be treated in the hospital, often in the intensive care unit. Treatment involves giving fluids through your vein, insulin therapy to correct hyperglycemia, correction of electrolytes levels (Potassium and Magnesium), and closely watching certain chemicals in your blood using the Anion Gap (AG or AGAP) test. It can take several days for your blood sugar level to return to a normal range.
"Patients usually are not discharged from the hospital unless they have been able to switch back to their daily insulin regimen without a recurrence of ketosis. When the condition is stable, pH exceeds 7.3, and bicarbonate is greater than 18 mEq/L, the patient is allowed to eat a meal preceded by a subcutaneous (SC) dose of regular insulin." - Medscape.com