When a judge or court authorized to issue writs of habeas corpus shall be satisfied, upon investigation, that a person in legal custody is afflicted with a disease which will render a removal necessary for the preservation of life, an order may be made for the removal of the person to some other place where the person's health will not be likely to suffer, or the person may be admitted to bail when it appears that any manner of confinement will endanger the person's life.
Tex. Code Crim. Proc. § 11.25