Outpatient diagnosis and therapeutic units linked with ED referrals: a sustainable quality-centered approach