Pap Smear and Ultrasound at 4 weeks and 5 days?

Gabriela • First time mom. 23. Due 06.26.17
Anyone else have a Pap smear and ultrasound at 4 weeks and 5 days? 
I had to have one because I'm afraid of an STD and they wanted to rule out ectopic pregnancy. Was this safe to have done so early? I'm just worried it might cause a miscarriage or something I'm so sore.