https://oig.hhs.gov/fraud/docs/alertsandbulletins/2004/fa021...
It points out a pair of laws -- the Federal Anti-Kickback Statute, and the Social Security Act -- which may have caused some confusion about discounts and waivers. Hospitals, the memo assures, are free to offer discounted services under a specific set of conditions such as methodically established patient financial need, an inability to collect on bills, and given that the waiver does not in any way entice business (i.e., you can't advertise it).
But the implication is that you can't give discounts willy-nilly, as a provider, or risk federal audit.
A separate but related issue is that under-billing may be considered fraud by CMS. A doctor cannot provide a service which they do not bill for, nor bill for a code which is lesser in magnitude than the actual service provided. I can't say if anyone has ever been investigated for under-billing.
In any case it's worth adding that aside from legalities, there are severe ethical ramifications of offering discounts to certain patients and not others unless that decision is made by some impartial measure. You could imagine all kinds of kickbacks, favors, enticement, coercion, biases, and so forth rearing their ugly head if doctors are given the freedom to bill whatever they choose (less or more).