Legal aspects of dementia