For me, I think it's RUDE to walk off a service without saying a brief thank you and good bye. I always thank my attending and residents at the end of the rotation with typical BS. They hear it every month, and you say it every month. But I think saying thanks is industry standard and is considered polite, especially if you see them again in the hospitals.
As for cards, nope. I only send thank you cards to preceptors who don't have academic appointments... like outpatient community preceptors who have private practice who open them up for you to go in and jack up their patients. Personally, I think this is etiquette too, especially since they're not professors and many precept because they think it'd be fun not because their livelihood depends on it.
As for academic profs/residents, I'd only send a thank-you email ONLY if there was real personalized teaching and if I truly enjoyed the service. Everyone else can kiss my @ss. Ain't nothing worse than an insincere thank you when the attending KNOWS they didn't teach you crap and the residents KNOW they made your life worse. I think there's a high threshold for me here. Anything else is just kissing butt. Unnecessary.
As far as A-hole attendings and residents, they get no greeting in the hall from me. When a STUDENT doesn't acknowledge your presence as an attending, I think that's the ULTIMATE insult. Hehehehe... I typically look at my watch or grab my pager as I walk by, just so my own rudeness isn't so obvious (like walking down the halls eyes straight ahead.)
As far as timing, if it's a community preceptor, I'll drop the card on their desk as I'm leaving their office or mail it the following Monday. If I'm emailing, I do it the following Monday. PUH-LEASE. Once it's Friday 5 pm, sayonara. I'm not about to sit around, drawing charts and graphs, looking at horoscopes, trying to figure out when evals have been sent. If you go to my school, by the time evals are sent and you send your thank you card/email, you would have already graduated. And FORGET asking the secretary or the nurse to hand a thank you card to the doc. It may just end up in the trash can for all you know. I mean, if you've ever received a thank you note, you read it and think, "oh that's nice" and move on. No attending or resident is going to sit around, recalculate their evaluations, and get up during grading committee and argue on your behalf because of a thank you note. Give me a break.
And if your attending/resident thinks your brown nosing, who cares? That's THEIR problem, not yours. Did he/she think you were brown nosing when you opened the door for him/her? What about if you slammed the door in his/her face, does that prove that you're an anti-brown noser? Please.
It also depends on your own personality. If you're a nice person in general in and out of the hospital, it wouldn't be out of character to do something like writing an email or dropping a card. But if you're some jack@ss, it would be totally suspicious.
It also depends on how people are at your hospital. I'm in a small town where *normal* people are friendly and you see your attendings and residents at the bar, the restaurant, the grocery store, the movies. Word spreads fast if your a kiss up or an a-hole. Local custom dictates. Politeness counts.
But if you're anonymous like living in NYC: FORGET IT. There, it seems like people want something from someone all the times, and being nice to people is the exception and not the rule. So if I went to school in NYC, I think the attending/resident would consider politeness as "At least this student didn't give us the finger."
Oh yeah, last thing. For the resident who made me wash his car and pick up his dry cleaning, he doesn't get a card. He gets a finger. AND the silent treatment in the halls.