A genetic test designed to help find the right medicine for patients with mental illness is now available at all 37 Acme pharmacies in Southeastern Pennsylvania.

The test, which involves sending a cheek swab to the lab of test-maker Genomind in King of Prussia, is aimed at patients who have tried multiple medications for depression, anxiety, or other mental illnesses without success.

Such tests have been available for several years, made by Genomind and a handful of other companies, but traditionally they are conducted in a doctor’s office. The reason for making the service available in pharmacies is that a pharmacist may be more aware that a patient is struggling to find the right treatment if prescriptions have come in from multiple physicians, said Genomind chief executive officer Shawn Patrick O’Brien.

Acme began offering the tests at two locations in 2018 on a pilot basis, along with 26 of its sister pharmacies in Idaho and Illinois, all of which are part of Albertsons Cos. With the addition of 35 locations in Pennsylvania in December and more in the other two states, the genetic tests now are offered in 59 pharmacies.

A patient must obtain a prescription to undergo such a test, but participating pharmacists can broach the subject, pursuing the evaluation with the agreement of patient and physician.

Patients with mental illness often try several medications before finding the best approach, and some never find an effective treatment. That is partly because those with certain genetic variations can have higher- or lower-than-normal ability to metabolize a given drug, skewing the drug’s efficacy or raising the risk of side effects.

The idea behind the genetic tests, which are covered by some insurers but can require out-of-pocket costs of $100 to $300, is to reduce trial and error. Studies suggests they can help — up to a point.

Most of the evidence comes from research sponsored by the test-makers, and in most cases it is not randomized. That means patients who underwent the testing did so by choice, and thus any improvement in their symptoms might be partly because they were more primed to seek recovery.

But a randomized trial of one such test, similar to Genomind’s but made by a competitor, showed promise this year. On average, symptoms were no better in patients who underwent the test than in those who did not. But in a subset of patients with treatment-resistant depression, those who got the test fared significantly better, the study found.

Lex Denysenko, assistant professor of psychiatry at Thomas Jefferson University, agreed that such tests can help identify the right treatment more quickly. But he said that along with identifying genetic variants that can affect a patient’s ability to metabolize certain drugs, such tests identify other genes that are so far of limited clinical value. Some of these genes purport to help physicians determine which type of mental illness a patient has, but the science is fairly preliminary, he said.

“It does require a very astute physician to understand what these results mean,” Denysenko said. “There are no absolutes.”

Along with guiding patients more quickly to the best treatment, the tests may also reduce costs to the health-care system by preventing emergency-room visits, some studies suggest.

Debi Strunk-Ross, patient care services manager at Acme Markets, said about 10 patients had undergone the test during the two-store pilot phase of the program that began in 2018. The expansion will allow pharmacists to help many more people, she said. Some may have tried one medication from a psychiatrist and another from a primary-care physician, and each doctors does not necessarily know what the other has prescribed, she said.

“We as pharmacists see this firsthand,” she said. “We see that they’re trying different medications. They’re talking to us about their side effects.”

A pharmacist takes the patient’s cheek swab in a consultation room or a part of the store that is curtained off for privacy, then sends the sample to Genomind. Results are sent to the physician and pharmacist within three days. If indicated, a physician may then suggest a different medication.