Pain-clinic referral

When is it appropriate to refer patients to a pain clinic?