I'm not sure that the example given is in line with the usual usage of the term "code" as it relates to a hospital setting. "To code" is usually to be in critical condition, requiring immediate help. I believe a better phrase in the example sentence would have been "How long do hospitals try [to resuscitate a patient] before they **pronounce them dead**?" In other words, the patient was already "coding," which is why (or synonymous to) the hospital workers were performing life-saving actions. [According to WebMD][1] for "code": > Technically, there's no formal definition for a code, but doctors > often use the term as slang for a cardiopulmonary arrest happening to > a patient in a hospital or clinic, requiring a team of providers > (sometimes called a code team) to rush to the specific location and > begin immediate resuscitative efforts. Generally, when a patient's condition worsens to whatever level that hospital has determined, then the patient will be "coding", or the nurse will "call a code", or whatever variation of the phrase is common there. There may be a button in the patient's room that anyone can press to "code" the patient, which will alert hospital staff to the patient's critical condition, and nurses, doctor's, and other support personnel will quickly come to provide immediate, potentially life-saving, care. In addition, if a patient is connected to certain monitoring devices, the devices may "code" the patient if certain conditions occur (e.g., no heartbeat). [1]: http://www.webmd.com/a-to-z-guides/code-blue-code-black-what-does-code-mean