How AI Checks a Medicine Image in a Dispensing Workflow

Distinguish an image identifier, a barcode check and a pharmacist’s final verification of a dispensed item.

A pharmacy technician checks a unit-dose packet by a dispensing carousel.
A robot can retrieve an item while a separate image check asks whether its appearance matches the expected product.

A dispensing robot can retrieve a package from a known location. An AI model can perform a different check by comparing an image with labeled examples of medicines. An alert about a look-alike item matters only if the pharmacy can trace which item, order and verification decision it concerned.

What was actually photographed?

One study tested an image classifier on 65,274 photographs covering 345 US National Drug Code classes. The images showed piles of tablets or capsules in prescription bottles. Similar colors, shapes and imprints contributed to mistakes. The paper measures recognition in that setup. Sealed hospital unit-dose packs, glare on foil and different suppliers need separate validation. Evaluation of image classification for prescription medicines

A metal dispensing head sits above a tray of small round objects.
An image label refers to a visible item under specified capture conditions.

An uncertain result needs a path to a pharmacist

Measure how many images the system can read, how many it sends for review and how often an independent check finds a mismatch. Keep unreadable images in the denominator. A successful barcode scan says the encoded identifier was read. It is a different observation from visual agreement or the appropriateness of the prescription.

A futuristic-looking device with a glowing red rectangle at its center.
A system needs a way to leave an uncertain item unidentified.

Counting detections and preventing harm

Link any discrepancy with the original order, the item inspected, the pharmacist’s disposition and the eventual handover. A discrepancy intercepted during dispensing is one outcome. A medication error reaching a patient is another. Performance on a photo collection alone cannot quantify either rate in another institution.

A robotic arm examines a holographic display in a futuristic laboratory.
Compare an order with its original verified record.

Try it with the evidence

Audit a pharmacy review queue

Source notes. Fictional quality audit of 1,000 dispensing events. An image system flags 40 for review. Independent verification of all events finds 8 actual mismatches among the flags and 2 among the unflagged items. The remaining events match.

Prompt. Calculate the flagged share, proportion of flags confirmed and proportion of mismatches found. How many unflagged mismatches could an alert-only audit discover?

Check your reading

The system flags 4% of events. Of the flags, 8/40, or 20%, are confirmed. It finds 8/10, or 80%, of mismatches. Reviewing flags alone cannot discover the two missed events.

Illustrated field notes

Recognizing and verifying the item
A futuristic medical facility with a large screen displaying vital signs data.
Count missed mismatches alongside correctly flagged items.
A futuristic, high-tech device with a cylindrical shape and glowing blue lines.
A chart and a package image provide different checks.
A futuristic scene featuring a humanoid robot analyzing data on a large screen.
A visual comparison cannot determine an individual dose.
A dramatic scene where a spray bottle is spraying glitter onto three pills on a reflective surface.
Appearance alone cannot establish a medicine’s authenticity.
A machine with a large metal component and wires/cables is in motion.
Include unfamiliar packages and poor-quality images in testing.
A complex prescription handling machine with multiple rows of small, cylindrical containers filled with various colored liquids.
Ambiguous orders require clarification through the dispensing process.
A cartoon-style illustration of a female doctor sitting at her desk, surrounded by various objects and symbols related to healthcare.
Transcribed order text needs an independent verification step.
An illuminated lens and other equipment on a dark surface.
A suspicious record is an input for review.
Pharmacy workflow and outcomes
A large display screen in an office or similar environment showing a cityscape at night.
Inventory records provide context for which packages might be present.
A person stands in front of a large screen displaying various graphs and charts, analyzing business or financial performance data.
A review queue should preserve the item and the reason for referral.
A large, curved surface covered in colorful pills and capsules.
Counting avoided waste requires records of actual disposal.
A robotic arm with a drill is engaged in drilling into a metal surface in an industrial setting.
Equipment downtime belongs in an operational evaluation.
A pharmacy counter with various products and equipment on display.
Sending a reminder does not confirm that someone received a refill.
A futuristic office or laboratory setting with a large screen displaying graphs and charts related to insurance and authorization checks.
An insurer’s authorization and a medicine’s identity are distinct facts.
A pharmacist interacts with a customer using technology.
Keep the pharmacist’s correction with the original proposed label.
A warehouse or storage facility with rows of shelves stocked with boxes and containers.
An unattended interval still needs a defined exception pathway.
A cylindrical object crossed by bands of colored light.
A later package redesign can change recognition performance.