Survival and risk factors for mortality in elderly patients with dementia