Recognizing a court's authority to authorize a defendant's direct transfer from jail to inpatient or residential substance use disorder treatment.