Adaptation to illness in relation to pain perceived by patients after surgery