You are way more likely to acquire an infection in prison (bacterial or viral) and have your health conditions ignored or downplayed than you are to get any real access to medical care.
I gave blood recently. One of the questions they ask you is have you been in jail or juvi recently. I assume for the reason you stated above. I.E. having been in jail makes your blood less desireable. Not sure if they’ll actually reject you, but they sure ask.