How did Chillingworth become Dimmsdale's medical adviser?
Roger Chillingworth sought Dimmesdale out, under the pretense of becoming a friend and general life adviser. Since Chillingworth is a very smart man, and he scoped out the town before making his place in it, he knows that Dimmesdale is the father of Hester's illegitimate child. Seeing this as the best possible way of punishing Hester, further than she's all ready been punished by wearing the scarlet "A" and being made an outcast, is to harm the man she loves. So, Chillingworth begins poisoning Dimmesdale under the pretense of healing him, thus establishing himself as Dimmesdale's friend AND medical adviser.