; and (2) by adding at the end the following new subparagraph: (N) (i) With respect to discharges occurring on or after October 1, 2023, in the case of a medicare-dependent, small rural hospital, for purposes of applying subparagraph (D)— (I) there shall be substituted for the base cost reporting period described in subparagraph (D)(i) the 12-month cost reporting period beginning during fiscal year 2016; and (II) any reference in such subparagraph to the first cost reporting period described in such subparagraph is deemed a reference to the first cost reporting period beginning on or after October 1, 2023. (ii) This subparagraph shall only apply to a hospital if the substitution described in clause (i)(I) results in an increase in the target amount under subparagraph (D) for the hospital. . 4. Prohibition of adjustments to classifications and weighting factors relating to the calculation of payments for sole community hospitals and Medicare-dependent hospitals Section 1886(d)(4)(C) of the Social Security Act ( 42 U.S.C. 1395ww(d)(4)(C) )— (1) in clause (i), by striking The Secretary and inserting Subject to clause (v), the Secretary ; and (2) by adding at the end the following new clause: (v) For discharges using the rebased target amounts described in subparagraph (M) or (N) of subsection (b)(3), the Secretary may not adjust such amounts for adjustments required by clause (iii) prior to October 1, 2015. . 5. Extension of the medicare-dependent hospital (MDH) program (a) Extension of payment methodology Section 1886(d)(5)(G) of the Social Security Act ( 42 U.S.C. 1395ww(d)(5)(G) ) is amended— (1) in clause (i), by striking , and before October 1, 2024 ; and (2) in clause (ii)(II), by striking , and before October 1, 2024 . (b) Conforming amendments (1) Extension of target amount Section 1886(b)(3)(D) of the Social Security Act ( 42 U.S.C. 1395ww(b)(3)(D) ) is amended— (A) in the matter preceding clause (i), by striking , and before October 1, 2024