Deductions & credits

@yomero your comment at the end references a different situation.

Regarding an HSA, you can use HSA funds to pay for qualified care that is provided after the HSA is opened.  If the HSA does not have enough funds to pay the bill all at once, it is allowed that you can contribute money to the HSA and then withdraw it the next day to either pay the care bill or reimburse yourself.  In effect, "washing" the money through the account to get the tax savings.

Supposing you paid the provider in full out of pocket; you can contribute money to the HSA and immediately withdraw it to reimburse yourself.  If you pay on time, you can make the payments by depositing money into your HSA, withdraw it back to your checking account, and then use it to pay the bill.  However, you can't pay INTEREST this way, you can only withdraw from the HSA up to the amount of the original qualified medical expense.  And of course, you are also limited by whatever annual HSA contribution limit applies to your situation.  

The "double dipping" comment refers to the issue of taking an itemized tax deduction for medical expenses on schedule A.  You can't get two tax breaks for the same expense -- you can't take a tax deduction for the amount you paid out of pocket, and also get reimbursed from an HSA.  

For example, suppose you opened an HSA in 2016, and you had a $5000 medical expense in 2017, paid all out of pocket.  Because it was paid out of pocket, you take the itemized deduction for medical expenses.  Then in 2018, you realize that you could reimburse yourself by depositing $5000 in the HSA and then immediately withdrawing it, to get a tax deduction.  Because you previously reported the expense as a tax deduction (and that's not allowed if you get reimbursed from the HSA) you have to make a correction for the deduction.  Many people never actually take the medical expense deduction because of the 7.5% floor on the deduction, so this likely doesn't apply to you.