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.
"Oxford Dictionary of Medical Quotations". Book edited by Peter McDonald, p. 9, 2004.