Ouch, that is not a good scenario to be in, and rather specific too. Such rare medical questioning; however, is not really something I would ask here. Even if someone has gone through such an event, even a single year can change the outcome of what will happen. The best place you can go for advice concerning this is your Command Career Councilor. They can answer each question you have to the detail you will need, or they will find your answer.
I will tell you this; there were two EMs that had medical issues that got them reassigned on my boat. Both were treated fairly, and they left with no hard feelings and no bad consequences. I would imagine that you will be treated the same. The Navy, though often staunch in it's punishment of wrong doers, is a government machine. The current climate of the government is one of political correctness. That means that you will not get mistreated for color, creed, gender, religion, blah, blah, blah... +medical condition.
Some people here can give you some quick advice and some old Usta-Was-the-Way stories, just like the one I've given above, but only the Command Career Councilor and other Navy resources will have the real gouge.
Good luck and keep us posted.