Hamish MacInnes, the Scottish climber, was sectioned in a psychiatric hospital because of confusion and delirium caused by an undiagnosed UTI. It took 5 years for the infection to be diagnosed and treated.
However the first time it did indeed take quite a while before they figured out she had a UTI, and it took a few times before we figured out the pattern.