Do not resuscitate (DNR), or no code, or DNR order, is a legal medical order written by a doctor either in the hospital or on a legal form to withhold cardiopulmonary resuscitation (CPR) or advanced cardiac life support (ACLS), in respect of the wishes of a patient in case their heart were to stop or they were to stop breathing (if a patient's breathing stops or if the patient's heart stops beating).