Depression and anxiety impair health-related quality of life and are associated with increased costs in general medical inpatients.