Unplanned readmissions within 30 days of discharge were associated with problems in the quality of care, including inadequate diagnostic workup and diagnostic error.