Anonymization doesn’t just mean “leave their names out”. An entire patient's medical history is in itself personal identifiable information. Instead of googling for “headache”, they now have stored a copy of every medical detail in your life.
if you enter an entire patient history, it could easily be an identifier of the person whereas Google queries have a smaller max limit number of tokens