Before a person is discharged under Section 81.195 or 81.196, the health authority or department shall prepare a discharge certificate, file it with the court that entered the order, and notify the head of the facility.
Tex. Health and Safety Code § 81.197