A resident may be discharged from a facility after he gives the administrator, a physician, or a nurse of the facility written notice of his desire to be discharged. If a guardian has been appointed for a resident or if the resident is a minor, the resident shall be discharged upon written consent of his guardian or if the resident is a minor, his parent unless there is a court order to the contrary. In such cases, upon the resident's discharge, the facility is relieved from any responsibility for the resident's care, safety or well-being.
210 ILCS 45/2-111