(1)The provisions of this section shall apply to any patient suffering from mental disorder who is—
(a)a child or young person in respect of whom the rights and powers of a parent are vested in a local authority by virtue of—
(i)section 17 of the M1Social Work (Scotland) Act 1968; or
(ii)section 3 of the M2Child Care Act 1980 (which relates to the assumption by a local authority of parental rights and duties in relation to a child in their care); or
(iii)section 10 of the said Act of 1980 (which relates to the powers and duties of local authorities in England and Wales with respect to persons committed to their care);
(b)a person who is under the guardianship of a local authority under the following provisions of this Act or under the provisions of the M3Mental Health Act 1983; or
(c)a person the functions of whose nearest relative under this Act or under the Mental Health Act 1983 are for the time being transferred to a local authority.
(2)Where a patient to whom this section applies is admitted to any hospital or nursing home in Scotland (whether for treatment for mental disorder or for any other reason) then, without prejudice to their duties in relation to the patient apart from the provisions of this section, the authority having rights or functions in relation to him as aforesaid shall arrange for visits to be made to him on their behalf, and shall take such other steps in relation to the patient while in the hospital or nursing home as would be expected of a parent.