As long as they are enrolled in a QHDHP, employees can contribute to an HSA account until they enroll in Medicare. Once enrolled in Medicare, they can use the balance remaining in their HSA but can no longer contribute additional funds to the account. (This applies to spouses also; there are special rules if one spouse enrolls in Medicare before the other does.) Employees also cannot participate in an HSA if enrolled in either TriCare or Medicaid.