Filing bankruptcy should only be done as a last resort when you've exhausted all your other options of paying back any debt including medical bill debt.
Filing bankruptcy even for medical bills will put a big dent on your credit report and credit score and the bankruptcy will stay on and affect your credit score and credit rating for up to 7 years.
The fee for Filing for bankruptcy depends on what chapter of bankruptcy you're filing for.
To file chapter 7 bankruptcy the fee is $335.00 and to file for Chapter 13 bankruptcy the fee is $310.00 plus another $15.00 to $20.00 for a Bankruptcy Trustee fee.