(6) Special rule for qualified health care properties For purposes of this subsection— (A) Acquisition at expiration of lease The term “foreclosure property” shall include any qualified health care property acquired by a real estate investment trust as the result of the termination of a lease of such property (other than a termination by reason of a default, or the imminence of a default, on the lease). (B) Grace period In the case of a qualified health care property which is foreclosure property solely by reason of subparagraph (A), in lieu of applying paragraphs (2) and (3)— (i) the qualified health care property shall cease to be foreclosure property as of the close of the second taxable year after the taxable year in which such trust acquired such property, and (ii) if the real estate investment trust establishes to the satisfaction of the Secretary that an extension of the grace period in clause (i) is necessary to the orderly leasing or liquidation of the trust’s interest in such qualified health care property, the Secretary may grant one or more extensions of the grace period for such qualified health care property. Any such extension shall not extend the grace period beyond the close of the 6th year after the taxable year in which such trust acquired such qualified health care property. (C) Income from independent contractors For purposes of applying paragraph (4)(C) with respect to qualified health care property which is foreclosure property by reason of subparagraph (A) or paragraph (1), income derived or received by the trust from an independent contractor shall be disregarded to the extent such income is attributable to— (i) any lease of property in effect on the date the real estate investment trust acquired the qualified health care property (without regard to its renewal after such date so long as such renewal is pursuant to the terms of such lease as in effect on such date), or (ii) any lease of property entered into after such date if— (I) on such date, a lease of such property from the trust was in effect, and (II) under the terms of the new lease, such trust receives a substantially similar or lesser benefit in comparison to the lease referred to in subclause (I). (D) Qualified health care property (i) In general The term “qualified health care property” means any real property (including interests therein), and any personal property incident to such real property, which— (I) is a health care facility, or (II) is necessary or incidental to the use of a health care facility. (ii) Health care facility For purposes of clause (i), the term “health care facility” means a hospital, nursing facility, assisted living facility, congregate care facility, qualified continuing care facility (as defined in section 7872(g)(4)), or other licensed facility which extends medical or nursing or ancillary services to patients and which, immediately before the termination, expiration, default, or breach of the lease of or mortgage secured by such facility, was operated by a provider of such services which was eligible for participation in the medicare program under title XVIII of the Social Security Act with respect to such facility.