Going out of work

I'm almost 23 weeks pregnant and I work in a plant. I stand on my feet in steel toe boots for 12 hours. This past week my feet and legs have started swelling so bad it hurts to walk at work i even had to leave early becquee they were so swollen. I just wonder if it's time for me to go out on medical leave till I have my baby girl