; (4) in paragraph (4)— (A) by inserting or eligible terminally ill offender after each eligible elderly offender ; and (B) by inserting and eligible terminally ill offenders after eligible elderly offenders ; and (5) in paragraph (5)— (A) in subparagraph (A)— (i) in clause (i), striking 65 years of age and inserting 60 years of age ; and (ii) in clause (ii)— (I) by striking the greater of 10 years or ; and (II) by striking 75 percent and inserting 2/3 ; and (B) by adding at the end the following: (D) Eligible terminally ill offender The term eligible terminally ill offender means an offender in the custody of the Bureau of Prisons who— (i) is serving a term of imprisonment based on conviction for an offense or offenses that do not include any crime of violence (as defined in section 16(a) of title 18, United States Code), sex offense (as defined in section 111(5) of the Sex Offender Registration and Notification Act ( 34 U.S.C. 20911(5) )), offense described in section 2332b(g)(5)(B) of title 18, United States Code, or offense under chapter 37 of title 18, United States Code; (ii) satisfies the criteria specified in clauses (iii) through (vii) of subparagraph (A); and (iii) has been determined by a medical doctor approved by the Bureau of Prisons to be— (I) in need of care at a nursing home, intermediate care facility, or assisted living facility, as those terms are defined in section 232 of the National Housing Act ( 12 U.S.C. 1715w )