; and (ii) in a facility that is accredited for the treatment of substance use disorders by the Joint Commission on Accreditation of Healthcare Organizations, the Commission on Accreditation of Rehabilitation Facilities, the Council on Accreditation, or any other accrediting agency that the Secretary deems appropriate as necessary to ensure nationwide applicability, including qualified national organizations and State-level accrediting agencies. (B) The State agency responsible for administering the State plan under this title shall establish procedures to ensure that, with respect to any facility providing residential addiction treatment facility services in a fiscal year, the average monthly number of beds used by the facility to provide such services during such year is not more than 40. (C) The provision of medical assistance for residential addiction treatment facility services to an individual shall not prohibit Federal financial participation for medical assistance for items or services that are provided to the individual in or away from the residential addiction treatment facility during any 30-day period in which the individual is receiving residential addiction treatment facility services. (D) A woman who is eligible for medical assistance on the basis of being pregnant and who is furnished residential addiction treatment facility services during any 30-day period may remain eligible for, and continue to be furnished with, such services for additional 30-day periods without regard to any eligibility limit that would otherwise apply to the woman as a result of her pregnancy ending, subject to assessment by the facility and a determination based on medical necessity related to substance use disorder and the impact of substance use disorder on birth outcomes. . (b) Effective date The amendments made by this section shall apply to items and services furnished on or after January 1, 2019. 3. Grant program to expand youth addiction treatment facilities under Medicaid and CHIP (a) Establishment (1) In general