When a resident is discharged, the department shall notify the court that committed the resident to a residential care facility under Subchapter C, Chapter 593.