Some hospitals will gain income and some will lose millions under a provision in the recently approved state budget that taxes hospital income and redistributes the money. But how exactly each hospital is affected remains uncertain because the formula for the tax keeps changing. So far, there have been five different versions of the formula, with a new version expected any day. The most recent version of the formula is based on a flat tax of 4.6%. Under it, the state's hospitals would pay a total of about $330 million in taxes. Hospitals would then be reimbursed a certain amount, based mainly on the percentage of Medicaid patients they served. The amount paid to hospitals would be matched at 50 cents on the dollar by federal funds. The state's hospitals would get a net gain of about $32 million, but not all institutions would make back what they pay in taxes. Meanwhile, the state would gain about $150 million in federal funds that it can put toward budget deficit reduction.