Cox (from Scrubs), Becker (from Becker) and House (from, uh, House) all, sort of, fit the above description. But they are different in rather interesting ways. Cox and Becker, for instance, are much more functional than House and not just because of his leg. They have a greater ability to interact with others and, in Cox's case, are much more medically fallible.
In fact, Cox is the most realistic of the three. He is a very good doctor but, as far as I know (I've just started watching the show), not a genius. Becker isn't a genius either, but Becker sets himself apart by willingly staying in the Bronx when he could, with his credentials, make more money elsewhere.
Like the other two, Cox is aware of his own personality flaws (in the episode last night--these are reruns--he tells Newbie, "You want to be me? I don't even want to be me.") Unlike Becker, who isn't always aware of his effect on others, Cox--like House--can deliberately changed his behavior to produce an outcome, such as the episode where he provokes Kelso into taking back rounds--for Kelso's own good.
And Cox has an ex-wife girlfriend and a son and an intern who adores him.
Becker does eventually get a decent girlfriend--played by the very talented Nancy Travis. Like Cox, his personality, while not entirely environmentally induced, is strongly influenced by past unhappiness: multiple divorces, a bad childhood (that's Cox), etc. I'm not saying the writers use that material as an excuse for Cox and Becker's behavior, but it is important to understand their backgrounds in terms of the distinction between Becker & Cox and House.
With House, the producers (who I am now going to refer to as David Shore since Shore is the only one I know [from Due South, another great show]) are doing something rather difficult. House really isn't supposed to be a doctor with a heart of gold. House is really supposed to be a jerk. A complicated jerk but a jerk. The environmental complications--his leg, his lost girlfriend--do not fully explain him. I realize "The Jerk" was supposed to elucidate this, but I thought it was much better elucidated in the episode with the carpet stain. Yes, House plays games, but Shore wanted to make it clear, through that episode, that there's a real part to this guy that can't stand inconsistencies in his environment. It isn't supposed to be this weird thing that House goes through every now and again. It is supposed to BE House. All the stuff he does and says isn't a "front" or bad temper or a coping mechanism or disillusionment (which Cox, for example, portrays very well) but the guy himself. (Although House does have a stinky dad.)
And once you accept that basically House is NOT someone you would really want to spend time with, it gets a lot easier to spend time with him. He manipulates and plays games with people NOT because secretly he is trying to help them be better people (yuck) but because he really can't stand not to know why people do what they do. Other people create chaos, and he doesn't want chaos even though he believes in chaos. He MUST dig out Wilson's secrets. He MUST find out what is wrong with his patients. He MUST know.
Which makes him difficult to be around but a great diagnostician.
What makes all three of the doctors interesting to watch is that all three of them act the role of "fool"--not "fool" in the Ben Stiller sense but fool in the old Shakespearean/King Lear sense. They say things other people don't admit/want to hear. (I must include Cox's ex-wife girlfriend here, especially the episode where she keeps trying out lines like, "I'm not wholly myself when Cox isn't with me" and then saying, "No, it doesn't sound like me, does it?")
Now, I've got a big dose of Jane Austen in me--I believe in appropriate conversation for appropriate venues, but that didn't stop Jane Austen skewering people in her letters to Cassandra. It doesn't really work for effective day-to-day living; it is much better to accept other people's fallibilities and forgive and all that.
But it makes GREAT television.