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