Federal Tax Lien Act of 1966 granted priority to debts owed the Federal government - thus generally the tax lien would have a priority over the Medicaid lien. See more details and exemptions here - http://www.rsmllp.com/articles/pdf/2003_review.pdf
Please also be aware that the IRS has ten years statute of limitation (starting from the date of assessment) to collect the debt.
Medicaid is the state program - while the federal law requires from states to have a Medicaid recovery programs - that would be a state lien.
Medicare lien is a federal program - so in case of lien - that would be a federal lien, but it is used very rarely - mainly in case of fraud.