Nestack Agent Care
Industries / Healthcare / Med-rec & pharmacy agent

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.

4–6 weeksTypical delivery
Your stackDeployment
PharmacistVerification
Agent CareAfter launch

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

AgentHuman
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.

5DecisionSplits on attribution and match confidence
Attributed and matched

Enters the pharmacist's worklist, ranked and sourced.

Unattributed or contradictory

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 required8 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 boundaryAgent 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 discrepancyIllustrative example
Patient says
Order set says
Last dispensed
Surfaced as
Confidence
Resolved by
Half a tablet at night
Warfarin 5 mg daily
5 mg, 41 days ago
Three sources disagree
88%
Pharmacist, not the agent
As receivedThe 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 listThree sources give three answers and none matches the order. The agent shows all three, dated, not one.
ActionResolvePharmacist verifiesQuery the prescriber
What the score decidesConfidence says how sure the agent is that this is one drug and not two — not whether the dose is right.

Value

Where AI adds value

The same four claims, placed at the point in the workflow where each one applies.

Where the value landsValue 01 – 04
Every medication lineFrom the interview, the chart and outside records
03Assembly & comparison

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.

01Approved path

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.

02Human review

Give pharmacy a list worth reading

Ranked, sourced differences reach the worklist instead of a flat page of alerts that gets skimmed.

04Build 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 & ADTEpic · Oracle Health · athenahealth
MEDITECH · order, allergy and ADT feeds
Pharmacy systemsPharmacy system · verification queue
Outpatient dispensing · retail links
Medication historySurescripts history · PBM claims
Fill records · state PDMP

Agent

Medication reconciliation & verification

Assembles sources
Compares and ranks
Hands to pharmacy

External records & drug dataHIE query · record exchange · C-CDA import
Drug knowledge base · RxNorm
Observability & evaluationOpenTelemetry · 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 defenceInward → L1 · closest to the model
L6Rollback / safe modeReturn reconciliation to pharmacy if evaluations or production signals degrade.Roll back
L5TraceabilityRecord every source read, match made, rank applied and resolution.Record
L4Pharmacist gateVerification, interaction clearance and dosing stay with a licensed person.Gate
L3Ranking and volumeLow-value lines fold down; high-alert lines never do.Rank
L2Match confidenceWeak or contradictory matches are marked, never merged.Flag
L1Source attributionNo line reaches the list without the source and date behind it.Attribute
Model coreDiscrepancy list proposed — each line with its sources, its dates and a match confidence
L1 – L2Decide whether a line may be stated at all
L3Decides what a pharmacist reads first
L4 – L5Keep verification with a person and the trail intact
L6Pulls 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
Depth of coverage ▼
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 lifecycleDirection of processing →
01 · Source assembly2 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 gathersInterview, dispensing, external records and prior stays
02 · Matching2 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 matchesIngredient, strength, form, route and frequency
03 · Comparison1 mode
MR-05

Fill beats the patient

A dispensing record is treated as the dose actually taken.

Stage comparesThe assembled history against the current order set
04 · Handoff / write1 mode
MR-06

Buried in volume

Low-value lines bury the anticoagulant discrepancy.

Stage presentsThe ranked list a pharmacist actually works from
05 · Change / Version1 mode
MR-07

Silent source-rule change

Which source wins changes, and nobody approved it.

Stage tracksModel, 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 aggregateIllustrative example
SliceFailure rateLift Lift vs. thresholdStatus
Patients using several pharmacies5.8%3.6× Review
Non-English medication interviews4.4%2.8× Review
No external record available3.1%1.9× Watch
Routine elective admissions1.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 stagesSwitchback — the path turns at Improve and returns at Learn
01Detect

Discrepancy recall or the false-discrepancy rate moves in a cohort.

02Diagnose

Traced to a source, the drug match, the comparison rule or the ranking.

03Improve

The source, matching table or ranking rule is re-approved by pharmacy and version-linked.

04Verify

Re-run against held-out reconciliations from the affected cohort, including the ones that failed.

05Learn

That patient becomes a regression case and the changed rule enters the pharmacy runbook.

Learn → DetectThe 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.
02EHR, pharmacy and history-source API review.
03Approved source list and precedence rules, signed by pharmacy.
04Interview capture on the agreed channels.
05Ingredient, strength and form matching.
06Dispensing, claims and external records.
07Comparison against the current order set.
08High-alert list, ranking and volume controls.
09Recall against pharmacist reconciliations.
10Pharmacist worklist and resolution workflow.
11Reconciliation write-back and audit logging.
12Observability, deployment and Agent Care handover.
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 priceConfirmed after discovery based on medication-history sources, EHR and pharmacy integrations, patient volume, matching complexity, approval controls and deployment requirements.
Separate from buildBuild 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 bringWe build with it
01Your approved source list and which source wins Source precedence rules, signed by pharmacyWeek 1
02Access to EHR, pharmacy, ADT and history APIs Source and API assessment, then integration setupWeek 2
03Formulary, local drug names and matching tables Drug matching on ingredient, strength, form and routeWeek 2
04Your high-alert list and what must never fold down High-alert ranking and volume controlsWeek 4
05Reconciliations a pharmacist already did, including the bad ones Reference reconciliations, regression cases and failure-mode testingWeek 4
06The languages and pharmacy patterns your patients have Subgroup evaluation across language, pharmacy count and record availabilityWeek 5
07Named pharmacists and a resolution workflow Pharmacist worklist, then supervised reconciliations and validationWeeks 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 W1W2W3W4W5W6
Discovery W1
Build W2 – W3
Evaluate W4 – W5
Pilot & Launch W5 – 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 bandThe 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 W6Reconciliation has run alongside the existing process and been worked by the pharmacists who sign from it, then Agent Care takes over monitoring.
DurationSix-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.

Nestack Agents · Medication reconciliation & pharmacy verificationAGT-HC-10 · Agent Care available after launch