Study shows how to limit hospital referrals