When a person has been involuntarily committed for treatment to a hospital for a period of 90 or 180 days, and the superintendent or professional person in charge of the hospital determines that the person no longer requires active psychiatric treatment at an inpatient level of care, the behavioral health administrative services organization, managed care organization, or agency providing oversight of long-term care or developmental disability services that is responsible for resource management services for the person must work with the hospital to develop an individualized discharge plan, including whether a petition should be filed for less restrictive alternative treatment on the basis that the person is in need of assisted outpatient treatment, and arrange for a transition to the community in accordance with the person's individualized discharge plan within 14 days of the determination.