; (B) by striking In the case of and inserting the following: (A) Provision of screening, diagnostic, referral, and case management services pre-release In the case of ; and (C) by adding at the end the following new subparagraph: (B) Provision of mental health and substance use disorder services while an inmate (i) In general In the case of a child who is an eligible inmate, the child shall not be considered to be described in paragraph (2)(A) with respect to mental health services and substance use disorder services otherwise covered under the State child health plan (or waiver of such plan). (ii) Eligible inmate defined For purposes of this subparagraph, the term eligible inmate has the meaning given that term in section 1902(nn)(4), except that such section shall be applied by— (I) substituting child health assistance for medical assistance each place it appears; and (II) by substituting State child health plan under title XXI for State plan . . (2) Technical amendment (A) In general Section 5122(b) of division FF of the Consolidated Appropriations Act, 2023 ( Public Law 117–328 ) is amended by striking paragraph (1). (B) Effective date The amendment made by this paragraph shall take effect as if included in the enactment of the Consolidated Appropriations Act, 2023 ( Public Law 117–328 ). (c) Increased Federal match for mental health and substance use disorder services furnished to incarcerated individuals (1) Medicaid Section 1905 of the Social Security Act ( 42 U.S.C. 1396d ) is amended— (A) in subsection (b), by striking and (ii) and inserting (ii), and (jj)