I'm in the UK and if it transpired that Google (the company) had routine access to NHS medical data, I'd be very upset and complaining to the information commissioners office.
Does google/a private company have to do it? No, but at a minimum the UK govt needs to make significantly better use of this data for research purposes. a 100x increase in medical research spending and a new more agile public medical research body would probably be enough
The UK govt has proven that when it tries, it can do digital services _pretty well_.
The concern here isn't the government using the data for the betterment of society, it's the government handing over health data wholesale to companies whose sole purpose is to generate profit by exploiting data.
Ask for consent. If I say you can't use my medical data, then you can't use it.
If I say you can, then you can.
It's really very simple.
This is one of the many things that lead me to consider Google to be a harmful and reprehensible company.