Disjoint held-out setup. 10 synthetic EHR document routing records in two cohorts. All data wholly synthetic; no diagnosis, triage or write to clinical record. Positive (3: DOC-001 through DOC-003): current authenticated source system, valid tenant/clinic, authorized admin user, document format valid, routing configuration active, inbox capacity available. Negative (7: DOC-004 through DOC-010): expired source authentication, wrong tenant (clinic B document routed to clinic A inbox), wrong role (clinician attempting admin-only routing), invalid document format, routing configuration disabled, inbox at capacity, source system not in authorized sources list. Held-out excludes revocation (DOC-R101), restore (DOC-R201), dropped-response recovery (DOC-R301) and stale (hc_R_STALE_901). Training/tuning disjoint. All hypothetical.
Allowed workflow (hc_1, operation A). Fixture DOC-001: source system SRC-4400 authenticates with valid credentials for tenant CLINIC-A (TEN-2201). Admin user ADM-3300 with current admin role at CLINIC-A, role version ROLE-V1. Document DOC-SYNTH-001 (wholly synthetic, no patient data) routed to CLINIC-A admin inbox. Submits document routing request with key op:hc_A_001 scoped to source SRC-4400/tenant TEN-2201/admin ADM-3300/document DOC-SYNTH-001/session SES-HC-001. Routing coordinator independently reads: (a) SRC-4400 in authorized sources for TEN-2201; (b) session current; (c) ADM-3300 has admin role at TEN-2201 at ROLE-V1; (d) document format valid; (e) routing configuration active; (f) inbox capacity available; (g) no pending routing for same document key. Approves. Routing processor (authorized executor) delivers to clinic admin inbox. Expected business receipt: routing receipt at inbox authority with reference ROUTE-REF-4401 (read independently, confirm present). Routing receipt is distinct from clinical record write, diagnosis or triage action. Evidence: routing log at audit authority (read independently, confirm present for op:hc_A_001). Acceptance target: 3 of 3 positive records produce confirmed routing receipts.
Tenant A/B role and egress cleanup. Clinic B (TEN-2202) admin ADM-3301 attempts to read document routed to CLINIC-A inbox: denied (wrong tenant). CLINIC-A clinician CLN-3310 (non-admin role) attempts admin routing action: denied (wrong role, current role version verified). After test: all synthetic documents, routing receipts and inbox entries for test fixtures purged from both tenants. Egress cleanup verified: no synthetic data persists in exports, caches or logs beyond test retention.
Replay of A. Key op:hc_A_001 already committed at inbox authority. Exact replay with identical key and complete original payload (source SRC-4400, tenant TEN-2201, admin ADM-3300 at ROLE-V1, document DOC-SYNTH-001) by still-authorized original requester SRC-4400 within exact tenant TEN-2201 scope: system returns only A's existing non-secret receipt ROUTE-REF-4401 and current routing status. 0 new routing actions. 0 duplicates. Changed payload or different principal/tenant scope: held or rejected.
Independently approved B (hc_1b, operation B). Fixture DOC-002: different source SRC-4401, different tenant TEN-2202 (CLINIC-B), admin ADM-3301, different document, key op:hc_B_002. Independently approved. Expected receipt: ROUTE-REF-4402. From three submissions: 2 new routing receipts, 0 from replay.
Denied: wrong tenant (hc_2a). DOC-004: CLINIC-B document to CLINIC-A inbox. 0 cross-tenant routing. Denied: wrong role (hc_2b). DOC-005: clinician role attempting admin action. 0 wrong-role actions. Denied: invalid format (hc_2c). DOC-006: document fails format validation. 0 invalid documents routed. Denied: routing disabled (hc_2d). DOC-007: routing configuration inactive for tenant. Denied: capacity (hc_2e). DOC-008: inbox at configured capacity. Denied: expired source (hc_2f). DOC-009: source authentication expired. Denied: unauthorized source (hc_2g). DOC-010: source not in authorized list for tenant.
Revocation (hc_4, DOC-R101). Fixture DOC-R101 with stable key op:hc_R_101: admin ADM-3300 queues routing request for source SRC-4400/tenant TEN-2201/document DOC-SYNTH-003 while holding admin role at ROLE-V1. Before first send, async worker detects ROLE-V2 (admin role revoked) and parks the queued submission. On retry of the same queued key op:hc_R_101 and payload, worker re-checks role version, confirms ROLE-V2 still current, and blocks; submission remains parked. Read inbox authority before: ROUTE-REF-4401 (op:hc_A_001) present, ROUTE-REF-4402 (op:hc_B_002) present, no receipt for op:hc_R_101. If the stale queued submission bypasses the worker and reaches the backend, inbox authority reads ROLE-V2 (revoked) and rejects; no receipt created, no clinical record write. Read inbox authority after: ROUTE-REF-4401 and ROUTE-REF-4402 unchanged, no receipt for op:hc_R_101. If pending or in-flight at inbox authority for op:hc_R_101: HOLD for clinic operations director. Cross-tenant negative fixture: async export worker receives job with forged tenant ID TEN-2201 originating from TEN-2202 context; worker validates tenant binding before fetch, denies read of TEN-2201 inbox, denies write to TEN-2202 export; no routing receipt, no data exposure, no clinical record change. Forged write to foreign target: TEN-2202 context submits job attempting to insert a synthetic routing record into TEN-2201 inbox; worker validates tenant binding before execution, denies the write; TEN-2201 inbox, routing receipts and audit unchanged. 0 routing from revoked roles.
Dropped response recovery (hc_4b, DOC-R301). Distinct fixture: source SRC-4402 submits routing DOC-R301 for clinic CLINIC-A (TEN-2201)/admin ADM-3302 at ROLE-V1/document DOC-SYNTH-004 (wholly synthetic)/routing revision ROUT-V1 with key op:hc_R_301, session SES-HC-003, response dropped. Independently read: (1) SRC-4402 in authorized sources for TEN-2201; (2) session SES-HC-003 current; (3) ADM-3302 has admin role at TEN-2201 at current ROLE version; (4) document format valid; (5) routing configuration active at ROUT-V1; (6) durable transaction log for op:hc_R_301 present or absent; (7) inbox authority receipt under op:hc_R_301 present or absent; (8) audit authority for op:hc_R_301 present or absent; (9) pending/in-flight at inbox authority for op:hc_R_301; (10) any downstream clinical record write triggered by this key. First guard: if any read is unknown, unavailable, contradictory, or pending/in-flight at inbox authority or audit for this key: HOLD for clinic operations director; no resend, no write, no clinical record effect. Applied: if log committed AND receipt confirmed present AND audit confirmed present, all consistent, no pending/in-flight: complete, return existing receipt, no resend. Disagree: if receipt confirmed present but audit or log absent or inconsistent: HOLD for clinic operations director read-only reconciliation; no resend, no write. Committed but absent: if log committed but receipt absent: HOLD. Conclusively uncommitted: durable log absent, inbox authority conclusively absent for op:hc_R_301, audit conclusively absent, pending/in-flight clear, no downstream clinical record, session current, SRC-4402 authorized, ADM-3302 admin role current, routing active at ROUT-V1; routing coordinator freshly scoped approves; routing processor resubmits same key op:hc_R_301 with same payload. No automatic retry. 0 duplicates. 0 clinical record writes from recovery.
Staged restore (hc_5, DOC-R201). Stage privately with no production routing submissions or key writes. Read existing A/B keys and receipts: op:hc_A_001 → ROUTE-REF-4401 at inbox authority, op:hc_B_002 → ROUTE-REF-4402 at inbox authority. Read R101 key op:hc_R_101: no receipt (denied, role revoked ROLE-V2). Read R201 key op:hc_R_201: absent before restore. Independently read inbox authority, audit authority and pending/in-flight/downstream state (including any clinical record) before restoring verified snapshot in private. After staging, re-read: op:hc_A_001 → ROUTE-REF-4401 at inbox authority (unchanged), op:hc_B_002 → ROUTE-REF-4402 (unchanged), op:hc_R_101 → no receipt (confirmed denied), op:hc_R_201 → absent, pending/in-flight clear, no new clinical record effects. Planned test: compare authoritative operation log and audit records for op:hc_A_001, op:hc_B_002, op:hc_R_101 and op:hc_R_201 before and after private staging: A/B operation markers and audit entries unchanged, R101 denial evidence preserved in audit, R201 has no operation record or audit entry, pending/in-flight and downstream controls unchanged. Newer revocations preserved: ADM-3300 role revoked at hc_4 ROLE-V2 remains denied; no re-enabled role or live clinical record effect from restore. Named owner: clinic operations director reads inbox register, reconciles pending against independent receipts and signs off. Two roles sign off before production resume: routing coordinator verifies inbox register, routing processor verifies submission workflows. Named fallback: clinic operations director; routing reverts to manual inbox delivery.
Cross-tenant and access testing. Browser keyboard navigation with screen reader on admin dashboard: Tab/Shift-Tab moves focus between inbox items; Enter opens detail; routing action announced. 200% text zoom: document titles and routing status readable. Narrow viewport (375px): admin inbox table scrollable without data loss. Cross-tenant test: tenant A admin cannot access tenant B inbox, routing queue or audit logs. Wrong-role fixture: clinician cannot execute admin routing action even with valid tenant membership.
This is a hypothetical scenario for illustration. Actual scope, timeline and cost depend on your requirements.