Unlike what many programmers like to think, programming is not a skilled work on the level of surgery. And besides, many doctors probably would benefit their patients by having AI assist in their work. This has already been experimentally shown for e.g. medical imaging diagnosis.