A 76-year-old woman is admitted after a fall with a hip fracture. Post-operatively she is confused, with fluctuating attention and disorganised thinking. Baseline cognitive function was intact. Which statement best distinguishes delirium from dementia in this context?