Diagnosis and treatment of functional constipation