We examine provider and patient behavior in a dynamic model where effort is noncontractible, competition between providers is modeled in an explicit way and where patients' outside options are solved for in equilibrium. Physicians are characterized by an individual-specific ethical constraint which allows for unobserved heterogeneity. This introduces uncertainty in the patient's expected treatment if he were to leave his current physician to seek care elsewhere. We also introduce switching costs and uncertainty in the treatment–outcome relationship. Our model generates equilibria with treatment heterogeneity, unstable physician–patient relationships, and overtreatment (a form of defensive medicine).