Design prototype · Built on Stockurai
Complaint triage for pharmaceutical lots
Prepared for Jane Doe · Pharmaceutical manufacturing · December 3, 2026
Sample data for illustration.DecisionWhich complaints to investigate, trend or escalate each day
OptionsInvestigate · Trend · Escalate
Data sourcesCall center and pharmacy intake, Lot and batch records, complaint history, Pharmacovigilance adverse event links
PolicyEscalate reportable issues within 3 working days; recall stays with the committee
STEP 01
Targets
Targets are what the system watches. Here, they are the product lots complaints are raised against, with open complaints, the 90-day rate and safety links from the records.
| Target | Open complaints | 90-day rate | Safety links | Status |
|---|---|---|---|---|
| Lot 24A117 · Tablets 500 mg | 9 | 14 per 100k units | 1 | Active |
| Lot 24A090 · Injectable vial | 5 | 11 per 100k units | 2 | Active |
| Lot 24B032 · Oral solution | 3 | 6 per 100k units | 0 | Watching |
| Lot 23L218 · Inhaler | 1 | 2 per 100k units | 0 | Watching |
STEP 02
Target detail
Where the feeds meet: complaints (what customers and pharmacies report) and the lot records (what was made, shipped and reported before). Every complaint is weighed against both.
Lot 24A117 complaints (7 working days)
| Date | New | Open | Top defect | Safety links |
|---|---|---|---|---|
| Nov 16 | 4 | 9 | Black specks | 1 |
| Nov 13 | 2 | 6 | Black specks | 0 |
| Nov 12 | 1 | 5 | Black specks | 0 |
| Nov 11 | 1 | 4 | Tablet chipping | 0 |
| Nov 10 | 1 | 3 | Black specks | 0 |
| Nov 9 | 1 | 2 | Odor | 0 |
| Nov 6 | 1 | 1 | Tablet chipping | 0 |
Lot record
Units shipped182,000
Baseline rate5 per 100k units
Serious safety link1, linked Nov 16
Reporting deadlineNov 19 (3 working days)
Feeds
ComplaintsNew complaints, defect type, lot number · Every 15 minutes
BatchUnits shipped, past complaints by lot · Daily
SafetyAdverse events linked to complaints · Daily
STEP 03
Alerts: what the system watches for
Alerts are code-free. Pick a field, an operator and a value. Each alert watches one thing, such as a defect type or a lot's complaint rate, and fires when it happens.
Edit alert
Lot complaints above 2x baseline
Complaints (30 days)
Greater than
Lot baseline rate x 2
1 Day
PreviewComplaints (30 days) greater than Lot baseline rate x 2
Configured alerts
Serious adverse event linkedSafety
Defect is sterility or potencyComplaints
Same defect on 3+ complaintsComplaints
Lot complaints above 2x baselineBatch
Same defect in 2+ lotsBatch
Report due within 2 working daysComplaints
STEP 04
Decision logic: alerts, conditions, plays and rules
Alerts evaluate data in real time. Conditions add triggered alerts up to a score, and plays organize the conditions. Rules turn a play’s score into a real-time recommendation on the live feed. The policy gate holds every Field Alert Report to its 3-working-day limit and leaves recall decisions to the recall committee, whatever the score says. Rules drive the recommendations, not AI.
Play: Triage complaints by lot risk
+40Serious harm signal
- Serious adverse event linked
+20Quality defect reported
- Defect is sterility or potency
- Same defect on 3+ complaints
+15Pattern in the lot
- Lot complaints above 2x baseline
+10Spans several lots
- Same defect in 2+ lots
Rules
Score ≥ 60, or any sterility or contamination defectESCALATE
Score 20–59INVESTIGATE
Score < 20TREND
Policy gate
Field Alert ReportWithin 3 working days (21 CFR 314.81)
Recall decisionRecall committee only
ApprovalQA complaint lead
STEP 05
Live feed
This is the screen the decision team watches. Each card is a recommendation on one lot, printed the moment its rule is met, with the score and time it fired.
Investigate (1)
Lot 24A090 Score 35 · 5 open complaints
Caps hard to remove at 2 pharmacies; full investigation opened
Caps hard to remove at 2 pharmacies; full investigation opened
Escalate (1)
Lot 24A117 Score 75 · 9 open complaints
Black specks in tablets, 1 serious safety link; FAR clock started
Black specks in tablets, 1 serious safety link; FAR clock started
Trend (1)
Lot 24B032 Score 0 · 3 open complaints
Mixed defects, near baseline; added to monthly trending
Mixed defects, near baseline; added to monthly trending
STEP 06
Audit trail: one recommendation, start to finish
Every recommendation is logged and traceable. Anyone can see which complaints, lot records and safety links arrived, which conditions were met, who approved the escalation and how early it was made.
Lot 24A117 — Audit trail
Data received
Complaints feed9 open, 6 mention black specks (call center, pharmacies)
Batch feed182,000 units shipped; 14 per 100k vs 5 baseline
Safety feed1 serious adverse event linked, Nov 16
Play evaluated → rule fired
✓ Serious harm signal (+40)
✓ Quality defect reported (+20)
✓ Pattern in the lot (+15)
Score75 → ESCALATE
Policy gatePassed: report due Nov 19; recall left to the committee
Decision
ActionEscalated for Field Alert Report assessment
Approved byQA complaint lead, 10:35
RecallReferred to recall committee
Outcome
Arrival-order review would have reached itNov 20, after the deadline
ResultEscalated on day 1 of 3 working days
STEP 07
Daily flags
A short daily list of things worth a look, separate from the live feed. Reporting clocks running down, lots with sudden complaint spikes and new adverse event links.
SafetyLot 24A117: serious event linked, day 1 of 3
Field Alert Report due Nov 19; assessment open
BatchLot 24A090 rate is 2.2x its baseline
Hard-to-remove caps on 5 complaints in 7 days
ComplaintsBlack specks reported on a second lot
Lot 24B032 has 1 similar complaint; cross-lot rule armed
ComplaintsIntake up 18% on last week
Mostly pharmacy reports on one product
STEP 08
ROI scoring and baseline
The optimization engine scores every decision. Every recommendation is measured against reviewing in order of arrival, and against the earliest day the signal was visible in the data. The gap is the ROI you can measure.
| Target | Decisions | Avg days to decision | Baseline | Best possible | Captured | Result vs baseline |
|---|---|---|---|---|---|---|
| Lot 24A117 · Tablets 500 mg | 8 | 1.2 | 4.8 | 0.5 | 84% | 3.6 days earlier |
| Lot 24A090 · Injectable vial | 6 | 1.8 | 5.1 | 0.8 | 77% | 3.3 days earlier |
| Lot 24B032 · Oral solution | 4 | 2.6 | 4.2 | 1.0 | 50% | 1.6 days earlier |
Baseline: Review in order of arrival. Best possible: Earliest day the signal was visible. Sample figures; in a live installation, these come from the organization’s own decisions and data.
STEP 09
Fit and next steps
What we’d check first
Why
- A daily repeated decision with clear data, a hard deadline and a defined approver
To verify
- How consistently complaints are coded by defect type
- How safety links arrive, and how often
- Validation and record rules the quality system requires
Extend with AI
- Reading free-text complaints to suggest defect type and lot
Next step: a formal proposal
ScopeThe decision, targets and data feeds
RulesRules and policy gate, written out
ROIHow ROI is measured against the current process
TermsSetup estimate, timeline and license terms
Where it runsThe organization’s own AWS account
For IT and data teams: an AI data pipeline
Stockurai is licensed to researchers and institutions for real-time analysis of equity markets, with AI and machine learning built into the process. The same AI data pipeline can be built for this decision.
- It runs entirely in the organization’s own AWS account, and all data stays there.
- Every recommendation is stored with the full data behind it: labeled records data teams can use to train and test models.
- Built with AI in mind, making maintenance and extension simple for a single technical resource.
Design prototype prepared by Stockurai · Sample data for illustration only · stockurai.com