Going to see the doctor can bring out the worst in people. Being sick and fitting an appointment into an overcrowded schedule can be stressful. So can a long sit in the colorless cube of a waiting room.

But if you’ve ever given a doctor attitude, next time you might want to think twice — or risk being misdiagnosed.

That’s the implication of two new studies published in the journal BMJ Quality & Safety.Separately, the authors demonstrated that clinicians are more likely to make errors of judgment when they’re treating frustrating and difficult patients.

In the first study, the researchers asked 63 family medicine residents at the Erasmus Medical Center in Rotterdam, Netherlands, to read through one of two versions of six patient cases: One version involved a difficult patient; the other, a patient with an identical health issue but a more neutral attitude. (The “difficult” patients were described as being demanding or aggressive, or even questioning their doctor’s credentials.)

The authors found that even when the medical issues were identical, the doctors provided less accurate diagnoses when faced with disruptive patients. And the effects weren’t small. When the patients’ medical problems were complex, the doctors made 42 percent more mistakes diagnosing difficult patients compared with more agreeable ones. Among simpler cases, they made 6 percent more errors with troublesome patients compared with neutral ones.

In a second study, 74 hospital doctors (also in the Netherlands) were asked to come up with diagnoses for eight clinical vignettes. Again, half involved difficult patients and the other half more agreeable types. Afterward, the doctors were asked for their diagnoses and to recall clinical and behavioral details about the patients.

Here, too, diagnostic accuracy was 20 percent lower for the annoying patients, even though time spent on diagnosis was the same. The doctors also tended to recall more about the behaviors of difficult patients, forgetting their clinical histories.

The researchers suspected physicians’ mental resources are so taxed from thinking about how to deal with tricky patients that their ability to process medical information becomes impaired. “If resource depletion affects simpler, everyday problems,” they wrote, “it is not surprising that these highly complex cognitive processes are impaired if a substantial proportion of mental resources is seized by the confrontation with emotional experiences triggered by patients’ troublesome behaviors.”

An editorial related to the studies pointed out that other research has come to similar conclusions about subpar medical treatment of rude patients, and warned doctors to be aware of the problem. Simple self-reflection might help. For example, “patients with negative behaviors sometimes elicit urges in the physician to interrupt the dialogue, and recognizing this feeling can be a signal to consider a missed diagnosis.”

From the patient perspective, leaving any attitude outside the doctor’s office is probably a good idea, lest you risk being misdiagnosed.