Capitation is one approach to solving that problem.
http://en.wikipedia.org/wiki/Capitation_%28healthcare%29
Unfortunately the times frames are still fairly short because patients often move around. So even when doctors are compensated through a capitation system, there isn't enough incentive to encourage patients to make healthy lifestyle choices that will only pay off many years in the future.