Yes. AI can group a pharmacy's near miss entries into themes such as look-alike drug names, labelling slips or interruptions at the counter, provided you remove names, prescription numbers and staff initials first. It finds patterns; people decide what they mean. Check the counts yourself, then review the themes as a team.
The reason this works is dull but important: a log of 60 short free-text lines is hard to read as a whole, and the person who wrote half of them is usually too close to see the repeats. A model reads all 60 in seconds and lists what keeps coming up. What it cannot do is judge clinical significance, decide who is at fault or replace your responsible pharmacist's review. Everything below is built around that split.
What counts as a near miss, and why the log is worth reading
A near miss is a slip caught before it reaches the patient: the wrong strength picked from the shelf and spotted at the final check, a label with the wrong dose wording noticed by the pharmacist, a bag about to be handed over with a similar surname on it. Many pharmacies record these on a paper sheet or a shared spreadsheet and then never look at them again, because the monthly total is the only number anyone reads.
The total tells you little. Fourteen entries in a month might be one problem repeated fourteen times, or fourteen unrelated slips. Only the pattern tells you whether to move a shelf, change a label template or protect a quiet half hour from phone calls. That is the job AI is good at: reading everything without getting bored, and grouping similar descriptions even when they are worded differently.
If you also use AI elsewhere in the pharmacy, keep this review separate from clinical work. The tutorial on pharmacy tasks you should never hand to AI sets out where that boundary sits. A pattern review of your own de-identified log is on the safe side of it. Checking a prescription is not.

