One of the specializations listed for Cybertechnology skill is "headware" as well as "repair", and an implanted commlink is described in, priced with, and in the subsection of headware. Now if the implanted commlink weren't implanted at the time I could see a hardware check. But once it is incorporated into the body of a person, either it comes out for a hardware check, or a Cybertechnology check for it to have not been removed from the persons head as it will be a piece of cyberware until it is no longer biologically attached. That's how it's been in the groups I've played with, anyway. Now, Medicine is precluded from repairing or maintaining implanted devices, but it is required for implanting or removing them. Given the utter lack of specificity in nearly every other area of rules, it is what you make it, play it how you like. All I can do here is discuss why I play this situation the way that I do.
TL;DR hardware after medicine to remove, or Cybertechnology to skip the surgery at my table.