The top court ruling comes after a doctor euthanised a dementia patient who had made a living will.