Optimal quality, waits and charges in health insurance