The lousiest doctor I ever visited had a memorable waiting room. Everything—every pen, pencil, clipboard, clock, name tag—trumpeted the name of a big pharmaceutical company.

Not once did I sit there without seeing a stream of drug reps file through, roller bags rolling behind, to be greeted warmly and whisked behind closed doors.

I stuck with Dr. No until the day I’d secured the morning’s earliest appointment but still waited two hours, with my tantrum-prone toddler and debilitating stomach pain. As I was led back to the dim examination room, I passed Dr. No chatting with a flock of those smartly dressed, ruthlessly attractive drug reps.

When he finally deigned to see me, my son was yowling like a feral pig. What I remember from that three-minute “exam” was his opening line, which came across as, "Can you shut him up?" It was then I decided: I need a new doctor. Here’s what I learned about how to do it.

Step 1: Narrow your search

A variety of forces may drive us to seek a new physician. We move; we marry; we reproduce; we divorce. We change jobs; we turn 26; our employers change—or drop—insurance plans; our doctors leave our networks; our networks leave our doctors; doctors retire; we turn 66.

How to start the search? Googling can accomplish only so much. To get a provider who also gets you—whose services align with your budget and insurance—requires some effort.

First, save yourself a lot of trouble by knowing what your insurance does and doesn’t allow, so you can minimize costs and get the most bang out of your benefits with someone who’s in your network. Out-of-network providers often mean hefty out-of-pocket fees.

Next, consult online sources that can give you real patient reviews, board certifications and licenses, and accepted insurance types for individual physicians. Services vary per site, but start with the American Medical Association’s DoctorFinder, angieslist.com, Castle Connolly, ratemds.com, and vitals.com.

Once you’ve assembled a list of names, double-check that they really are in-network with a follow-up call to your insurance—it may seem redundant, but relationships change quickly. For extra guidance, use your social network, says Alan Reisinger, M.D., a primary care physician in Baltimore. Personal recommendations are the gold standard for finding a good doc, he says. “Find out who your friends and family go to. Ask, ‘Do you like them? Do they spend time with you? Do they listen? Are they available?’”

In medical school, Reisinger was taught three attributes doctors need to succeed: availability, affability, and ability, in that order. “But if I were looking for a doctor, it would be the other way around,” he says. “I’d want somebody who’s clinically excellent, then has a good bedside manner, then is available.”

Step 2: Do a deep dive

Once you have a physician in mind, conduct some more thorough professional snooping. Make sure he has a license in good standing by checking with your state’s licensing board, and that he’s board-certified in his area of specialty. (The AMA’s DoctorFinder should also have that info.)

What about malpractice? Find out what, if any, disciplinary actions have been taken against him, and his current licensing status, starting with the Federation of State Medical Boards, which can provide information on felonies, misdemeanors, pending lawsuits, and other issues.

Though, even if you do find a malpractice charge that needn’t always be a deal breaker. Lawsuits are common: About 5% of physicians face malpractice claims every year, a 2010 American Medical Association study reported. Yet only about a fifth of those cases lead to a patient payout; the rest are dismissed. So, one suit? Maybe OK. Multiple suits? You probably want to move on to someone else.

Step 3: Keep your eyes peeled

On your first trip to a new doc, pay attention to how you’re treated from the get-go: Is the staff friendly? How long must you wait? Also, take a close look around. Is the waiting room clean? Super-crowded? Ready to riot?

And watch for signs of those telltale pharmaceutical giveaways—are they everywhere? It sounds minor, but it really can affect your care. Providers may scoff at the notion that their treatment might be swayed by swag, but it happens.

In just a year and a half, big pharma paid doctors 
a whopping $6 billion to push pricier brand-name drugs.

Last year, an investigation by nonprofit organization ProPublica found that physicians who got money from drug and device companies were more likely to prescribe expensive brand-name treatments even when cheaper but equally effective generics were available.

In other words, you may pay more because of your provider’s relationship with drug companies. According to ProPublica, more than 800,000 providers received pharma money, totaling more than $6 billion, between August 2013 and December 2015. Find out if yours was on the list by going to projects.propublica.org.

Step 4: Let the doc audition for the part

So now you’re face-to-face with your possible new physician—watch for clues to who he really is and how he’ll treat you as a patient. Take it from a doctor who once had to fire his own doctor: These things matter. Eric Holmboe, M.D., a board-certified internist at Chicago’s Accreditation Council for Graduate Medical Education and a doctor-patient communication researcher, says he once let his own primary care guy go because of poor communication skills.

“He wasn’t willing to work with me and was dismissive of my questions,” Holmboe says. “I was trying to be a good patient, but I realized this wasn’t a good fit.”

Step 5: Be a good patient

Found someone you like? Keep that relationship strong by being the best patient you can be. We’re assuming you aren’t abusive or threatening, and don’t skip appointments, fail to follow treatment plans, or avoid paying your bill.

But there are proactive measures you can take to help your doctor provide the best possible care:

  • Be active and engaged. Prepare questions in advance and don’t hesitate to ask them.
  • Be clear about what you need. The franker you are about what you want, the more likely you are to get your needs met.
  • Be patient enough to establish trust. Don’t be afraid to bring up a test you read about online, but be open if your doctor says you don’t need it—and feel free to ask why. And if you’re prescribed a test you’re not clear about, ask about that, too. Maintain an honest dialogue and confidence will build.