Pain assessment in the cognitively impaired