The prime goal is to alleviate suffering, and not to prolong life. And if your treatment does not alleviate suffering, but only prolongs life, that treatment should be stopped.