Elective medical procedures in exchange for reduced sentencing

Posted on Facebook, thought it might make a good thread here.

CBS News: Oklahoma woman receives reduced sentence after getting sterilized
excerpt said:
U.S. District Judge Stephen Friot showed leniency to 34-year-old Summer Thyme Creel during her sentencing Thursday because she had surgery to prevent pregnancies.

Friot had suggested the medical procedure in a June order, noting that Creel had relinquished her parental rights to six of her seven children.

Friot defended his suggestion Thursday, The Oklahoman reports, saying the U.S. Supreme Court "has yet to recognize a constitutional right to bring crack- or methamphetamine-addicted babies into this world."

(..) Creel pleaded guilty last year to using a counterfeit check at a Walmart in Moore in 2014. She faced a maximum penalty of 10 years in prison.
I wonder what other examples of elective medical procedures in exchange for reduced sentencing there are, other than the below. I guess there's the chemical castration of sex offenders, though that's often mandatory. Looks like there's also been attempts to exchange organ donations for parole.

The ethics of this topic are fascinating. Can you meaningfully consent to a violation of your body when being threatened with caging? It's like taking the concept of plea deals (and things like CI agreements) to an extreme.
I'd be very wary about codifying things like this into law. Giving judges a little wriggle room in sentencing is probably the best way to implement stuff like this - if at all - similar to the way they reduce sentences if people go through a rehab program, agree to ankle monitoring and home arrest vs prison, or attend a youth camp for juvenile offenders rather than juvenile prison.

The bigger concern with this is that the procedure is irreversible. While you can't get time served back if it turns out you were wrongly tried, medical procedures such as this are irreversible, and like the death penalty must be very, very carefully applied.

That said, it seems hard to make a case that sterilization should result in a reduced sentence for passing a bad check. No doubt she's had a lot of time before judges, and he's likely taking a "holistic" approach to criminal justice, but in this specific case (and absent information the judge has that isn't being released) it should worry us.
This just sounds like hidden misogyny on the judges part. Nope, don't like it.
That being said, I certainly think the societal benefits that would result from government paid, voluntary sterilization procedures would be quite good. I just wouldn't want there to be any incentives tied to it to unfairly coerce people into doing it.
I don't understand how a bad check would lead a judge to ask for such a drastic procedure. However, I used to work in Moore Okla, and I wouldn't mind them putting sterilization solution in the drinking water.
Oh, look, eugenics is back, right on que.

Now just sprinkle some syphilis on them, and we're good.
As the (step)brother of someone who was victimized by a woman whose M.O. with several men was to have a baby, give it to the father to raise, then reassert maternal rights once the kid becomes a teen (i.e., "after the hard part"), I would like to at least see the option of forced sterilization left open to judges, because there legitimately are times when the real issue is "This person needs to stop having kids."
I am not kidding about this. She filed for custody practically the exact day my (step?)nephew turned 11 (I think?), with my stepbrother's address misspelled so they wouldn't be able to contact him and would therefore get a default judgement. The only reason we found out she had filed was because she'd done this with enough other guys (yes, even the fake address) that my stepmother (who worked for the state at the time) was preemptively contacting the courts every month just waiting for her to try this. And then yes, when she got a conviction later (for possession of crack cocaine, I think it was), one of the conditions was that her sentence would be reduced if she subjected to some sort of nonreversible sterilization procedure. My stepmother even picked her up (45mi away) and drove her to the hospital. She says it was to be nice, but I'm pretty sure it was to make sure she did NOT miss that appointment.