Atrial fibrillation and cognitive function: case-control study