Dr. House
If we are talking about Sherlock Holmes and lovable doctors, it is impossible not to talk about Gregory House. The main character of Dr. House is directly inspired by the 19th-century detective, but with a couple of twists.
House treats his patients as if they were little challenges for him to solve, which makes people around him not like him as much. However, his detachment from everyone else (combined with his intelligence) is what makes him such a good doctor.