When a material witness in any criminal case is about to leave the state, or is so sick or infirm as to afford reasonable grounds for apprehending that he will be unable to attend the trial, the defendant or the State of Oklahoma may apply for an order that the witness be examined conditionally.
Okla. Stat. tit. 22, § 762