The head of a facility to which a person was committed or from which a person was required to receive temporary or extended inpatient or outpatient health services shall discharge the person when the court order expires.
Tex. Health and Safety Code § 81.195