An obstetric ultrasound is performed to diagnose intrauterine or ectopic pregnancies and confirm the pregnancy's viability. This procedure uses sound waves to generate real-time images of the uterus and developing fetus. Depending on the pregnancy stage, a transducer is placed on the abdomen or inserted vaginally. The transducer emits sound waves that reflect off the pelvic structures, producing images displayed on a monitor.