As an athlete you get hurt and it effects your playing ability drastically, I think you should do whats right for you. If the Doctor says continuing to play could only hurt your body more than I would think staying off the field would be the smartest thing you could do.
A lot of people don't realize how difficult it is to be an NFL player. The average player lasts less than three years, gets a rookie contract and spends the rest of their life working a menial job. Harvin likely worked his entire life to reach the NFL, and if it costs him his hip, so be it. The man deserves to get paid and some degree of glory, especially as the Bills have a shot to reach the playoffs this year.
Even though he suffers from a chronic hip injury, Harvin should take advantage of this opportunity to resign with the Bills. Of course he risks further injuring his hip or aggravating his injury, but he will probably see limited action and earn enough to ensure that he never has to work again if he chooses. His football career has a limited lifespan, so he should exploit it for as long as he can and earn as much from it as he can at this point.
Even if his comeback is short-lived, he will still be able to earn the money that he signed for in a short period of time. That money will help him and help his family. When you play professional sports, it is a business. It's important that they be able to make decisions that are good for them. He got a good deal.