; and (B) by adding at the end the following subsection: (jjj) Rural Emergency Hospital; Rural Emergency Hospital Outpatient Services (1) The term rural emergency hospital means a facility that— (A) (i) as of December 31, 2016— (I) was a critical access hospital; or (II) was a hospital with not more than 50 beds located in a county (or equivalent unit of local government) in a rural area (as defined in section 1886(d)(2)(D)), or was a hospital with not more than 50 beds that was treated as being located in a rural area pursuant to section 1886(d)(8)(E); or (ii) was a critical access hospital described in clause (i)(I) or a hospital described in clause (i)(II) that ceased operations during the period beginning on the date that is 5 years prior to the date of the enactment of this subsection and ending on December 30, 2016; (B) provides 24-hour emergency medical care and observation care that does not exceed an annual per patient average of 24 hours or more than 1 midnight; (C) does not provide any acute care inpatient beds and has protocols in place for the timely transfer of patients who require acute care inpatient services or other inpatient services; (D) has elected to be designated as a rural emergency hospital; (E) has received approval to operate as a rural emergency hospital from the State under section 1834(v)(3)(A); and (F) is certified by the Secretary under section 1834(v)(3)(B). (2) The term rural emergency hospital outpatient services means medical and other health services furnished by a rural emergency hospital on an outpatient basis. (3) Nothing in this subsection or section 1834(v)(3) shall be construed to prohibit a rural emergency hospital from providing extended care services. . (2) Payment for rural emergency hospital services (A) In general Section 1833(a) of the Social Security Act ( 42 U.S.C. 1395l(a) ) is amended— (i) in paragraph (8), by striking and at the end; (ii) in paragraph (9), by striking the period at the end and inserting ; and