Cal. Penal Code § 4011
(d) In the event such prisoner is financially able to pay for his care, support and maintenance, the medical superintendent of such hospital other than a county hospital may, with the approval of such judge, enter into a special agreement with such person, or with his relatives or friends, for his care, support, maintenance, and other hospital expenses.
Any prisoner may decline such care or treatment and provide other care and treatment for himself at his own expense.