Good question. I try to approach this with a simple idea. There may be family or other social impediments to this idea, but it works for me. Is continuing care going to increase the chance of survival? Or Are you prolonging the act of dying?
Never an easy thing. Commonsense should play a big part in the decision. If the docs/nurses have done all they can and the chance of a meaningful reovery is bleak, family members/friends should gather and share their thoughts/concerns and make an informed decision together. It is not an easy process because it is just the way it is. Because we have love and compassion... May prayer is with you. Good luck.