Should the hospitals have been better so this sensitive data doesn't get to Facebook? Yes.
But we cannot excuse the privacy invasive practices of Facebook and Google (I would be shocked if google was not also getting this data somehow).
And this is not just hospital data, it is certain sensitive apps (I really don't need or want Facebook to know every time I open Grindr), nearly every single thing we do these companies find a way to find out because they weasel their way in by offering some helpful feature that a developer would want to use.