Q:

Meaning of "call the code"

What does the expression "call the code" mean?
Example:

Each patient is different, so the researchers looked at hospitals, comparing the average time spent trying to resuscitate patients and tracking how many patients survived until they were released. “How long do hospitals try for before they call the code?” Nallamothu said. 

A:

Code has a medical meaning. "Code blue" is a medical emergency. It is used to summon doctors in an hospital. It normally indicates that a patient's heart has stopped. From this is the verb "to code" - meaning to enter cardiac arrest. This verb is used quite freely: "Mr X was coding when he entered the hospital" Meaning that he was brought in with no heartbeat.
To call a code, is to cease resuscitation efforts. "To call something" is to make a judgement. The doctor must make a judgement that the heart cannot be restarted, and that the patient is indeed dead. The doctor tells the nurses and paramedics working with them to cease, and notes the time of death. 
"What really happens during a code" - slightly grim reading.
This use is only found in the USA and Canada.

A:

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. According to WebMD 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.

I believe a better phrase in the example sentence would have been "How long do hospitals try before they pronounce them dead?"
(Perhaps the example is using the word "call" as in "to call off", so the phrase was actually meant as "How long do hospitals try before they call off the code?".  Similar to the usage of "call" as when someone says, "That's it. I'm calling it." to mean that they are quitting whatever it is they are doing.)
In other words, the patient was already "coding," which is why (or synonymous to) the hospital workers were performing life-saving actions.
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).

A:

There are two parts to this phrase:

"Call [x]" - means roughly to declare that you believe x to be true. This is usually in a case where it can be unclear what is the case (as it is here, with when exactly someone dies and cannot be brought back). It might also be taken as simply, "to declare (verbal or otherwise)". I'm not sure that the difference in meaning can be distinguished here. 
"the code" - hospitals will have a code that means the patient has died, among other conditions. These serve as technical terms for the doctors and other staff, and in this case also serves as a euphemism for death. 

Call the code here, then, is synonymous to declare the patient dead. 

