Impact of cardiac- and noncardiac-related conditions on adverse outcomes in patients hospitalized with acute myocardial infarction