If a licensed private or local public hospital or treatment resource has contracted with the department to serve defendants in the region and has available suitable accommodations, the court shall commit the defendant to the facility, and the facility shall admit and detain the defendant in conformity with its obligations under its contract with the department.
T.C.A. § 33-6-507