A predischarge plan of aftercare for a minor admitted to inpatient treatment under this chapter, by a parent, guardian, or other legal custodian shall be formulated in cooperation with the minor and the minor's family. The plan shall be explained to the minor and the parent, guardian, or other legal custodian who consented to admission, who shall be given a copy thereof. The plan shall:
The lack of such a plan is not sufficient reason for the continued inpatient treatment of a minor if discharge is otherwise appropriate or required under this title.
SDCL 27A-15-27