menstrual care product means a tampon, pad, liner, cup, sponge, or similar product used by individuals with respect to menstruation or other genital-tract secretions. . (b) Effective date The amendment made by this section shall apply to taxable years ending after the date of the enactment of this Act. 7. Allowance of distributions for prescription and over-the-counter medicines and drugs and other medically necessary items (a) HSAs Paragraph (2) of section 223(c) of the Internal Revenue Code of 1986, as redesignated by the preceding provisions of this Act, is amended by adding at the end the following: (C) Prescription and over-the-counter medicines and drugs and other medically necessary items For purposes of this paragraph— (i) In general The term qualified medical expenses shall include an amount paid for any prescription or over-the-counter medicine or drug and medically necessary items. (ii) Medically necessary items The term medically necessary item means any item for which a doctor or nurse certifies by a letter of medical necessity that the service or medication or item is for a medical diagnosis, treatment, or prevention of a medical diseases or condition. . (b) Effective date The amendment made by subsection (a) shall apply to amounts paid in taxable years ending after the date of the enactment of this Act. 8. Special rule for certain medical expenses incurred before establishment of account (a) In general Paragraph (2) of section 223(c) of the Internal Revenue Code of 1986, as redesignated by the preceding sections of this Act, is amended by adding at the end the following new subparagraph: (D) Certain medical expenses incurred before establishment of account treated as qualified An expense shall not fail to be treated as a qualified medical expense solely because such expense was incurred before the establishment of the health savings account if such expense was incurred— (i) during either— (I) the taxable year in which the health savings account was established, or (II) the preceding taxable year,