In contrast, dyskinesia of the sphincter of Oddi is a purely functional disorder, wherein there is intermittent obstruction of the bile duct due to inappropriate spasms. The reasons for dyskinesia of the sphincter of Oddi are not completely understood, but believed to be due to alteration in local gut hormones and peptides, such as cholecystokinin, which act on the sphincter or to altered neuronal control of the sphincter. For diagnosis, measures of liver biochemistry and pancreatic enzymes are performed. Along with ruling out structural abnormalities, normally by performing an abdominal ultrasound and endoscopic retrograde cholangiopancreatography (ERCP). Measurements of bile transit when performing ERCP are taken to help evaluate different treatment options. Sphincter of Oddi dysfunction is best diagnosed using manometry-an internal test done to measure the pressures within surrounding ducts to determine whether or not the muscle is functioning normally. Medication (to prevent spasms) or Sphincterotomy (surgical procedure to cut the muscle) are the standard treatments for sphincter of Oddi dysfunction. One or the other may be better based on the classification of the condition.