Verixa Phase-1 — Deviation → RCA → CAPA End-to-End User Flow

Single integrated flow showing the full Phase-1 chain · URS-16 + URS-17 + URS-18 · WP-2 / WP-4 / WP-7 / WP-8 / WP-9 · 2026-06-01
Scenario. Tanya (QC analyst, site Chennai) discovers Batch B-9342 yielded 88.2% against the 92–98% specification. She raises a Major deviation. Investigation needs depth → escalates to a full URS-17 RCA → root cause is a centrifuge speed setpoint drift. WP-2 subscriber auto-creates a linked URS-18 CAPA. Vikram owns it; Suresh executes the corrective + preventive actions; Ravi verifies effectiveness (Effective); Anita closes the CAPA with practice-lead co-sign; then Anita closes the parent deviation.
Out of scope here: batch hold/disposition workflow (URS-23 DEC-16-27) — Phase-3 (the batch is still referenced via the seeded-batch typeahead). Reportability clock (Critical only). Reopen (Phase-2 only). Multi-mode parallel/sequential signing beyond critical-dual (WP-3 deferred).
See
Click
Fill
Decide
Sign
Auto
Done
DEV
Workflow 1 · Deviation (URS-16)
Parts 1–3 · steps 1–18
T
Tanya — Discoverer
quality_leaddeviation_discoverersite=Chennai · product=antibiotic-line
Part 1 · Create
1
Click
Open Deviations → + New Deviation
Tanya saw the yield report; navigates from her dashboard.
Behind the scenes
PermissionGuard checks deviations:create. Server returns form schema + GMP module_options for the classification dropdown.
2
Fill
Fill the deviation form
Practice Domain *
GMP
Classification *
Process parameter deviation — yield
Severity *
(preliminary)
Major
Title *
"Low yield on B-9342 — 88.2% vs spec 92–98%"
Symptom *
"Mass-balance yield 88.2%. Final assay on-spec. Loss appears at centrifugation step."
Immediate Action *
"Batch B-9342 placed in QC HOLD bay; centrifuge tagged for review."
Discovery date *
Today 09:22
Priority *
Expedited
Scope anchors *
site=Chennai · product=antibiotic-line · batch=B-9342
Behind the scenes
9 mandatory fields. Severity is preliminary. batch_id captured via the optional seeded-batch typeahead (URS-23 reference rows, search component) — a reference only, no batch-hold trigger. The batch hold/disposition control (URS-23 DEC-16-27 cascade) is deferred to Phase-3; the pilot does not build it.
3
Click
Click Submit for investigation
Confirmation popup → confirms.
Behind the scenes
Server mints DEV-2026-000418 race-safe. State draft → investigating. Audit: DEVIATION_CREATED · DEVIATION_SUBMITTED (URS-06 hash chain).
4
See
Confirmation
"DEV-2026-000418 submitted."
DONE · Tanya goes back to QC bench.
Hand-off URS-30 broadcast → all qa_reviewer users at site Chennai pinged → Priya claims it
P
Priya — QA Lead
quality_leadqa_reviewercapa_create_authoritysite=Chennai
Part 2 · Triage
5
See
Notification + open record
🔔 "DEV-2026-000418 submitted by Tanya — needs triage."
Behind the scenes · pool broadcast
All 4 QA reviewers at Chennai pinged (URS-30 spine). Priya opens it → marked as triage owner; others see "claimed by Priya."
6
Decide
Authoritative severity
Reviews Tanya's submission. Picks Major (matches preliminary).
7
Fill
Fill triage
Authoritative severity
Major
Impact areas
product_quality (medium), data_integrity (low)
Assign investigator
Vikram (process engineer — SoD-16-01: ≠ Tanya)
Due date
+10 days
Behind the scenes · investigator picker
5 server-side gates: holds deviation_investigator, scope intersects, training current, ≠ discoverer (SoD-16-01), active status. Direct API bypass → 403 DEVIATION_SOD_VIOLATION_DISCOVERER_CANNOT_INVESTIGATE.
8
Click
Confirm Triage
"Triage confirmed. Vikram notified."
Behind the scenes
Triage section flips to read-only with Amend Triage button (with Controlled Approval Modal). Will hard-lock when Vikram signs the conclusion (DEC-16-08 cascade).
DONE · Priya hands off to Vikram. She'll be back to assign CAPA owner in Part 6.
Hand-off Named-recipient notification to Vikram · "My open investigations" count +1
V
Vikram — Process Engineer / Investigator
quality_leaddeviation_investigatorrca_leadcapa_owner_authoritysite=Chennai · product=antibiotic-line
Part 3 · Investigate
9
See
Notification + open
🔔 "Assigned to investigate DEV-2026-000418. Due 11-Jun."
10
Fill
Document evidence + impact
Evidence
mass-balance worksheet · raw-material logs · IPC sheets · centrifuge log
Timeline
08:00 batch started · 14:30 centrifugation · 18:00 yield calculated
Impact assessment
"Loss in centrifugation step; mother liquor retained product. Product on-spec; yield short. No release risk per spec."
Affected docs
SOP-MFG-014 (batch record) · MFG-Form-007 (yield log)
11
Decide
Inline root cause OR escalate to RCA?
Inline summary feels thin — recurrent yield trend on this centrifuge. Vikram chooses Escalate to URS-17 RCA for proper depth.
Behind the scenes · escalation gate
Inline root cause acceptable for simple cases. Escalation creates a child URS-17 RCA record with auto-link rca.source_deviation_id = DEV-2026-000418. Deviation state stays investigating.
12a
Click
Pick "Escalate to URS-17 RCA" + click Open RCA workspace
In the Root Cause section, Vikram switches the radio from "Document inline root cause" to "Escalate to full URS-17 RCA". The Open RCA workspace button becomes enabled.
Behind the scenes
Button is gated by rca:create permission + scope eligibility check. Clicking does NOT create the RCA yet — opens a modal first.
12b
Fill
Fill the Create RCA modal (6 fields)
Behind the scenes · field rules
Why-escalate is required — regulators want the justification audited. Technique enum (5_why · fishbone · fta) drives the data-entry template on the RCA workspace. Scope is read-only — inherited from source deviation; RCA cannot exceed parent scope without broader authority. RCA Lead defaults to current user but is subject to SoD-17: Lead ≠ deviation discoverer (Vikram ≠ Tanya ✓).
12c
Click
Click Create RCA
Modal validates + submits.
Behind the scenes · creation transaction
Single DB transaction:
· Validate 6 required fields → 422 if any missing
· SoD-17 re-check server-side → 403 RCA_SOD_VIOLATION on fail
· Mint RCA-2026-000098 race-safe (RCA-{YYYY}-{NNNNNN})
· Insert rcas row: source_type='deviation', source_id=DEV-2026-000418, technique, problem statement, lead, escalation reason, inherited scope, status=draft
· Insert link in deviation_rca_links (or set deviations.rca_id)
· Audit: DEVIATION_RCA_ESCALATED + RCA_OPENED
· URS-30 notification → Priya (informational, QA visibility)
· HTTP 201 → redirect to /rcas/RCA-2026-000098
12d
See
Auto-redirect + confirmation
"RCA-2026-000098 created. Linked to DEV-2026-000418. Continue analysis here."
URL changes to /rcas/RCA-2026-000098 · breadcrumb shows: Deviations › DEV-2026-000418 › RCA-2026-000098
Behind the scenes · cross-record state
Deviation stays in investigating state — escalation does NOT transition it. Investigation pauses on deviation side. Both records cross-reference via UI chips. Deviation's Investigation tab now shows: "Root cause: see linked RCA-2026-000098 (in progress)".
DONE · Vikram is now on the RCA workspace. Deviation paused but linked.
RCA
Workflow 2 · Root Cause Analysis (URS-17)
Part 4 · steps 13–18 · WP-8 substrate e-sig
V
Vikram — same person, now RCA Lead
quality_leadrca_leadscope inherited from deviation
Part 4 · RCA
13
See
RCA workspace loaded · Fishbone template rendered
URL: /rcas/RCA-2026-000098. The workspace shows the Fishbone template (technique he picked in step 12b). Header shows source linkage to DEV-2026-000418. Lead = Vikram, due +14d.
Behind the scenes
Server renders technique-specific UI: Fishbone shows 6-M branches (Method/Machine/Material/Manpower/Measurement/Environment). 5-Why would render a chain; FTA would render a tree.
14
Fill
Build the fishbone
Effect
Low yield on B-9342 (88.2%)
Method branch
centrifuge speed drift; SOP allows wide range
Machine branch
centrifuge last calibrated 11 months ago
Material branch
no material defect — release tests passed
Manpower branch
operator followed SOP correctly
Measurement branch
no speed verification log in batch record
Environment branch
N/A
Witnesses
Shift supervisor Manoj, instrument tech Suresh
15
Fill
Document root cause + recommended actions
Primary root cause
"Centrifuge speed setpoint drift — last calibration cycle missed the 12-month spec by ~30 days; no in-process speed verification."
Contributing causes
Calibration cadence too loose for this critical step; no monitoring control between calibrations.
Recommended actions
(1) Re-calibrate centrifuge. (2) Tighten cadence to 6 months. (3) Add monthly speed verification in batch record.
16
Click
Click Approve RCA conclusion
Controlled Approval Modal opens.
17
Sign
Sign RCA conclusion WP-8
Sign ▶
Behind the scenes · WP-8 substrate verify
RCA approve route runs through validateEsignatureForRecord() at rca/service.ts:786 (today stores esig_id unverified — WP-8 fix). E-sig bound to approval_signature_id. State rca → conclusion_signed. Event: RCA_CONCLUSION_CREATED. SoD-17: RCA approver ≠ deviation investigator's discoverer (Vikram is investigator + RCA lead; he's not the discoverer Tanya, so SoD passes here).
DONE · RCA approved. WP-2 subscriber fires next.
System — WP-2 event subscriber
background joblinkage event consumer
Part 5 · Auto-CAPA
19
Auto
Subscriber consumes rca_conclusion_created → creates linked CAPA
"CAPA-2026-000156 created and linked to RCA-2026-000098."
Behind the scenes · WP-2 build (the live handoff)
Today this handoff is manual via linkOrCreateCapa at rca/service.ts:1473. WP-2 wires the subscriber. Auto-populated fields on the new CAPA:
· source_type = 'rca', source_id = RCA-2026-000098
· title from RCA root-cause statement
· scope inherited from RCA (site=Chennai, product=antibiotic-line, batch=B-9342)
· status = 'draft', ready for assignment
Events: RCA_CAPA_LINKED · CAPA_CREATED. Notification fan-out to capa_create_authority pool at Chennai (= Priya + Anjali + Karan + Deepika).
CAP
Workflow 3 · Corrective & Preventive Action (URS-18)
Parts 6–10 · steps 20–38 · WP-9 build (effectiveness e-sig + closure gate)
P
Priya — back as CAPA Creator
quality_leadcapa_create_authoritysite=Chennai
Part 6 · Assign owner
20
See
Notification: new CAPA needs an owner
🔔 "CAPA-2026-000156 created from RCA-2026-000098. Assign owner."
21
Fill
Assign owner
Owner
Vikram (holds capa_owner_authority; ≠ Tanya, SoD-18-05; ≠ Priya creator, SoD-18-01)
Priority
Medium
Due date
+21 days
Behind the scenes · SoD gates at owner assignment
SoD-18-01 approver/owner ≠ creator (Vikram ≠ Priya). SoD-18-05 owner ≠ source-record discoverer (Vikram ≠ Tanya). Server enforces; UI also disables ineligible candidates.
22
Click
Confirm assignment
"CAPA assigned to Vikram. Notified."
Behind the scenes
CAPA state: draft → open → assigned. Audit: CAPA_ASSIGNED. Direct named-notification to Vikram.
DONE · Priya hands off to Vikram for CAPA execution.
V
Vikram — now CAPA Owner
quality_leadcapa_owner_authority
Part 7 · Plan + Execute
23
Click
Open /capas/CAPA-2026-000156 → Actions tab
24
Fill
Plan 2 action items
Action 1 (corrective)
"Re-calibrate Centrifuge-3 to setpoint 4200 rpm; verify ±10 rpm over 3 cycles." Assignee: Suresh. Due: +5d.
Action 2 (preventive)
"Change calibration cadence from 12-month to 6-month + add monthly speed-verification check to batch record template." Assignee: Anita (Doc-Control). Due: +14d.
Behind the scenes
Action items written to capa_action_items with action_type (corrective/preventive), assigned_user_id, due_date, status='open'. Mutable until parent CAPA reaches verified or closed (DEC-18-15).
25
Click
Click Start work
State → in_progress. Suresh + Anita notified.
Vikram waits for assignees to complete.
S
Suresh — Action Assignee (corrective)
quality_leadpractice_lead_gmpaction-item assignee
Part 7b · Execute action
26
Click
Open action 1 · Click Start
Action moves openin_progress.
27
Fill
Complete + attach evidence
Completion note
"Centrifuge-3 calibrated at 4200 rpm. Verified ±8 rpm across 3 cycles. Calibration certificate attached."
Closure evidence
CAL-CENT-2026-0042 (URS-12 controlled doc)
Behind the scenes
Evidence linked via closure_evidence_document_id FK to URS-12. Action status → completed, pending reviewer-sign.
28
Click
Submit for review
"Action 1 submitted for review. Vikram notified."
Anita similarly completes Action 2 (preventive — SOP cadence updated). Steps shown abbreviated.
V
Vikram — Action Reviewer
quality_leadcapa_owner_authority
Part 7c · Review actions
29
Sign
Reviewer-sign both completed actions
Reviews evidence; signs each action item with substrate-verified e-sig.
Sign ▶
Behind the scenes · SoD-18-02
Reviewer ≠ assignee. Vikram (owner, did not personally execute) can review Suresh's action; Anita's action needs a different reviewer if Anita is also owner — here Vikram (≠ Anita as assignee) reviews. E-sig stored in completion_review_signed_e_sig_id.
30
Click
Mark CAPA actions complete
All action items in terminal status → CAPA state in_progresscompleted.
Behind the scenes
Audit: CAPA_ACTION_COMPLETED ×2 · CAPA_COMPLETED. Gate check: all action items in completed or cancelled state.
31
Click
Schedule effectiveness check
Check description
"Verify next 2 batches achieve ≥92% yield; speed-verification log present on each batch record."
Scheduled for
+30 days
Assign reviewer
Ravi (SoD-18-03: ≠ owner Vikram, ≠ action assignees Suresh/Anita)
Behind the scenes
State → effectiveness_check. Event: CAPA_EFFECTIVENESS_CHECK_SCHEDULED. SoD-18-03 verified at reviewer assignment.
Vikram hands off to Ravi (+30 days).
R
Ravi — Effectiveness Reviewer
quality_leadcapa_effectiveness_reviewersite=Chennai · product=antibiotic-line
Part 8 · Effectiveness
32
See
30 days later — notification
🔔 "Effectiveness check due for CAPA-2026-000156."
33
See
Reviews evidence
Pulls next 2 batch records (B-9355, B-9362). Both at 94% and 95% yield. Speed-verification log present on each.
34
Decide
Outcome adjudication
Picks Effective. (Other options: Partially Effective → residual plan/re-CAPA; Ineffective → mandatory re-CAPA.)
Behind the scenes · 3-way outcome (DEC-18-25)
effective → advances to verified. partial → governed disposition (residual plan + e-sig OR linked re-CAPA). ineffective → mandatory re-CAPA; parent stays in_progress.
35
Fill
Attach outcome evidence + rationale
Outcome
Effective
Evidence
Yield report YR-2026-Q2 · Speed-verification logs ×2
Rationale
"Both batches met yield ≥92% with documented speed verification. Calibration cadence + monitoring control are working."
36
Sign
E-sign effectiveness determination WP-9
Sign ▶
Behind the scenes · WP-9 build (URS-39-WP9-01)
Today the effectiveness_check → verified transition at capas/service.ts:394–415 has NO e-sig. WP-9 adds substrate-verified e-sig bound to verified_e_sig_id in same transaction. Without WP-9, this is the biggest CSV finding regulators flag.
37
See
Confirmation — state flips
effectiveness_checkverified
"Effectiveness verified Effective. Anita notified for closure."
Ravi hands off to Anita.
A
Anita — CAPA Closure Authority
quality_leadfinal_quality_approversite=Chennai
Part 9 · CAPA closure
38
See
Notification + pre-closure checklist
🔔 "CAPA-2026-000156 ready for closure."
CAPA pre-closure checklist (server-computed)
Effectiveness verified — Effective by Ravi · with e-sig
All action items terminal — 2/2 completed with reviewer sign
All cascade items terminal — none defined
Closure rationale — captured below
SoD pass — Anita ≠ creator (Priya), Anita ≠ owner (Vikram), Anita ≠ assignees
Behind the scenes · WP-9 closure gate
Server runs evaluate_capa_closure_gate(). WP-9 fix: gate now blocks on open capa_action_items (today capas/service.ts:424–434 only blocks on capa_cascade_items). All pass → Close button enabled.
39
Sign
Sign CAPA closure (Major matrix)
Sign & Close ▶
Behind the scenes · Major closure matrix
Major needs final_quality_approver + practice_lead_gmp co-sign (Suresh signs first, Anita signs second — Phase-1 sequential dual via existing URS-04 engine call site). Server re-evaluates gate; 409 CAPA_CLOSURE_GATE_CHANGED on stale. Both e-sigs substrate-verified. State verifiedclosed.
40
See
CAPA closed (immutable)
"CAPA-2026-000156 closed. Now eligible to close parent deviation."
Behind the scenes · cascade unlock
Audit: CAPA_CLOSED. DEC-18-15 immutability cascade — header + action items + effectiveness checks all locked. The parent deviation's closure gate now satisfies the "linked CAPA closed" requirement; Anita can proceed to close the deviation.
CAPA chain complete. Back to the deviation.
Cross-workflow handoff CAPA closure satisfies deviation's pre-closure CAPA gate · Anita notified to close parent deviation
DEV
Back to Workflow 1 · Deviation closure
Part 10 · steps 41–44
A
Anita — Deviation Closure Authority
quality_leaddeviation_closure_authority
Part 10 · Deviation closure
41
See
Pre-closure checklist (deviation)
Deviation pre-closure checklist (server-computed)
Root cause documented — from linked RCA-2026-000098
Investigation conclusion signed — Vikram + RCA approval
CAPA linked + closed — CAPA-2026-000156 (Effective)
Comments resolved
SoD pass — Anita ≠ Tanya (reporter), Anita ≠ Vikram (investigator)
Behind the scenes
Server-computed via evaluate_closure_gate(deviation_id, actor). CAPA linked-and-closed check passes because of the cross-record relationship.
42
Sign
Sign closure (Major matrix)
Sign & Close ▶
Behind the scenes · Major matrix
Major closure: deviation_closure_authority + QA + practice_lead_gmp. Three substrate-verified signatures bound to closure transaction (WP-4). Server re-evaluates gate before applying.
43
See
State flips → CLOSED
INVESTIGATINGCLOSED
"DEV-2026-000418 closed. Record is now immutable."
Behind the scenes · full chain immutable
Audit: DEVIATION_CLOSED. DEC-16-08 immutability: deviation header + impact_areas + affected_documents + comments — all locked. Linked records (RCA, CAPA) already closed/immutable. Inspection-ready via URS-22 export.
DONE · End-to-end chain complete.
T
Tanya — Loop closure
quality_leaddeviation_discoverer
Part 11 · Notice
44
See
One notification — closure
🔔 "Your report DEV-2026-000418 has been closed by Anita Sharma."
Behind the scenes
URS-30 routes closure notification ONLY to discoverer_user_id. Tanya wasn't pinged for: triage, investigator assignment, RCA opening, RCA conclusion, CAPA creation, action item progress, effectiveness check, CAPA closure. By design — SoD-16-01 lane separation.
END · Full Phase-1 chain complete: Deviation → RCA → CAPA → back.