; and (B) by striking during the period that the child and inserting during the period that the woman or child . (3) Effective date The amendments made by this subsection shall take effect on January 1, 2025. (b) Technical correction Section 5122(a)(1) of the Consolidated Appropriations Act, 2023 ( Public Law 117–328 ) is amended by striking after and all that follows through the period at the end and inserting after or in the case of an eligible juvenile described in section 1902(a)(84)(D) with respect to the screenings, diagnostic services, referrals, and targeted case management services required under such section . . 307. Permitting access to medical assistance under the Medicaid program for foster youth (a) In general Section 1905(a) of the Social Security Act ( 42 U.S.C. 1396d(a) ) is amended by adding at the end the following new sentence: In the case of an individual who is under the age of 21 and who is a patient in an institution for mental diseases that is a qualified residential treatment program (as defined in section 472(k)(4)), the exclusion from the definition of medical assistance set forth in the subdivision (B) following the last numbered paragraph of this subsection shall not apply with respect to items and services furnished to such an individual when received outside of such program. . (b) Effective date The amendment made by paragraph (1) shall apply with respect to medical assistance furnished in calendar quarters beginning on or after January 1, 2025. IV Offsets 401. Promoting value in Medicaid managed care Section 1903(m)(9)(A) of the Social Security Act ( 42 U.S.C. 1396b(m)(9)(A) ) is amended by striking (and before fiscal year 2024) .