Detecting delirium in elderly outpatients with cognitive impairment