Ah, okay, I see.
The example you give, though, is where the court system has to intervene to mandate the treatment, not to make an exception to it. That’s an edge case, and I suppose if someone were not of sound mind (also a tricky subject), you could get a court order to treat them.
But the default should not be mandates unless you get someone to let you off the hook.