Pharmacist Alanna Humphrey is swimming against the tide.

At a time when corporate chains are buying up independent drugstores and a handful of pharmaceutical companies rule the health care landscape, Humphrey is making custom medications and trying to build a business doctor by doctor.

"We hope this is the direction medicine is going," said Humphrey, who bought the compounding pharmacy from CVS Health last summer with her husband, Jason, and changed its name to Mix Pharmacy.

Located in an unassuming office park in Oakdale, Humphrey and her team of two other pharmacists and six lab technicians handcraft about 80 prescriptions a day for patients in Minnesota and Wisconsin who often turn to them as a last resort.

"By the time they come to us, patients or their doctors have tried a lot of things and they're not getting better," Humphrey said.

The staff at Mix Pharmacy can make gummies to help children take medicine or make capsules with almond oil for those with peanut allergies. They can create prescription-strength pain creams for people who don't want to take pills or work with veterinarians to disguise drugs with pet-friendly flavors.

Compounding pharmacies like Mix account for fewer than 3 percent of the nation's prescriptions, according to one industry measure. By law, they use only existing, federally approved drugs. And patients often need to pay for the drugs out of pocket.

"For patients who need it, there isn't another option because there isn't another product," said Kyle Skiermont, chief operating officer for Fairview Pharmacy Services, which, like most hospital systems, operates its own compounding pharmacy. "There's always going to be the need for it, and there are less and less compounding pharmacies in the marketplace. It's expensive to do it, and reimbursements from insurers are low."

Growth in the $9 billion compounding industry has been slow, expanding less than 3 percent over the past five years, according to IBISWorld.

But an aging population has increased demand for all prescriptions. Humphrey is betting that specialty pharmacy operations like hers, whose lineage can be traced back to two family-owned pharmacies started in 1909 and 1929, are on the cusp of a resurgence.

Until 1939, all pharmacies did compounding work. CVS and Walgreens still offer basic compounding services, such as combining medications into a single capsule or removing allergens. Today, operations like Mix Pharmacy that specialize in compounding make up 13 percent of the 56,000 community-based pharmacies in the United States, according to the American Pharmacists Association.

In Minnesota, there are about half-dozen compounding pharmacies, nearly all in the Twin Cities.

At Mix Pharmacy, Humphrey focuses on running the lab while her husband, a senior product manager at Boston Scientific, handles the business side. She began working at the pharmacy, then known as Moudry Rx-Compounding, in 2011 while still at the University of Minnesota. Dan Moudry sold the business to the Merwin family in September 2015, and CVS purchased it six months later. . The couple declined to provide financial information on the business. But they said prescriptions are growing, and they have added staff since closing on the purchase in July.

Their goal is to emphasize personal service and to spread the word about the kind of services Mix can provide. Mix has a dedicated space for consultations with patients and holds seminars that often bring together health care providers. Humphrey also visits clinics to talk about her lab.

Mix has worked with oncologists, pediatricians, OB-GYNs, chiropractors and functional medicine doctors.

"We'll work with any kind of provider to help them prescribe what the patient needs," Humphrey said.

With mounting concern about opioid use and addiction, patients and doctors are seeking more options. Humphrey's 98-year-old grandmother now uses a custom pain cream for her arthritis instead of prescription Vicodin pills. It's just as effective and doesn't have the side effects, she said.

There's also growing interest in bioidentical hormones, where pharmacists work with physicians to create customized mixtures to address menopause symptoms or other hormonal issues.

Mix also has helped simplify medication regimens for autistic children by combining medications into a single capsule. It has removed dyes, fillers and other allergens. The pharmacists also have worked with health care providers to tailor dosage based on a patient's weight.

"We can make it easier for patients to remember to take their medicine," Humphrey said. "That's a help for providers, because once patients leave their office, they don't know if they take one pill or they take them all."

Heidi Fay-Thompson turned to a compounding pharmacy when her 2-year-old daughter had pneumonia. She tried hiding the medicine or forcing it down and every method failed. A veterinarian, Fay-Thompson had used compounding pharmacies in her practice. She asked her daughter's pediatrician whether they could try it for her daughter.

"I didn't know it was an option," Fay-Thompson said.

Mix Pharmacy added a little raspberry flavoring, and the medicine went right down.

"There was no point in giving my daughter something from Walgreens," she said. "I'd rather use compounding. It was easier to get into her and be compliant."

Jackie Crosby • 612-673-7335