The doctors set up a web of companies to extract profits as tax-exempt dividends rather than taxable salaries.