Factors associated with long-term mortality in acute pancreatitis