An 82-year-old woman with known mild cognitive impairment is admitted with a urinary tract infection. Over the last 24 hours she has become acutely confused, with fluctuating levels of consciousness and visual hallucinations. What is the most likely diagnosis?