; and (4) by adding at the end the following new paragraph: (9) Distribution of additional residency positions to help combat opioid crisis (A) Additional residency positions For each of fiscal years 2019 through 2023 (and succeeding fiscal years if the Secretary determines that there are additional residency positions available to distribute under subparagraph (D)), the Secretary shall increase the otherwise applicable resident limit for each qualifying hospital that submits a timely application under this subparagraph by such number as the Secretary may approve for portions of cost reporting periods occurring on or after July 1 of the fiscal year of the increase. Except as provided in subparagraph (B)(iv) or (D), the aggregate number of increases in the otherwise applicable resident limit under this subparagraph shall be equal to 500 in fiscal year 2019 and 500 over the period of fiscal years 2020 through 2023, distributed in accordance with the succeeding subparagraphs of this paragraph. (B) Distribution for fiscal year 2019 (i) In general For fiscal year 2019, the positions available for distribution with respect to the fiscal year as described in subparagraph (A) shall be distributed to hospitals that have existing established approved programs in addiction medicine, addiction psychiatry, or pain management as determined by the Secretary. (ii) Number of positions hospital eligible to receive Subject to clauses (iii) and (iv), the aggregate number of positions a hospital may receive under this subparagraph with respect to fiscal year 2019 is equal to the sum of the following: (I) The number of full-time-equivalent residents that will be training in addiction medicine, addiction psychiatry, or pain management as determined by the Secretary with respect to the fiscal year. (II) The associated number of residents training in a pre-requisite program, such as internal medicine, necessary for the number of full-time residents for the programs described in subclause (I). (iii) Additional positions for expansion of