Need Some Advice Please!

Me

So I started a new job on March 29th and recently found out I’m a little over 4 weeks pregnant. I’ve had to call out already today and yesterday from cramping and nausea. Just some background info, I work a Monday-Friday 8-5 job in an office. My doctors office of course has the same hours. I have a history of miscarriage and have already been to the ER (yesterday) for the cramping so of course the told me to follow up with my OB. I made an appointment to see them April 30th at 4pm. So I would need to leave work just a few hours early to make it to my appointment. Being that I’m new and have already missed 2 days I’m extremely nervous to have to ask to leave a few hours early for a doctors appointment. Should I talk to my boss about it and tell him I am pregnant and that’s why I’ve been sick and that I have to see my OB and will need to leave early? I just hate that I’m so new and this is happening. I don’t want to lose my job but I know I need to see the doctor. Has anyone else been in a similar situation? I really wanted to wait until I was farther along to tell ANYONE but I feel like it would be the safest option for both keeping my job and being able to make it to my appointment if I just tell my boss tomorrow when I return to work. Any advice would be helpful and greatly appreciated!