what is the purpose of an advance directive in medical ethic.