Filing medical bankruptcy or any other bankruptcy will put a negative remark on your credit rating and lower your credit score some.
The negative remarks and bankruptcy even for medical bankruptcy will affect your credit rating and credit score for up to 7 years.
So only file bankruptcy if there's no other choice otherwise you risk damaging your credit score more than it already is.