The conversation between Malcolm, the Doctor and Macduff accomplishes several things. In Act IV, Scene 3, Malcolm and Macduff who have be exiled from Scotland praise King Edward of England, known as "Edward the Confessor". It was believed he had a gift for healing a disease known as "scrofula" which was a tuberculosis of the lymph glands and usually affected children. Edward would touch people afflicted with the disease and many were supposedly healed. Malcolm refers to this when he says,
"A most miraculous work in this good King,Which often, since my here-remain in England, I have seen him do. How he solicits heaven,Himself best knows; but strangely-visited people, All swol'n and ulcerous, pitiful to the eye,The mere despair of surgery, he cures. . ." IV,iii, 164-169
King James, for whom Macbeth was written, revived the practice of the so-called "royal touch." So by complimenting King Edward, Shakespeare is also indirectly complimenting King James. In addition, his words directly condemn Macbeth, who is not a kingly healer, but a kingly killer. Edward cures evil while Macbeth is evil.