I do believe that’s illegal
https://www.newyorkcitydiscriminationlawyer.com/can-i-be-fired-or-refused-a-job-because-of-a-health-condition.html
Keep in mind, this is NYC, but I do believe termination of employment due to a medical condition that can be reasonably accommodated is illegal federally.
In the case of Rhode Island health care workers who refused or could not due to allergy to a component or immune suppression accept the flu vaccine, wearing a mask around their patients was the reasonable accommodation.
Those who refuse COVID 19 vaccine due to personal or health reasons, if not offered wearing a mask as a reasonable accommodation, could claim illegal termination due to medical conditions.
No one asks for autoimmune disorders like M S or a cancer diagnosis. They shouldn’t be further penalized by being told they’re fired if reasonable accommodation (mask or job which doesn’t put them in close contact with patients) can be made.