The kind of consent required under the law does vary depending on the sensitivity of the information and the like. The fact that it's “for good” isn't really the factor that we would think about. We would think about the sensitivity of the data. We would think about whether or not the consent was informed and the like. The fact that this is for good purposes, in this case obviously in the context of public health and a pandemic, isn't one of the core questions we'd typically be thinking about in terms of the standard of consent.
On February 28th, 2022. See this statement in context.