Yes, it totally sucks, and it almost caused me harm trying to avoid it. I am sure I was not the only one. I imagine some poor souls got into some real trouble even suicide.
The American Medical Association, et al., sold out their patients in exchange for not being held accountable for the US opioid crisis. (my opinion of course.)
My doc didn't think it was any big deal, she said I was her first patient to question it. She thought the waiver had some limitations, I showed her that it did not have any limitations except that access had to be for official use (which is not much of a limitation.) The records are stored in an electronic registry that various local or federal government agencies can access without warrants or notice.
As a lawyer I cannot imagine voluntarily entering into such an agreement against the interest of my clients. I still find it shocking.