A scan is necessary to confirm gallstones. Most commonly, an ultrasound is performed. Stones may also be detected on CT scan or MRI of the abdomen. In addition, your doctor will also do a blood test to rule out any obstruction of the bile ducts.