Hello,
Sounds like a mess, and Im sorry for the condition your in, but its not the end of the world and you can get these back on track. Ok, credit cards are pretty important, and Im glad you have the funds to pay them. Talk to the credit card company, let them know of your situation, and just ask them if you pay the accounts, will they KEEP your accounts open, and in good standing. Most of the credit card companies want your business to continue, especially if you make good with them. The collection departments just want to do their job and make commission on the collection amount. IF the credit card companies agree to keep your account open, then you still can keep your account history with them(thats important). Over time of keeping those accounts current, you'll be ok.
Medical Bills-- always a last priority. Future creditors overlook Med1 bills, and usually, if you wait until they right off the debt, you can dispute the item with the CRA and they will remove it anyway. Don't worry about the med bills, they can scare you, but make sure they are last on your list.
I hope this helps, and if you have any questions, please feel free to ask, I visit this site frequently.