Whenever the daily average of more than 100 persons are confined in any county or city jail there shall be available at all times a duly licensed and practicing physician for the care and treatment of all persons confined therein. Such daily average shall be determined by the number of persons confined in such jails during the last fiscal year. For county jails, such physician shall be designated by the sheriff. The salary of such physician shall be fixed by the supervisors of the county and shall be paid out of the same fund of the county as other claims against the county for salaries are paid. For city jails, such physician shall be designated and his salary fixed by the council of the city and shall be paid out of the general fund of such city. Any prisoner may decline such care or treatment and provide other care or treatment for himself at his own expense.
In the event a prisoner elects to decline treatment by the county or city jail physician and to provide medical treatment at his own expense, the sheriff or chief of police may have him removed from the county or city jail to a privately owned and operated medical facility or hospital located in the county approved by a judge of the superior court for such treatment. The prisoner shall be liable for the costs incurred by the county or city in providing the necessary custody and security of the prisoner only to the extent that such costs exceed the costs which would have been incurred by the county or city in providing such custody and security if it had provided treatment for him. The prisoner shall at all times remain in the location specified by the court and at no time be permitted to be housed or detained at any facility other than that designated.
Ca. Pen. Code § 4023