HSG (Hystero-Salpingo-Gram) is a radiological procedure, which is aimed at establishing if the fallopian tubes are open. It involves pushing in a contrast medium through the cervix and X-rays are taken. It also assesses the cavity of uterus and identifies any obvious problems. This procedure can be uncomfortable but not painful.
Taking a biopsy from the uterus (womb) is quite commonly performed procedure. It is commonly known as D & C. It does not have any significant side effects. Very occasionally there can be injury to your uterus while dilating (opening) the cervix. This is however, rare. This procedure needs to be done under anaesthesia and therefore not painful.