The Complete Excel Course with AI Integration
From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude — hands-on from the first lesson.
By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner
Buy nowA log layout that AI can read and people will fill in
The layout matters more than the tool. If entries are written differently each time ("wrong one picked", "oops strength") the model has little to work with and neither do you. A short, fixed set of fields keeps entries quick to write and easy to group. Aim for a row a busy dispenser can complete in under a minute.
| Field | What goes in it | Why it helps the pattern search |
|---|---|---|
| Week | Week commencing, not the exact date | Shows trends without tying an entry to one person's shift |
| Time period | Opening hour, mid-morning, lunch, afternoon, close | Reveals busy-period clusters |
| Stage caught | Receipt, labelling, picking, accuracy check, hand-out | Tells you which safety net actually caught it |
| Type of slip | Pick from a short list: wrong drug, wrong strength, wrong form, wrong quantity, label error, wrong patient, other | Gives the model and your pivot table a clean category |
| Caught by (role) | Dispenser, checker, pharmacist, patient | Roles only, never names |
| What happened | One or two plain sentences, no patient details | The raw material for theme grouping |
| Possible contributing factor | Interruption, look-alike packaging, handwriting, short staffing, new stock layout, other | Moves the review from "who" to "what conditions" |
Notice what is missing: no patient name, no date of birth, no prescription number and no initials of the person who slipped. Those do not help the pattern work, and leaving them out of the log from the start is easier than scrubbing them later. If your existing log already contains them, the next section covers the cleaning.
Stripping identifiers before anything leaves your system
Do this in the spreadsheet, not in the chat window. Make a copy of the log, delete the columns you do not need and replace anything identifying in the free-text column. A five-minute pass for a quarter's worth of entries is realistic.
- Copy the sheet. Work on the copy so the original stays intact for your records.
- Delete the identifying columns. Patient name, prescription number, staff initials, exact date.
- Search the free text. Use find-and-replace for surnames, first names and initials you know appear. Then read the text column once by eye, because people sometimes write "Mrs T's" or "John from the care home".
- Swap place and organisation names for generic terms. "Care home" is fine; the home's actual name is not.
- Add an entry number. A simple 1, 2, 3 lets you trace a theme back to the original entry in your private copy.
The entry number does the important work here. When the AI says "entries 7, 19 and 33 describe a pick from the wrong shelf location", you can open the original log, read the full story and talk to the people involved without that detail ever having left your system.
If you want a second pair of eyes on the cleaning, the checklist in patient data and AI: a confidentiality checklist for small practices covers what to look for before pasting anything. Use a business or workspace plan whose terms say content is not used for model training; ChatGPT Business and Claude Team both say so on their pricing pages (checked November 2026), and both start at two seats, at $20 a seat a month billed annually or $25 monthly. Whatever plan you choose, paste the cleaned copy only, and do not use a personal free account for this.
Six weeks, 48 entries: one pharmacy's first theme table
Take an illustrative independent pharmacy with four dispensing staff and one responsible pharmacist. Over six weeks the team logged 48 near misses using the layout above. The owner expected "just general busyness" and was ready to spend the review time reminding everyone to concentrate. Instead, she pasted the cleaned 48 rows into a business-plan chat with the prompt below.
You are helping a community pharmacy review its near miss log in a
blame-free way. The entries below are de-identified. Do not guess
or mention anyone's identity and do not assign fault to people.
Task:
1. Group the entries into 4 to 7 themes based on the process
conditions that made the slip possible, not on who made it.
2. For each theme give: a short name, the entry numbers in it,
a count, and one sentence describing the common conditions.
3. List any entries that do not fit a theme, with their numbers.
4. Flag any theme where entries cluster in one time period or
one process stage.
5. Do not suggest clinical actions. Suggest only process
questions the team could discuss.
Entries (number | week | time period | stage caught | type |
caught by | what happened | contributing factor):
[paste cleaned rows here]
The illustrative output, trimmed to the points that mattered, looked like this.
| Theme the AI proposed | Entries | Count | Condition it described |
|---|---|---|---|
| Look-alike names picked from adjacent shelf slots | 3, 7, 12, 19, 22, 28, 33, 41 | 8 | Two similarly named products stored side by side in the same bay |
| Label wording errors on repeat items | 5, 9, 16, 24, 30, 37 | 6 | Directions edited from a previous label and carried over |
| Slips during phone or counter interruptions | 2, 8, 14, 20, 26, 29, 35, 39, 44, 47 | 10 | Entry made or check done while the dispenser was called away |
| Quantity mismatches on split packs | 6, 13, 21, 38 | 4 | Part-pack counted by eye rather than counted off |
| Similar patient surnames at hand-out | 10, 17, 32, 45 | 4 | Two bags with near-identical surnames on the same shelf |
| Did not fit a theme | 1, 4, 11, 15, 18, 23, 25, 27, 31, 34, 36, 40, 42, 43, 46, 48 | 16 | Mixed, one-off items |
The theme counts add up to 32 entries, with 16 unplaced. That is the number the owner checked first, and the arithmetic is the first thing to verify every time: 8 + 6 + 10 + 4 + 4 = 32, and 32 + 16 = 48. Had the totals not matched the log, she would have asked the model to redo the grouping. The next section covers why this check is not optional.
Checking the AI's counts before you trust a theme
Language models are good at grouping and unreliable at counting. A theme described as "10 entries" might really be 9 or 11, and an entry number can be listed under the wrong theme. So verify before the meeting, not during it.
- Add a Theme column. In your cleaned copy, type or paste the AI's theme next to each entry number.
- Count with a formula. A pivot table or a simple
COUNTIFper theme gives the true figure. The guide on cleaning messy data covers the spreadsheet side if this is unfamiliar. - Read three entries per theme. If the descriptions do not honestly belong together, the theme is wrong, however confident the AI sounded.
- Re-run once with different wording. Ask for the same task in a fresh chat. Themes that appear both times are stable; themes that appear only once are suspect.
In the pharmacy example, the second run split the interruption theme into separate phone and counter groups and moved entry 27 into the split-pack group. The owner read the lines behind both changes. The phone and counter entries described the same condition, a check abandoned part-way, so she kept one interruption theme. Entry 27 turned out to be a whole-pack quantity slip, so it stayed unplaced. Her decisions rested on the entries themselves, not on which run sounded more confident.
Prompt habits that keep the review about conditions, not people
Models mirror the framing you give them. Ask "who made the most errors?" and some will happily try to infer it. Ask about conditions and you get conditions. Three habits do most of the work.
Say what you do not want
State plainly that the model must not identify individuals, infer who made a slip or assess performance. It costs a sentence and sets the tone for every answer that follows.
Ask for conditions, not causes
"Cause" invites the model to pick a culprit. "Conditions that made this slip possible" invites shelf layout, workload and interruptions. Compare a weak and a better question on the same entries.
| Weak framing | Better framing | What changes in the answer |
|---|---|---|
| What went wrong most often and who needs retraining? | What conditions appear most often when slips were caught? | The first drifts towards individuals; the second returns shelf, timing and workload |
| Rank the entries by how bad they were. | Which themes would be worth a team discussion first, given how often they appear? | Avoids the model making a clinical severity call it is not qualified to make |
| Why do we keep making the same mistake? | List process questions the team could ask about this theme. | Produces discussion questions rather than a verdict |
Ask for questions, not fixes
The model will happily propose fixes, and some are good. But a fix chosen by the team sticks better than one handed down by a chatbot. Ask it for discussion questions per theme and take the fixes from the room. A second illustrative output, for the look-alike theme: "Are the two products ever picked in the same hour? Does the shelf label show strength in large type? Does the picking screen show a product image? When the pharmacist checks, does the label make the difference obvious?" A team can answer those in three minutes.
Running the team review in thirty minutes
The meeting is where the value is made. The model supplies a map; the team supplies knowledge of the shop floor. Keep it short, regular and safe to speak in.
- Open with the rule (2 minutes). "We are looking at conditions, not people. Nothing said here is used in a performance conversation."
- Show the theme table (3 minutes). One slide or one printed page, with counts you have verified.
- Pick the top two themes (5 minutes). Choose by count and by whether they cluster at a particular time or stage.
- Ask the discussion questions (15 minutes). Invite the people closest to the task first. A dispenser who stands at that shelf all day knows why two items get confused.
- Agree one small change per theme (5 minutes). Write down who will do it and by when.
Run it monthly. In a small shop that means a lunchtime slot with sandwiches, not a formal committee. The responsible pharmacist should be in the room and should sign off any change that touches the dispensing process; the AI has no role after the theme table.
Turning themes into small, checkable changes
A theme only matters if something changes. Here are four illustrative actions from the example, each tied to its theme and each with a way to check whether it worked.
| Theme | Small change the team chose | How they will know it worked |
|---|---|---|
| Look-alike names on adjacent shelf slots (8) | Move one of the pair to a different bay and add a coloured shelf marker to both | Count of that theme in the next six weeks |
| Label wording carried over on repeats (6) | Clear the directions field before editing a repeat label; the pharmacist reads the directions aloud at the check | Label-wording entries drop; no new "carried over" descriptions |
| Interruptions during entry or checking (10) | A "do not disturb" tray for items being checked, and a second person takes phone calls from 11:30 to 13:00 | Fewer entries marked "interruption" in the lunch period |
| Split-pack quantity mismatches (4) | Part-packs counted off on a counting tray and the count written on the pack | Zero split-pack entries over two review cycles |
Notice the third change: it is about the shop's workload, not anyone's concentration. That is the practical payoff of the blame-free framing. The owner would not have reached that fix by telling the team to focus.
Re-running after eight weeks to see if themes moved
After two review cycles, repeat the process on the new entries and compare. The simplest comparison is a small before-and-after table in the same spreadsheet.
| Theme | Weeks 1 to 6 | Weeks 7 to 14 | Note |
|---|---|---|---|
| Look-alike names | 8 | 3 | Shelf move applied in week 8 |
| Label wording | 6 | 5 | Little change; revisit the process |
| Interruptions | 10 | 7 | Fewer at lunch; afternoon slips remain |
| Split packs | 4 | 0 | Counting tray adopted |
The two periods are not the same length (six weeks against eight), so compare per week as well as totals: 8 in 6 weeks is about 1.3 a week, and 3 in 8 weeks is about 0.4. Be modest about what a small sample proves. A drop from 8 to 3 is encouraging; it is not a study. A rise in logging is also a good sign in its own right, because a team that feels safe writes more things down. If total entries rise while themes shrink, the culture is probably improving.
When a name slips through or the log goes quiet
Each of these is realistic, and each has a way of showing itself early.
- A name slips through. A free-text line says "Sam picked the wrong tray." The model repeats it in its summary. Fix: search the cleaned copy for every first name on the team before pasting, and add "never repeat names" to the prompt. If a name did go out, delete the chat and note it in your own incident record.
- The model invents a theme. It describes "fatigue at end of shift" when no entry says so. Fix: insist on entry numbers per theme and read three entries from each; a theme without supporting entries is dropped.
- The log goes quiet. After the first review, staff fear the meetings and stop logging. The count falls, and the pharmacy looks safer than it is. Fix: open every review by thanking people for logging, and never use the log in appraisals.
- The theme table becomes the decision. Someone treats "10 interruption entries" as proof that the phone is the problem. Fix: it is a starting question for the room. The responsible pharmacist decides, using the full original entries.
Other pharmacies, other shapes of log
The same method suits different set-ups. A pharmacy with a busy delivery service might add a stage for bagging and van loading. A site with an automated dispensing robot would log a separate theme for loading errors. A small compounding bench would want its own log with its own contributing factors. In each, the rule is the same: fixed fields, de-identified text, counts you verify, a conditions-based discussion.
When a theme leads to a changed routine, write the change into your procedures; writing pharmacy SOPs with AI covers how. And for teams that want shared habits for using AI safely day to day, the two-session training plan pairs well with this monthly review.
What to keep on file so the review stands up later
A pattern review is only useful if you can show what you did. Keep three things in a folder you control: the cleaned copy that went to the AI, the theme table you verified, and the one-page action list from the meeting with the person who owned each change. A short note of the date, the plan type used and who attended is enough. If an inspector, insurer or locum later asks how you learn from near misses, that folder answers it in a minute.
None of this replaces your professional obligations. Reporting duties, your responsible pharmacist's judgement and any serious-incident process stay exactly as they were. The AI step is an addition at the pattern stage, nothing more. Setting up the cleaning step and the first review with someone alongside is one of the jobs my AI implementation consultation covers.
Questions pharmacy owners ask before trying this
Which fields should a near miss log keep?
Keep the week, time period, stage of the process where the slip was caught, the type of slip, who caught it by role, a short free-text description and any contributing factor. Drop patient names, dates of birth, addresses, prescription numbers and the initials of whoever made the slip.
Is it safe to paste the log into a chatbot?
Only after de-identification, and only into a business or workspace plan whose terms say your content is not used for training. Even then, paste the cleaned copy, never the raw log. If your professional body or insurer has rules on reporting tools, follow those first.
How many entries do I need before AI is worth using?
As a rough guide, 30 to 40 entries give enough material for themes to appear. Below that, a pen, a highlighter and ten minutes at a team huddle will find the same patterns faster. AI earns its place once you have a quarter or more of entries.
Can AI tell me who is making the mistakes?
It should not be asked to. Remove staff identifiers before anything leaves your system and tell the model to describe processes, never people. Individual performance is a separate conversation that belongs with the responsible pharmacist, away from a pattern review.
What if the AI finds a theme that looks serious?
Treat it as a prompt to read the original entries and involve the responsible pharmacist. A theme is a lead, not a finding. Reporting duties and clinical decisions stay with qualified people under your own governance procedures.
Further reads
- Best Pharmacy Dispensing Software: Does Any of It Have Real AI? — Check whether your dispensing system already offers error analysis.
- AI Agents for Pharmacies: Phone, Chat or Refill Requests First? — Fewer phone interruptions is one lever on the interruption theme.
- AI for Pharmacies: The First 90 Days for an Independent Owner — Where a near miss review fits in a first quarter of AI use.
- Pharmacy Staff Training: Induction Packs for Counter Staff With AI — Turn repeated near miss themes into induction material for new staff.
- AI Software for a Community Pharmacy: Patient Reminders and Delivery Rounds — Delivery rounds create their own near miss stage worth logging.
- AI Incident Response Plan for Small Businesses (With Template) — A template for when an AI tool itself causes a problem.
- How to Set Up Human Review for AI Work Without Slowing Down — The same named-reviewer discipline applied to other AI tasks.
- Best AI App for a Construction Company: Logging Near Misses — Five ways to log near misses from site, compared on photo capture, voice notes and corrective-action follow-up, with a two-week trial plan.
- How to Use AI in a Community Pharmacy: Front Counter and Back Office — Where AI earns its place in a community pharmacy: counter queries, services promotion, rotas and SOP drafts, with a hard line around dispensing.
- AI Tools and AI Development: The Complete 2026 Guide — the AI hub, including every tutorial in the AI-for-business series.
Sources: ChatGPT Business pricing page (openai.com) and Claude pricing page (claude.com), both checked 4 November 2026, for seat prices, two-seat minimums and no training on business content by default. Professional standards for incident reporting differ by body, so check yours.