She is not being fired because she was hospitalized. She is being fired because her FMLA has expired and she is not yet able to come back to work.
Yes, that is legal. Once FMLA has expired, if the employer is still unable to return to work the employer is legally able to terminate their employment, regardless of the legitimacy of a need for additional medical leave.
The law has to balance the needs of the employee with the needs of the employer to have someone doing the work. They have chosen to create that balance by allowing 12 weeks of leave. On week 13, day 1, there is no longer any protection for the employee and the employer may terminate. Not all employers do, but the ones who do, do so legally.
The only exception would be if there is either a state law or a legally binding contract which expressly extends the job protection beyond the 12 weeks of FMLA.