Association of code status discussion with invasive procedures among advanced-stage cancer and noncancer patients