Why aren’t pharmacies automated?

I had to swing by the local pharmacy last weekend to get a prescription. There was no line, so the trip was mercifully short and efficient. But as usual I couldn’t help shake my head at the primitive, labor-intensive nature of the operation: Human beings work behind the counter, tediously putting pills into little orange bottles by hand. The pharmacist gets paid $121,500/yr to “supervise” this pill-pouring and to make sure patients aren’t given combinations of pills that can dangerously interact inside their bodies, even though computer programs that automatically detect such contraindications have existed for many years.

We have self-driving cars and stealth fighters, computing devices improve exponentially in many ways each year, and a billion people have been lifted out of poverty in the last 20 years. Pharmacies, on the other hand, don’t seem to have progressed since the 1980s.

For the life of me, I can’t understand the stagnation. Pharmacies seem ideally suited for automation, and I don’t see why they can’t be replaced with large gumball machines and other off-the-shelf technologies. Just envision the back wall of the pharmacy being covered in a grid of gumball machines, each containing a unique type of pill. Whenever the pharmacy received an order for a prescription, the gumball machine containing the right pills would automatically dispense them down a chute and into an empty prescription bottle. The number and type of pills in the bottle would be confirmed using a camera (the FDA requires all pills to have unique shapes, colors, and imprinted markings), a small scale, and some simple AI visual pattern recognition software to crunch the data. This whole process would be automated. Empty pill bottles would be stored in a detachable rotary clip or something (take inspiration from whatever machines Bayer uses to fill thousands of bottles of aspirin per day). Sticky paper labels would be printed as needed and mechanically attached to the pill bottles.

Every morning, a minimum-wage pharmacy technician would receive boxes of fresh pills from the UPS delivery man and then pour the right pills into the matching gumball machines. Everything would be clearly labeled, but to lower the odds of mistakes even further, the gumball machine globes would have internal cameras and weight scales to scan the pills that were inside of them and to verify the human tech hadn’t mixed things up. (And since the gumball machines would continuously monitor their contents, they’d be able to preemptively order new pills before the old ones ran out.) The pharmacy tech would spend the rest of the day handing pill bottles to customers, verifying customer identities by looking at their photo IDs (especially important for sales of narcotics), and swapping out rotary clips of empty pill bottles. If a customer were unwittingly buying a combination of medications that could harmfully interact inside their body, then the pharmacy computer system would flag the purchase and tell the pharmacy technician to deny them one or other type of pill.

I’m kind of content to stop there, as automating just those tasks would be a huge improvement over the current way of business (one human could do the work currently done by three), but here some more ideas:

  • Confirming a customer’s identity before giving them their pills could also be automated by installing a machine at the front counter that would have a front-facing camera and a slot for inserting a photo ID card. The machine would work like the U.S. Customs’ Automated Passport Control machines, and it would use facial recognition algorithms to compare the customer’s face with the face shot on their photo ID. I’ve used the APC machines during overseas trips and never had a problem.
  • The act of physically handing prescription bottles to customers could also be automated with glorified vending machine technology, or a conveyor belt, or a robot grabber arm.
  • Eighty percent of pharmacy customers are repeat buyers who are already in the computer system and are just picking up a fresh bottle of pills because the old bottle was exhausted. There’s no need for small talk, questions, or verbal information from the pharmacist about this prescription they’ve been taking for months or years. That being true, the level of automation I’ve described would leave pharmacists with a lot of time to twiddle their thumbs during the intervals between the other 20% of customers who need special help (e.g. – first-time customer and not in the patient database, have questions about medications or side effects). Having a pharmacist inside every pharmacy would no longer be financially justified, and instead each pharmacy could install telepresence kiosks (i.e. – a station with a TV, sound speakers, a front-facing camera, and a microphone) through which customers could talk to pharmacists at remote locations. With this technology, one pharmacist could manage multiple pharmacies and keep themselves busy.
An Automated Passport Control machine in use

As far as I can tell, the only recent advances in the pharmacy/pill selling business model have been 1) the sale of prescriptions through the mail and 2) the ability to order refills via phone or Internet. If you choose to physically go into a pharmacy, the experience is the same as it was when I was a kid.

Is there a good reason it has to be the way it is now? I suspect the current business model persists thanks to:

  1. Political lobbying from pharmacists who want to protect their own jobs and salaries from automation (see “The Logic of Collective Action”).
  2. Unfounded fears among laypeople and politicians that automated pharmacies would make mistakes and kill granny by giving her the wrong pills. The best counterargument is to point out that pharmacies staffed by humans also routinely make those same errors. Pharmacists will also probably chime in here to make some vague claim that it’s more safe for them to interact with customers than to just have a pharmacy tech or robot arm hand them the pills at the counter.
  3. Fears that automated pharmacies will provide worse customer service. Again, 80% of the time, there’s no need for human interaction since the customer is just refilling a prescription they’ve been using for a long time, so “customer service” doesn’t enter into the equation. It’s entirely plausible that a pharmacist could satisfy the remaining 20% of customer needs through telepresence just as well as he or she would on-site.
  4. High up-front costs of pharmacy machines. OK, I have no experience building pharmacy robots, but my own observations about the state of technology (including simple tech like gumball machines) convince me that there’s no reason these machines should be more expensive than paying for human labor. Even if we assume that each gumball machine costs an exorbitant $1,000, you could still buy 121 of them for the same amount a typical pharmacist would make in a year, and each gumball machine would last for years before breaking. It’s possible that pharmacy machines are unaffordable right now thanks to patents, which is a problem time will soon solve.

