Notwithstanding any other provision of law, persons licensed pursuant to this chapter to provide residential foster care to a child either placed with them pursuant to order of the juvenile court or voluntarily placed with them by the person or persons having legal custody of such child, may give the same legal consent for that child as a parent except for the following: (1) marriage; (2) entry into the armed forces; (3) medical and dental treatment, except that consent may be given for ordinary medical and dental treatment for such child, including, but not limited to, immunizations, physical examinations, and X-rays; and (4) if the child is voluntarily placed by the parent or parents, those items as are agreed to in writing by the parties to the placement.
To this effect, the state department shall prescribe rules and regulations to carry out the intent of this section.
This section does not apply to any situation in which a juvenile court order expressly reserves the right to consent to those activities to the court.