Notwithstanding the pendency of the action or any order previously entered by the court, if at any time after the petition is filed the staff of the facility determines that the involuntary patient is no longer in need of involuntary treatment, the facility may so certify in writing and discharge the patient, and shall promptly notify the court of its discharge, and the court may dismiss the action.
16 Del. C. § 2216