Management of pain and unexpected outcomes