I have a colleague at my hospital, a physician, psychiatrist no less, who apparently is notorious for texting while in session with patients.
I completely understand having to take an important call or message or page during a meeting with a patient, it happens with me relatively frequently, but I’ll wait until the person finishes their thought and ask them for permission to be polite as possible. If it’s not important I’ll ignore the interruption. If I get a page or high priority IM then I’ll have to stop.
Conversely, I can’t stand when patients whip out their phone to text when I’m trying to have a conversation with them. Especially when it’s something like informing them of extremely important side effects to monitor for like Johnson Syndrome/Toxic Epidermal Necrolysis (a rare but potentially fatal condition where basically your skin falls off). If there’s some crisis by all means excuse yourself, but don’t say nothing and pretend you’re listening to me.