Joan Rivers has been in a medically induced coma at Mount Sinai Hospital since Thursday, and after five days on life support, doctors have announced they’re taking the 81-year-old out of the coma. After Rivers went into cardiac and respiratory arrest while undergoing a routine vocal cord procedure at a private practice, she was rushed to the hospital where she remains.

Medically induced comas are actually common for people who go into cardiac arrest because it gives doctors the opportunity to use hypothermia to cool the body down. Patients treated with hypothermia are more likely to recover from cardiac arrest and heart attacks in order to get oxygen to the brain. The body shivers and burns energy that then sends the brain oxygen that it was deprived of from cardiac arrest.

“On behalf of my mother and our family, we are extremely grateful for all the love and support we’ve received. At this time she does remain on life support,” Rivers’ daughter and publicist Melissa Rivers said in a statement. “I know my mother would be overwhelmed by the continued outpouring of kindness and I want to thank everyone for keeping us in their prayers.”

Earlier reports announced Rivers would be taken out of the coma and off life support over the weekend in order to assess the damage. When she is brought out of the coma on Tuesday, doctors announced they will give her a brain scan to determine if there was any brain damage from the lack of oxygen. Cardiac arrest patients experience a lack of oxygen because the heart needs oxygen to survive. Cardiac arrest differs from a heart attack in that it’s the heart’s electrical system malfunctioning, while a heart attack is a blockage that stops blood flow, according to the American Heart Association.

Doctors place patients in medically induced comas by administering controled doses of anesthetics or pain medications at high dosages in order to limit brain function. These intentional comas are used in intensive care units and put patients into a deep unconscious state, while sedation puts patients in a semi-conscious state to make surgeries or medical procedures more comfortable. The coma approach is a reversible treatment to help protect the brain and alleviate any pressure that’s been built up by decreasing its use, according to the American Society of Anesthesiologists. Throughout the coma, the patient, or in this case Joan Rivers, is carefully monitored by an anesthesiologist or doctors in a critical care setting.

Medically induced comas have been known to save the lives of patients who are at high risk of brain injury, physical trauma, a drug overdose, disease, or life-threatening seizure. The length of time a patient remains in their comatose state greatly varies and depends on what it’s being used to treat. The treatment is not without side effects and risks. Infections and poor immune system response is one of the most common; however, some patients report experiencing vivid nightmares and hallucinations that doctors believe are the brain’s effort to make sense of the sounds around in its environment. It’s a fairly new medical treatment that has come a long way in recent years thanks to the advancement in monitoring technology.