Refine diagnosis group tree.