This is a fraught subject, one that most people do not understand. There are some conditions that make the heart stop which are reversible some of the time with CPR and drugs. A heart attack is the king of these. Let’s score that 100 points.
Then there are conditions that are never reversible -decapitating injury, for example. Let’s score that a zero.
All the other medical conditions are on a sliding scale of reversibility. And all of them used to be “scored”, and an appropriate resusscitation priority assigned, by personal physicians.
Two big changes have taken personal physicians out of hospitals, and family members are now routinely asked, “what do you want”?
So now, the physician making the decisions doesn’t know the patient, and families don’t know him. This usually results in asking “What do you want done about CPR for a GI bleeder losing blood faster than it can be transfused?”, when the family is offered something (”what you want”) that cannot realistically be obtained.
The bottom line is taht people who can’t reasonably be expected to benefit from CPR should not get CPR, whatever anybody “wants”.