context: If you're a woman trying to have a baby, you probably know that there are many parts of your body that have to work just right. Your ovaries need to produce an egg every month, called ovulation, your uterus has to be in good shape, and your fallopian tubes have to be open. If any one of these important parts isn't functioning correctly, you might have trouble getting pregnant. If your fallopian tubes are blocked, sperm won't be able to reach your egg or the fertilized egg won't be able to get into your uterus. Blocked tubes can happen for several different reasons, but no matter the cause, your doctor will diagnose it with a test called a hysterosalpingogram. A hysterosalpingogram ( HSG) is a procedure that uses an X-ray to look at your fallopian tubes and uterus. It usually takes less than 5 minutes and you can go home the same day. Your doctor will probably do the procedure after your period but before you ovulate, since it's less likely you'll be pregnant during this time. This will be during the first half of your cycle, probably between days 1 and 14. Your doctor might tell you to take an over-the-counter pain medication an hour before your HSG. She may also have you take an antibiotic. She'll discuss her recommendations with you beforehand. You'll likely be able to drive yourself home after the procedure, but you might want a friend or loved one to pick you up in case you don't feel well. Your gynecologist will perform the test in her office or clinic. You'll start by lying down on a table under an X-ray imager called a fluoroscope. She'll insert a speculum into your vagina to keep it open, and then clean your cervix. Next she'll insert a thin tube called a cannula into your cervix and gently fill your uterus with a liquid containing iodine. The iodine contrasts with your uterus and fallopian tubes on the X-rays. Finally your doctor will remove the speculum, and will take images with the fluoroscope X-ray. The contrasting liquid will show the outline of your uterus and fallopian tubes and how the fluid moves through them. Your doctor may ask you to move around so she can get side views, and you might feel some cramping. When the images are complete, she will remove the cannula. You might have some vaginal spotting for a few days after the procedure. Cramps, dizziness, and stomach discomfort are possible, as well. HSG is relatively safe, but all procedures have risks. You may have problems if you have an allergic reaction to the dye in the fluid. Pelvic infection or injury to your uterus are also possible. Call your doctor immediately if you have any of the following symptoms: Vaginal discharge that smells unpleasant Fainting Severe pain or cramping in your abdomen Vomiting Heavy vaginal bleeding Fever A radiologist will look at the X-ray images and send a report to your doctor. Your doctor will talk about the results with you and explain if more tests are needed. If the report shows that your fallopian tubes are blocked, you might need a procedure called a laparoscopy. It lets your doctor look directly at the fallopian tubes. She may also recommend in vitro fertilization, or IVF. Your doctor will talk to you about your options and help you make the decision that is best for you.