This is a field where a surprising amount of progress is being made. People still tend to assume that CPR is mostly a token effort so bystanders feel like they're doing something. In reality, high quality CPR + rapid access to an AED can give just about any heart a fighting chance at beating again (assuming the underlying problem is transient or easily treatable... if your LAD cardiac artery is 100% occluded and half your heart has died, there's no coming back from that...). Techniques like 'hands only CPR' are dramatically increasing the willingness of bystanders to get involved and do something productive.
The area where really exciting progress is being made is in improving the rates of survival to discharge from the hospital. Techniques like the therapeutic hypothermia mentioned in the article are rapidly gaining acceptance. ACLS (Advanced Cardiac Life Support, the standard of care for acute cardiac emergencies, including cardiac arrest) now suggests that providers should 'consider' therapeutic hypothermia whenever a return of spontaneous circulation (ROSC) is achieved (I know 'should consider' doesn't sound all that exciting, but the American Heart Association is an (understandably) conservative organization, and doesn't make broad based recommendations without a fair amount of data to base them on).
I could ramble on about this for a long time, there's a lot of exciting research being done (continuous compressions, continuous EtCO2 monitoring for evaluating compression efficacy and alerting when ROSC has occurred, even really controversial stuff like withholding Epinephrine (a large scale study from Japan has shown that while Epi increases the odds of achieving ROSC, it may _decrease_ the odds of survival to discharge)). This is a topic near and dear to my heart. I volunteer with my local ambulance service, and I'm very close to my New York State Paramedic certification (just need to take the exam). Calls like the ones described in the comments here are exactly why I love doing this... The overlap between my work in EMS and my day job (development) is bigger than you might think... Debugging is debugging... the stakes are just a lot higher.
No offense to your passion, but I thought that CPR can be quite dangerous and ineffective. Don't many doctors wear DNR tags because of this?
The wikipedia article [1] has some information on this. The survival rate is something like 4% even though immediate recovery is around 40% (they survive long enough to get to the hospital, where they die due to the underlying condition). Meanwhile, the person has to suffer with the pain of broken ribs or other damage from the CPR attempt.
As a paramedic, the "DNR" thing is part "folklore", part reality, but not for the reasons you cite.
If CPR is ineffective, the result is death. Dangerous? Not particularly.
Most people wearing DNR tags (aside: even a DNR tattoo on the chest is not considered legally binding against "heroic measures", unless signed by a physician) do so to provide some measure of what the patient might want (due to life expectancy, illness, etc).
Survival rate to discharge is HIGHLY dependant on many, many variables - I mention elsewhere that in certain parts of the country, due to concerted education and well managed/funded EMS systems, survival rates can approach 50% to discharge. You are right, though, successful CPR isn't going to negate the underlying cardiac condition.
If CPR buys a patient a year to five years, the pain of broken ribs is probably fairly minor in the grand scheme of things.
There are, as mentioned, a whole host of advances. My home EMS system does some fairly deep analysis of all CPR attempts and works to revise protocols, including what drugs to administer, through to 'continuing compression through defib shock' (studies done on medical students showing it to be a viable possibility).
Ultimately, education is the key - the ability to get skilled compressions more quickly on the chest, continuing to perfuse the brain and other organs has a huge impact in survivability, as well as damage done.
It's not the CPR that's particularly damaging. Yes, ribs are dislocated (though rarely broken), and cartilage is torn. Those are fairly minor complications though. The 'damage' is done by the medications we push. Drugs like Epinephrine are very good at getting your heart to beat again. A recent study in Japan suggests that that may be at the expense of your brain, and other vital organs. Other drugs commonly used in ACLS resuscitation are equally nasty (Amiodarone, for instance).
You're absolutely right that we've gotten very good at getting a heart to beat for a few more days until it succumbs to the damage done to the rest of the body (that 40% figure you mention, though out-of-hospital rates are still much lower than that). The exciting research being done is to improve long term outcomes for cardiac arrest patients.
More and more research is showing that the key to a good long term outcome is early compressions, effective compressions (push hard and fast), uninterrupted compressions, and early defibrillation (with an AED or manual defibrillator). Over the past 10 years, resuscitation algorithms have been streamlined to minimize 'off chest' time. Compression to breath ratios have changed (from 5:1, to 15:2, to 30:2). A great deal of emphasis has been placed on keeping the rhythm checks that happen every two minutes as short as possible. We're now teaching people to continue compressions while the defibrillator is charging (and under ideal circumstances, you could easily continue compressions throughout the shock). Intubation is performed without stopping compressions.
The focus of all of these changes is to decrease the number of time compressions are stopped. Every time compressions are stopped, it takes some number of compressions to get the pressure built back up in your circulatory system. Fewer interruptions means fewer 'wasted' compressions, and less time that the brain isn't getting perfused. This is obviously key to a good neurological outcome.
We like to think all our fancy drugs and advanced interventions are doing something effective, but in reality, 'basic' treatments like CPR and defibrillation are what really save lives, and more importantly, save brain.
The area where really exciting progress is being made is in improving the rates of survival to discharge from the hospital. Techniques like the therapeutic hypothermia mentioned in the article are rapidly gaining acceptance. ACLS (Advanced Cardiac Life Support, the standard of care for acute cardiac emergencies, including cardiac arrest) now suggests that providers should 'consider' therapeutic hypothermia whenever a return of spontaneous circulation (ROSC) is achieved (I know 'should consider' doesn't sound all that exciting, but the American Heart Association is an (understandably) conservative organization, and doesn't make broad based recommendations without a fair amount of data to base them on).
I could ramble on about this for a long time, there's a lot of exciting research being done (continuous compressions, continuous EtCO2 monitoring for evaluating compression efficacy and alerting when ROSC has occurred, even really controversial stuff like withholding Epinephrine (a large scale study from Japan has shown that while Epi increases the odds of achieving ROSC, it may _decrease_ the odds of survival to discharge)). This is a topic near and dear to my heart. I volunteer with my local ambulance service, and I'm very close to my New York State Paramedic certification (just need to take the exam). Calls like the ones described in the comments here are exactly why I love doing this... The overlap between my work in EMS and my day job (development) is bigger than you might think... Debugging is debugging... the stakes are just a lot higher.