It would, however, be safe to say as a blanket statement that it is legal to fire someone who is on medical leave, AS LONG AS, they have received all of whatever state and federally mandated leave they may have been entitled to. Nothing whatsoever in the law requires an employer to hold a job indefinitely.
Any further information will require additional details of the specific situation.