; and ; (2) by inserting after clause (ii) the following new clause: (iii) effective for cost reporting periods beginning on or after July 1, 2017, all of the time so spent in the emergency department of a rural hospital by residents in emergency medicine from a hospital with an approved medical residency training program in such specialty shall be counted towards the determination of full-time equivalency in such program if the hospital with such program bears all, or substantially all, of the costs of training such residents in the rural hospital. In this subparagraph, the term rural hospital means a hospital that is located in a rural area (as defined for purposes of subsection (d)(2)(D)). ; and (3) by adding at the end the following new sentence: For purposes of this subparagraph, the emergency department of a rural hospital described in clause (iii) is a nonprovider setting. .