Finding a primary care doctor is simpler than it used to be, thanks to on-demand services like ZocDoc, SimplyBook, and Doodle. But matching up with a clinician who’s compatible with your (or your family’s) personality is another story.

Researchers at Wright State University, University of California, Davis, and Universidade Nova de Lisboa think artificial intelligence (AI) has a role to play. In a new paper (“A Hybrid Recommender System for Patient-Doctor Matchmaking in Primary Care“), they¬†propose a recommender system they claim makes primary care providers “more directly accessible” by improving patient-doctor matches.

“Given that trust in patient-doctor relationships plays a central role in improving patients’ health outcomes and satisfaction with their care, it would be preferable to match patients with family doctors that they are willing to consult with high trust,” they wrote. “[Our¬†approach] generate[s] personalized doctor recommendations for each patient that they may trust the most.”

In designing the algorithm, the team considered factors that have been shown to affect patients’ trust and confidence in primary care doctors — particularly demographic characteristics and “psychosocial” elements such as a “sense of being taken seriously” and “being involved in decisions.”

They then sourced data from a private health care provider and clinical network in Portugal that serves over 2.5 million patients a year. With a database of 42 million interactions between patients and doctors (“interactions” defined here as episodes that included a set of services provided to treat a clinical condition) between 2012 and 2017, plus basic demographic information (gender, age, residence, etc.), doctor registration data, and a complementary dataset describing hospital inpatient procedures in hand, they set about training the system.

It didn’t treat all patients the same. Instead, it matched new patients only by their demographic profile, while existing patients who’d been to visit clinicians were subjected to a modified “hybrid” recommendation that took into account metadata such as interactions, demographics, and behavior.

Because a system designed to perform matchmaking across different use cases wouldn’t scale particularly well, the team trained it to learn “latent representations” — combinations of their characteristics — for patients and doctors from interactions. This allowed it to infer the preferences of new patients from similar patients.

The resulting AI was able to match over 80 percent of patients with relevant primary care doctors compared to the baseline’s 37 percent. In the future, the researchers plan to deploy it into a digital health system to gather patients’ preference and evaluate the recommendations in controlled trials.

“Continuity of care and familiarity helps doctors better understand their patients’ needs and helps patients act preventatively and live healthier lives, thus reinforcing the strength of the relationship,” they wrote. “The underlying logic is simple: patients who trust their doctors are more likely to follow their advice and develop long-lasting relationships with them.”