Medications do have side effects and you need to be aware of any changes when you start a new medication. Medications that work for some don't work as well for other and medication that have serious side effects for one might have no side effects for another. But you are right... you need to be acutely aware of any changes after starting a new medication. I kept a note book with med changes and changes in behavior or health. That way it was easier to see trends and changes

Sometimes memory fades or is jaded as times goes on.
UTIs are common in the elderly and they absolutely can cause confusion and agitation. Mom and Dad have both had periods of very bizarre behavior that turned out to be the result of a UTI. So I am not surprised they requested a urinalysis. That is usually the first place to start explaining unusual behavior in the elderly.
Love, deb