Validation of an instrument to measure cognitive function in patients with heart failure