Service inputs and costs of care related to outcomes among cognitively impaired nursing home residents.