Cognitive impairment, pain, and analgesia