Pain management before and during surgery