Well, at the end of my pharmacy visit, I decided to just ask the pharmacist about this. She said she knew of pharmacy robots, and thought they were put to good use in hospital pharmacies and military bases, but they weren’t suited to small retail pharmacies like hers because they were too expensive and took up too much physical space. I would have talked to her longer, but there was a long line of impatient people behind me waiting to be handed their pill bottles.

Will future technology make the sexes equal?

Much is made in the media about the prevalence of sexism and sex-based inequality in the world. In the long run, won’t technology close whatever gaps there are and solve these problems? Consider:

  • Job automation will eliminate the gender pay gap. Today, men make more money than women in almost every type of occupation. However, if machines end up taking over 100% of all gainful jobs (“gainful” = someone else is willing to pay for the product of your labor; so volunteer jobs are excluded), then all humans will be earning $0 and there will be no gender pay gap.
  • Job automation will also eliminate the gender labor force participation rate gap and gender unemployment rate gap. Today, men are overall more likely to work outside the home, but they’re also more likely to be unemployed. Again, since no humans will have gainful jobs in the future,  this disparity will vanish.
  • Robot labor will eliminate the gender household chore gap. Tasks like washing laundry and cooking food generally fall harder on women in households, but if each house has a robot servant, none of the humans have to do anything, and this gap also disappears. Robot servants could also act as babysitters and free up time for their parents (though I’d imagine they’d have little real need for this since they wouldn’t have real jobs anymore), which would benefit women more since they also shoulder a heavier share of looking after their children than men do.
  • If there is any educational gap* in the future, it will become much less significant because level of education will no longer parlay to a job or salary. High school graduates will earn the same as particle physics Ph.D’s: Nothing. And without boring but high-paying STEM jobs to look forward to, more men might pursue degrees in the Humanities, which today are dominated by females. (*Arguably, the educational gap has already closed in the U.S. and women are, by some metrics, the more educated sex.)
  • The gender wealth gap would also fade away over time thanks to estates being divided up among multiple heirs who couldn’t expand their fortunes since the whole economy would be controlled by machines. For example, let’s say Gramps builds up a net worth of $1 million and then dies in the year 2100, which is the same year the human unemployment rate finally hits 100% and machines have taken over all gainful jobs. Gramps’ fortune is divided equally among his wife (Granny) and three adult children (Alan, Belinda, and Chuck). None of them have jobs, so the money is a (temporary) Godsend. Granny uses her $250k for medical and nursing home expenses, and all her doctors and aides are machines, so the money effectively flows out of human control. Granny spends a little each year until she dies with close to $0 left. Alan wastes his $250k on frivolous stuff like fancy restaurant meals and gambling within three years, and again, all the workers at the establishments he goes to are machines. Belinda uses her money to buy a more expensive house, which effectively “locks in” her $250k as home equity and a permanent net worth increase, but she finds it impossible to get any richer than that since neither she nor her husband can get paying jobs. Machines do everything important, and all they can do is collect welfare, spend time with their kids, pursue hobbies, and take free online courses (taught either by machines or human volunteers). Belinda and her husband eventually spend most of their money on medical bills, and when they die, the amount of money they pass to their kids is much less than what they got from Gramps. Chuck uses his $250k to finally indulge his lifelong dream to start a bar/restaurant. He has a perfect business plan, a menu crafted by professional chefs, a prime location, very tasteful decor, and top-of-the-line robot chefs and waiters. Food critics give “Chuck’s Bar” rave reviews, as do average patrons on platforms like Yelp. However, Chuck has a problem: One block away, there’s an identical bar/restaurant, but instead of being owned by a human, it’s owned by an intelligent robot named “RoboChuck.” Because RoboChuck is a machine, he isn’t materialistic, doesn’t need to sleep or take breaks, is cool with using a small closet in his restaurant for a residence instead of buying a house, and is fine working 24/7 for a $10,000 yearly salary. As a result, “RoboChuck’s” has lower overhead costs and can sell the exact same food and drinks as “Chuck’s” at lower prices.  No matter how hard Chuck works, he can’t make up for his inherent inferiority to RoboChuck, nor can he find a way to ameliorate the extra costs that he personally inflicts on his business. Because of the price difference, customers gradually drift away to RoboChuck’s. In spite of his talent, dedication, and seemingly perfect business plan, Chuck’s bar/restaurant goes bankrupt after a few years, and he loses all $250k of his inheritance with it. His landlord and all of his creditors are machines. After that, Chuck bitterly grasps the reality of the new economy and takes up watercolor painting in his government-provided apartment. In an economy where machines do all the real work, human net worth invariably goes to $0, unless backstopped by some government-mandated wealth redistribution (i.e. – machine earnings are taxed and given to humans as welfare payments). Net worth inequalities between human males and females would disappear.