The cognitive or behavioral impairment should be diagnosed based on a combination of history from the patient and from someone who knows the patient plus assessment of cognitive function (a bedside mental status examination or, if bedside testing is inconclusive, formal neuropsychologic testing).