Survival in institutionalized patients. Influence of dementia and loss of functional capacities.