So explain to me how this makes their filing for bankruptcy attributed to "medical problems". The real reason the are filing for bankruptcy is because they have student loan debt that they cannot default on. You even said, if it weren't for the student loans they might be able to pay the medical debt.
People don't usually declare bankruptcy for medical related debt until they run out of all other options. Frequently people will pay their medical bills with a credit card and then find they can't pay the credit card down the line. All debts contribute to this problem, but medical expenses because they are usually sudden and large are what usually tip people over the edge. Most people who end up in bankruptcy due to medical costs also have a mortgage or a mortgage and a second that sucks up all their house equity and car loans too. But the issue with non-dischargability of student loans is a bit of a different problem.
Before 2005, student loans were dischargable in bankruptcy and the average student loan load was small compared to today. The people who have these non-dischargable loans are still fairly young and most are in good health. Few have faced large medical bills yet, but that will be coming as these people move into middle age.
I came across this article from Emory Law:
The Non-Dischargeability of Private Student Loans: A Looming Financial Crisis?
This makes the case better than I could. By barring the discharge of student loans in bankruptcy, it encouraged lending institutions to make larger and riskier loans. What it is creating is a backdoor indentured servitide business. Because the lenders knew people couldn't get out of the loans, they do not do the due diligence lenders have normally done to ensure the debtor can pay back the loan and they have, in many cases, loaned out more money than a person can pay back in a lifetime with no way out if life turns against them.
As a result we're going to have a generation in massive debt their entire lives. When they die, a fair number will have overhanging debts. Some of these will be discharged on death, but others will end up being passed on the heirs (loan terms vary). The middle class or this generation may end up leaving almost nothing to the next generation, instead the banks will take everything they made in this life.
Just another way this country is becoming a kleptocracy.