1. Short title This Act may be cited as the Improving Mental Health and Drug Treatment Act of 2023 . 2. Lifting the IMD exclusion for substance use disorder and serious mental illness (a) Making permanent State Plan Amendment Option To Provide Medical Assistance for Certain Individuals Who Are Patients in Certain Institutions for Mental Diseases Section 1915(l)(1) of the Social Security Act ( 42 U.S.C. 1396n(l)(1) ) is amended by striking With respect to calendar quarters beginning during the period beginning October 1, 2019, and ending September 30, 2023, and inserting With respect to calendar quarters beginning on or after October 1, 2019, . (b) Lengths of stay Section 1915(l)(2) of the Social Security Act ( 42 U.S.C. 1396n(l)(2) ) is amended— (1) by striking 30 days and inserting 45 days ; and (2) by adding at the end the following new sentence: Nothing in this paragraph shall be construed as precluding a State from using other authorities, including section 1115, that apply with respect to medical assistance under the State plan under this title, or waiver of such plan, for delivering care in certain institutions for mental diseases with more than 16 beds concurrently with this paragraph and allowing for stays in such institutions for mental diseases equal to the combined total lengths of stays permitted under the respective authorities so long as all requirements for such authorities are met. . (c) Maintenance of effort revision Clauses (i) and (ii) of section 1915(l)(3)(A) of the Social Security Act ( 42 U.S.C. 1396n(l)(3)(A) ) are each amended by striking or, if higher, and all that follows through in accordance with this subsection . (d) Additional requirements (1) In general (A) General requirements Section 1915(l)(4) of the Social Security Act ( 42 U.S.C. 1396n(l)(4) ) is amended— (i) in subparagraph (A), by striking through (D) and inserting through (E)