Perioperative delirium and its relationship to dementia