Healthcare AI agent · Pharmacy
Medication-Reconciliation & Pharmacy-Verification AI Agent
Assemble a medication history from every source, compare it against the current order set and hand a pharmacist a ranked, sourced discrepancy list — with verification, dosing and sign-off left where they belong.
- Typical delivery
- 4–6 weeks
- Deployment
- Your stack
- Verification
- Pharmacist
- After launch
- Agent Care
What this agent does
Assembles the history, not the decision
In
- 01
Assemble the history from the patient or carer interview, dispensing and claims records and external record exchange.
- 02
Read the current order set, the allergy record and the problem list from the chart.
Reason
- 03
Match each entry to one ingredient, strength, form, route and frequency, keeping the wording each source used.
- 04
Line the assembled history up against the current order set and mark every place the two differ.
- 05
Run the client's allergy, interaction and duplicate-therapy checks and carry each result back with tool and version.
Decide
- 06
Rank what a pharmacist should look at first, with high-alert medications never ranked down.
- 07
Hold anything thin, contradictory or unattributable off the list and route it to be chased.
Out
- 08
Present a discrepancy list where every line shows the order, each source's version and when that source was recorded.
- 09
Retain the sources read, the matches made, the ranking applied and every resolution a pharmacist records.
Product statement
The agent assembles, compares and presents. It does not decide what a patient should be taking — verification, interaction clearance, dosing and sign-off stay with a pharmacist or prescriber.
Example workflow
One reconciliation, end to end
- 1Reconciliation triggeredAdmission, transfer, discharge or a clinic visit on the client's own trigger list
- 2Sources assembledInterview capture, dispensing and claims records, external records, prior admissions and the current chart
- 3Entries matchedIngredient, strength, form, route and frequency, with each source's own wording kept beside the match
- 4Compared with the order setEvery difference marked, carrying the sources that disagree and the date each one was recorded
No human action required
Stages 1 to 4 run without a person in the loop — assembly, matching and comparison finish before a pharmacist opens anything. Nothing is verified in that stretch, on either path.
Enters the pharmacist's worklist, ranked and sourced.
Held off the list until someone chases the source.
Pharmacy technician
Calls the community pharmacy, the carer or the prescriber, records where the answer came from and puts the line back.
Chase the source · Confirm · Add to the list
Sourced — handed back
- 6List handed to pharmacyWritten to the reconciliation worksheet only where write access and policy allow; nothing on it is verified
- 7Outcome evaluatedDiscrepancy recall against a pharmacist's own reconciliation, false discrepancies, high-alert recall and time to resolution
Resolutions
How the pharmacist resolves each line is counted in the evaluation.
What should not run autonomously
Human approval stays in control
Outside the boundary — human approval required
8 items
- Verifying a medication order.
- Clearing or dismissing an interaction alert.
- Recommending or adjusting a dose.
- Deciding which source is right when two disagree.
Automation boundary
Agent acts unaided
- ✓Assemble the history from the client's approved sources, in their agreed order.
- ✓Match every entry to one ingredient, strength, form, route and frequency.
- ✓Compare the assembled history against the current order set and mark the differences.
- ✓Rank what a pharmacist reads first and attach the sources to every line.
Write actions run only inside the approval boundaries agreed during implementation. Verifying an order is not one of them.
- Stopping, starting or changing a medication.
- Adding or removing an allergy or intolerance.
- Signing the reconciled medication list.
- Changing source precedence, matching or ranking rules.
Example output
One discrepancy, annotated
Everything the agent surfaces stays attached to the sources it was read from.
Reconciliation output · single discrepancy
Illustrative example- Patient says
- Half a tablet at night
- Order set says
- Warfarin 5 mg daily
- Last dispensed
- 5 mg, 41 days ago
- Surfaced as
- Three sources disagree
- Confidence
- 88%
- Resolved by
- Pharmacist, not the agent
As received
The order as written, the patient's own words and the dispensing record, kept apart — the agent does not merge three doses into one number.
Evidence used
- Order set, this admission
- Carer interview, verbatim
- Dispensing record, 41 days
Why it is on the list
Three sources give three answers and none matches the order. The agent shows all three, dated, not one.
What the score decides
Confidence says how sure the agent is that this is one drug and not two — not whether the dose is right.
Action
ResolvePharmacist verifiesQuery the prescriberValue
Where AI adds value
The same four claims, placed at the point in the workflow where each one applies.
Where the value lands
Value 01 – 04
Every medication line
From the interview, the chart and outside records
Apply the client's own sources and rules
Use the approved source list, precedence rules, matching tables and high-alert list already agreed with pharmacy.
Take the assembly off the pharmacist
The history arrives already gathered, matched and lined up against the order set, so the work starts at a comparison rather than a phone call.
Give pharmacy a list worth reading
Ranked, sourced differences reach the worklist instead of a flat page of alerts that gets skimmed.
Build an evidence trail
Retain each source read, the match made, the ranking applied, the confidence and the pharmacist's resolution — on both paths.
Integrations
Typical integrations
Five system groups connect to the same agent. Which of them are in scope is decided in discovery.
EHR, orders & ADT
- Epic
- Oracle Health
- athenahealth
- MEDITECH
- order, allergy and ADT feeds
Pharmacy systems
- Pharmacy system
- verification queue
- Outpatient dispensing
- retail links
Medication history
- Surescripts history
- PBM claims
- Fill records
- state PDMP
Agent
Medication reconciliation & verification
- Assembles sources
- Compares and ranks
- Hands to pharmacy
External records & drug data
- HIE query
- record exchange
- C-CDA import
- Drug knowledge base
- RxNorm
Observability & evaluation
- OpenTelemetry
- Langfuse
- Supported monitoring/evaluation sources
Integration availability depends on the client's existing systems and API access.
Agent controls
Six layers between the model and the order set
Each control wraps the one inside it. A discrepancy clears every layer before a pharmacist reads it, and verification sits outside all six.
L6 · Outermost — last line of defence
Inward → L1 · closest to the model
- L1 – L2
- Decide whether a line may be stated at all
- L3
- Decides what a pharmacist reads first
- L4 – L5
- Keep verification with a person and the trail intact
- L6
- Pulls automation back when signals degrade
How Nestack evaluates it
Evaluate the whole reconciliation — not only the list at the end.
Coverage runs the whole depth of the workflow, and every layer is cut by slice.
Surface — the discrepancy list a pharmacist opens
- E1Discrepancy recallDid the list match a pharmacist's own reconciliation of the same patient?
- E2False-discrepancy rateHow many surfaced lines turned out not to be differences at all?
- E3Source attributionDoes every line name the source and date it was actually read from?
- E4High-alert recallWas every anticoagulant, insulin and opioid difference surfaced?
- E5Slice evaluationHow does completeness change across specific patient cohorts?
- E6Time to resolutionHow long did pharmacy take to work the list and close it out?
Floor — the reconciled list a prescriber signs
Failure modes
Where each failure originates in the agent
Seven failure modes plotted against the five stages of the agent lifecycle.
Agent lifecycle
Direction of processing →
01 · Source assembly
2 modes
- MR-01
Discontinued drug kept
A drug stopped months ago still reads as current.
- MR-02
Allergy not carried across
An intolerance held elsewhere never reaches the list.
Stage gathers
Interview, dispensing, external records and prior stays
02 · Matching
2 modes
- MR-03
Strength or form mismatch
5 mg and 5 mg/mL, or ER and IR, are matched as one.
- MR-04
Two names, one drug
Brand and generic unmatched, so one drug reads as two.
Stage matches
Ingredient, strength, form, route and frequency
03 · Comparison
1 mode
- MR-05
Fill beats the patient
A dispensing record is treated as the dose actually taken.
Stage compares
The assembled history against the current order set
04 · Handoff / write
1 mode
- MR-06
Buried in volume
Low-value lines bury the anticoagulant discrepancy.
Stage presents
The ranked list a pharmacist actually works from
05 · Change / Version
1 mode
- MR-07
Silent source-rule change
Which source wins changes, and nobody approved it.
Stage tracks
Model, prompt, source rules and knowledge changes
- Sev-1 · the agent settled what a pharmacist should
- Sev-2 · the list is wrong, a drug missing
- Sev-3 · the list is noisy, real lines skimmed
Affected slices
The hardest histories carry most of the misses
Aggregate completeness can look acceptable while a small number of patient cohorts carry most of the missed medications and most of the pharmacist rework. Nestack reports performance by slice, not only in total.
Slice performance — reported separately, not only in aggregate
Illustrative example| Slice | Failure rate | Lift | Lift vs. threshold | Status |
|---|---|---|---|---|
| Patients using several pharmacies | 5.8% | 3.6× | Review | |
| Non-English medication interviews | 4.4% | 2.8× | Review | |
| No external record available | 3.1% | 1.9× | Watch | |
| Routine elective admissions | 1.0% | 0.6× | Normal |
Bar: lift vs. elective-admission baseline · scale 0–4.0× · tick marks the 2.0× review threshold
2 of 4 slices over threshold
Evidence-linked improvement
One missed drug should change how the next history is built
A missed medication is not closed when a pharmacist fixes it on the day. It changes which source is trusted, how the drug is matched, or what is ranked first.
Improvement cycle · five stages
Switchback — the path turns at Improve and returns at Learn
- 01
Detect
Discrepancy recall or the false-discrepancy rate moves in a cohort.
- 02
Diagnose
Traced to a source, the drug match, the comparison rule or the ranking.
- 03
Improve
The source, matching table or ranking rule is re-approved by pharmacy and version-linked.
- 04
Verify
Re-run against held-out reconciliations from the affected cohort, including the ones that failed.
- 05
Learn
That patient becomes a regression case and the changed rule enters the pharmacy runbook.
Learn → Detect
The return edge. Which source wins is a pharmacy decision — it is signed off before it ships, not after.
Typical build scope
Twelve workstreams across six weeks
The build scope read against the delivery timeline. Week structure follows the six-week plan — discovery, sources and matching, comparison, evaluation, integration, then production validation and handover.
Workstream
Week 1Week 2Week 3Week 4Week 5Week 6
- 01Workflow discovery and automation-boundary definition.Week 1
- 02EHR, pharmacy and history-source API review.Week 1, Week 2
- 03Approved source list and precedence rules, signed by pharmacy.Week 1, Week 2
- 04Interview capture on the agreed channels.Week 2
- 05Ingredient, strength and form matching.Week 2, Week 3
- 06Dispensing, claims and external records.Week 3
- 07Comparison against the current order set.Week 3, Week 4
- 08High-alert list, ranking and volume controls.Week 4
- 09Recall against pharmacist reconciliations.Week 4, Week 5
- 10Pharmacist worklist and resolution workflow.Week 5
- 11Reconciliation write-back and audit logging.Week 5, Week 6
- 12Observability, deployment and Agent Care handover.Week 6
12 workstreams · 6 weeks · bar shows the weeks a workstream is active — several run in parallel
Final scope and sequence confirmed in discovery
Engagement tiers
What each tier includes
Rows are the capabilities named in each tier's scope. Higher tiers include everything below them.
| Capability✓ in scope · — not at this tier | PilotOne admission pathway | ProductionProduction EHR integration | AdvancedMulti-site / multi-source |
|---|---|---|---|
| Introduced at Pilot | |||
| Assembled medication history | ✓ | ✓ | ✓ |
| Discrepancy list with sources | ✓ | ✓ | ✓ |
| Pharmacist verification and sign-off | ✓ | ✓ | ✓ |
| High-alert ranking | ✓ | ✓ | ✓ |
| Baseline evaluation | ✓ | ✓ | ✓ |
| Introduced at Production | |||
| Client source list and precedence | — | ✓ | ✓ |
| Dispensing, claims and external records | — | ✓ | ✓ |
| Pharmacist worklist and write-back | — | ✓ | ✓ |
| Observability and evaluation | — | ✓ | ✓ |
| Introduced at Advanced | |||
| Multi-site, multi-source reconciliation | — | — | ✓ |
| Enterprise controls and audit reporting | — | — | ✓ |
| Build price | From $5,000 | From $8,000 | Custom quote |
- Final build price
- Confirmed after discovery based on medication-history sources, EHR and pharmacy integrations, patient volume, matching complexity, approval controls and deployment requirements.
- Separate from build
- Build pricing is separate from recurring Agent Care, which covers managed monitoring, evaluations, incidents and verified improvements after launch.
What we need from you
What you bring, and what we build with it
Each input maps to a piece of build scope and a week in the delivery timeline.
You bring
We build with it
01Your approved source list and which source wins
→Source precedence rules, signed by pharmacy
Week 102Access to EHR, pharmacy, ADT and history APIs
→Source and API assessment, then integration setup
Week 203Formulary, local drug names and matching tables
→Drug matching on ingredient, strength, form and route
Week 204Your high-alert list and what must never fold down
→High-alert ranking and volume controls
Week 405Reconciliations a pharmacist already did, including the bad ones
→Reference reconciliations, regression cases and failure-mode testing
Week 406The languages and pharmacy patterns your patients have
→Subgroup evaluation across language, pharmacy count and record availability
Week 507Named pharmacists and a resolution workflow
→Pharmacist worklist, then supervised reconciliations and validation
Weeks 5–6
Nothing else is required
Deployment, documentation and Agent Care handover are ours.
Delivery timeline
Four phases across six weeks
Phases are drawn over the weeks they actually occupy. Week 5 carries both the subgroup evaluation and the first supervised pharmacist worklists.
Phase
W1
W2
W3
W4
W5
W6
- DiscoveryW1
- BuildW2 – W3
- EvaluateW4 – W5
- Pilot & LaunchW5 – W6
Week focus
W1Which source wins, and what only a pharmacist may settle
W2Source and API setup, interview capture and drug matching
W3Retrieval, comparison against the order set and discrepancies
W4Evaluation against pharmacist reconciliations and high-alert recall
W5Pharmacist worklist, supervised reconciliations and subgroup slices
W6Pharmacy works the live worklist; Agent Care picks up monitoring
- Reading the band
- The pharmacist gate is built in week 1 and never moves after it. Weeks 5 and 6 overlap because the subgroup slices are cut from real worklists.
- At the end of W6
- Reconciliation has run alongside the existing process and been worked by the pharmacists who sign from it, then Agent Care takes over monitoring.
- Duration
- Six-week plan shown · typical delivery 4–6 weeks depending on scope confirmed in discovery.
Next step · Healthcare AI agent
Build a reconciliation agent around your pharmacy workflow.
Show us your medication-history sources, your high-alert list and how a discrepancy reaches a pharmacist today. We'll rebuild one admission's list from your sources and compare it with your pharmacist's.
- Typical delivery
- 4–6 weeks
- Deployment
- Your EHR and pharmacy stack
- Verification
- Pharmacist or prescriber
- After launch
- Agent Care available
Nestack Agents · Medication reconciliation & pharmacy verification
AGT-HC-10 · Agent Care available after launch
