Pregnancy Discrimination Question

I'm in a pretty big predicament with my employer and I'm curious as to whether I am being legally discriminated against for being pregnant. I'm 18 weeks pregnant and live in Pennsylvania. I just started at my new job about a month ago. They were aware that I was pregnant when I was hired. In fact during the interview my boss told me that I could flex my time if I needed to attend appointments or if I needed an extra hour of sleep. My schedule is during normal business hours (Monday to Friday, 9 to 5). Unfortunately, all the OBGYNs in the area that I live in only offer those hours as well. Earlier this week I spoke with my boss and asked her if I could flex my time two weeks from now for my ultrasound and she informed me that I'm not allowed to flex my hours until after I've finished my 6 month probationary period (which she did not mention during my interview). To make matters worse my due date is two and a half weeks before the probationary period ends. My boss told me I "better hope I don't go into labor before then." I've tried finding another OB that offers evening and/or weekend hours and the only one I was able to find is an hour and 45 minutes away from where I live. Yesterday I ended up having to leave work because I started vomiting up blood and was instructed by my current OB to go to the ER. I called my boss (who didn't answer her cell phone) to let her know I had to leave due to an emergency and ended up having to leave a voicemail. First thing this morning my boss gives me a write up for "leaving without permission" and claims that I technically abandoned my job. I immediately gave her documentation and she refused to take it. I emailed the HR department and was told that since I am an "at will" employee, discrimination laws do not apply for my situation. My boss also told them that I used my pregnancy as an "excuse" for leaving without permission. I'm so frustrated because no woman should ever have to choose between her pregnancy and her job!