A shrill voice from the overhead speaker pierced through the hospital.

“Code Blue. Code Team activated.”

As dozens of pagers rang simultaneously, I knew what that announcement meant. Someone had lost their pulse or had a fatal heart rhythm. Without cardiopulmonary resuscitation, the patient would die. And as the leader of the team that responds to any Code Blue, I was going to make sure that didn’t happen.

When I arrived at the patient’s room, a doctor had already started delivering chest compressions to make sure that vital organs such as the brain were still receiving blood. A nurse prepared to deliver an electric shock that might jolt the patient’s heart back to a normal rhythm. A third person was drawing up a medicine that would increase the patient’s blood pressure.

After making sure that the necessary steps were in place, I finally looked at the patient, a thin, older man, lying unconscious in his bed. I later learned that he was a grandfather, a father and a husband. In that moment, however, I focused only on how to bring this man back from death’s doorstep.

But 40 minutes, one shock and countless medicines later, he still did not have a pulse. Several of his ribs had cracked during chest compressions. An ooze of blood trickled out of his mouth — an ominous foreboding that his ability to form blood clots was shutting down.

I asked the team whether anything else could be done to save this man. An empty silence filled the room.

Nobody suggested, though, that it was time to stop CPR. I had to make that decision myself: “Everybody, let’s end this code.” Time of death: 2 a.m.

While doctors hate to think about it, hundreds of thousands of cardiac arrests end the same way. According to the American Heart Association, more than 550,000 people go into cardiac arrest each year, and fewer than 20 percent survive.

The likelihood of surviving is nearly twice as high among people who “code” in the hospital, probably because most of them receive CPR. However, a 2009 study published in the New England Journal of Medicine showed that only 22 percent of people suffering a cardiac arrest live long enough to be discharged from the hospital, and nearly 30 percent of those survivors have serious neurological disabilities, probably because of a lack of oxygen during the arrest.

In other words, most people who have a cardiac arrest don’t make it, even with CPR. As a resident physician who has spent most of the past three years in the hospital and led or assisted in many CPR efforts, this sobering fact is not lost upon me.

The process of CPR is almost as disheartening as its bleak outcomes. Code Blues are inevitably gruesome. You’re supposed to push hard and fast during chest compressions. According to the American Heart Association, broken ribs are to be expected. Bleeding is also common, and breathing tubes are often forced into the patient’s airway. Because of this trauma, we don’t routinely allow families to watch CPR attempts of their loved ones. I realize that broken ribs and blood are worth it if they save someone’s life. But that does not diminish the fact that a code leader must ignore some harrowing images to focus on bringing someone back from death.

This lack of emotional investment might explain why, despite knowing that most people don’t survive CPR, doctors are biased toward keeping CPR going. We routinely run long codes, in part because we think that we can bring patients back. And sometimes we do bring patients back: A 2012 study published in the Lancet showed that 15 percent of patients who survived cardiac arrest had at least 30 minutes of CPR.

But an equally important reason that we run codes longer than we should is fear — fear that stopping CPR could rob that patient of a chance at life and rob his family of more time with a loved one. That’s probably why other people in the room don’t usually suggest that we stop CPR, even when everyone knows it is futile.

Medical authorities have chosen not to wade into the ethically murky waters of stopping CPR. Although organizations such as the American Heart Association publish and disseminate guidelines on how to perform CPR, there are few recommendations on when to stop it. Asystole — the lack of a heart rhythm — for 20 minutes is considered lethal. But there is little data on outcomes for other situations. I’ve seen CPR run for hours; perhaps the patient regains a pulse temporarily, only to lose it again and restart the clock of CPR.

In 2006, Canadian researchers, in an effort to develop a rule for when emergency medical technicians should stop CPR, studied records from more than 1,200 patients who had suffered out-of-hospital cardiac arrests. The rule, based on factors such as whether the arrest had been witnessed by somebody and whether a shock was given, accurately predicted when CPR would be futile in 99.5 percent of cases. The authors suggested that implementing the rule would reduce transport of such patients to hospitals by more than 62 percent, saving health-care costs and eliminating hours of futile resuscitation efforts. That rule hasn’t made its way into formal guidelines, as it probably should. But to suggest that a predetermined rule should control whether CPR should be stopped would create controversy — and even anger — among doctors and patients. And that’s why it hasn’t been done yet.

But even if there were guidelines, they probably wouldn’t be running through my head when I am leading CPR. As the code leader, you always think about more things to do. I can always give more epinephrine, try a clot-busting drug or deliver another shock. Doctors are systematically biased against stopping CPR — even if we want to stop — because we can’t be criticized for keeping going.

None of this is to say that we should be performing less or more CPR. There are many patients who will survive cardiac arrest with CPR and have a meaningful recovery. And unless a patient tells me they wouldn’t want CPR, I will do it, if needed, without question.

But patients and families should understand the mechanics of CPR — how we perform it, what it looks like and, perhaps most important, the difficulty for the medical team of stopping it — before deciding to undergo it. If they had this understanding, more people might not want CPR in the first place: Researchers at Massachusetts General Hospital asked cancer patients to watch an unbiased video that described CPR and included a simulated patient receiving chest compressions and being put on a ventilator. Compared with those who didn’t watch the video, those who did were more likely to not want CPR in case of cardiac arrest and said they felt better informed.

After the long and unfortunate CPR effort performed on that thin older man, I walked into the room where his family was waiting. His daughter and granddaughter were distraught, crying in a corner. His wife stared in shock across the room. I tried to console them, reassuring them that we did everything we could.

But that is never really true with CPR: You can always keep going. And that’s probably why, after a patient dies despite CPR, the doctor and the family both feel a sense of regret.

health-science@washpost.com

Parikh is a resident in internal medicine at Brigham and Women’s Hospital and a clinical fellow in medicine at Harvard Medical School. Follow him on Twitter @ravi_b_parikh.