STD: ADJ Zika Rule (ADJZIKA)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-adj-zika.md
Rule Name: ADJ_Zika
Domain: RULES-ADJZIKA
Overview
This document specifies tests for the ADJ Zika rule using decision tables and test vectors. The rule evaluates wells for potential adjacent cross-contamination in Zika PCR assays by comparing observation quantities against configured thresholds.
Rule Characteristics:
- Pure business logic (no UI)
- Threshold-based contamination detection
- Historical suppression for repeat accessions
- Well ordering logic for same-accession history
Test Method: TM-API (per Test Plan - Rules use automated API tests)
Verification Approach:
Rule verification is performed using data-driven test vectors. Each row in a decision table represents a complete verification scenario with defined inputs and expected outputs. This format enables exhaustive condition coverage while remaining concise and auditable.
Coverage Summary
| REQ ID | Title | Conditions | Test Vectors | Coverage | Gaps |
|---|
| REQ-RULES-ADJZIKA-001 | Apply Adjacent Well Contamination Thresholds | 8 | 16 | 100% | None |
| REQ-RULES-ADJZIKA-002 | Suppress Errors for Repeat Accessions with Low-Positive History | 6 | 8 | 100% | None |
| REQ-RULES-ADJZIKA-003 | Use Latest Well Number for Same-Accession History | 4 | 6 | 100% | None |
Totals: 3 REQs, 18 Conditions, 30 Test Vectors, 100% Coverage
REQ-RULES-ADJZIKA-001: Apply Adjacent Well Contamination Thresholds
| Variable | Type | Valid Values | Description |
|---|
well.mix | string | Zika, Other | Well mix identifier |
well.target | string | Zika, Other | Well target identifier |
well.quantity | float | numeric | Observation quantity of current well |
adjacent.quantity | float | numeric | Observation quantity of adjacent well |
config.POTENTIAL_CONTAMINATED | float | numeric | Upper bound for "at risk" wells |
config.POTENTIAL_CONTAMINATING | float | numeric | Lower bound for "source" wells |
config.QUANT_OR_CT | string | QUANT, CT | Evaluation mode |
Output Variables
| Variable | Type | Description |
|---|
well.error_code | string? | ZIKA_ADJ_CT when contamination detected, null otherwise |
rule_applied | bool | Whether the rule was evaluated for this well |
Decision Table: Mix/Target Filter
| TV | well.mix | well.target | rule_applied | Covers |
|---|
| TV-001-001 | Zika | Zika | true | AC: Both match rule mapping |
| TV-001-002 | Zika | Other | false | AC: Target mismatch |
| TV-001-003 | Other | Zika | false | AC: Mix mismatch |
| TV-001-004 | Other | Other | false | AC: Neither match |
Decision Table: Threshold Evaluation (QUANT Mode)
| TV | well.qty | adj.qty | POTENTIAL_CONTAMINATED | POTENTIAL_CONTAMINATING | error_assigned | Covers |
|---|
| TV-001-005 | 100 | 600 | 200 | 400 | ZIKA_ADJ_CT | AC: Both thresholds met |
| TV-001-006 | 100 | 300 | 200 | 400 | null | AC: Adjacent below contaminating threshold |
| TV-001-007 | 300 | 600 | 200 | 400 | null | AC: Current above contaminated threshold |
| TV-001-008 | 300 | 300 | 200 | 400 | null | AC: Neither threshold met |
Decision Table: Boundary Conditions
| TV | well.qty | adj.qty | POTENTIAL_CONTAMINATED | POTENTIAL_CONTAMINATING | error_assigned | Covers |
|---|
| TV-001-009 | 200 | 401 | 200 | 400 | null | AC: At contaminated threshold (not below) |
| TV-001-010 | 199 | 400 | 200 | 400 | null | AC: At contaminating threshold (not above) |
| TV-001-011 | 199 | 401 | 200 | 400 | ZIKA_ADJ_CT | AC: Just below/just above boundaries |
| TV-001-012 | 1 | 1000000 | 200 | 400 | ZIKA_ADJ_CT | AC: Extreme values |
Decision Table: Gap Coverage — Negative Path and Adjacency
| TV | Scenario | well.qty | adj.qty | thresholds | error_assigned | Covers |
|---|
| TV-ADJZIKA-GAP-001 | Both wells above contaminated threshold (no at-risk well) | high (CT=20) | high (CT=20) | Neither below POTENTIAL_CONTAMINATED | null | AC: No at-risk well means no flag |
| TV-ADJZIKA-GAP-002 | Both wells below contaminating threshold (no source well) | moderate (CT=36.5) | moderate (CT=36.5) | Neither above POTENTIAL_CONTAMINATING | null | AC: No contamination source means no flag |
| TV-ADJZIKA-GAP-003 | One above contaminated, other below contaminating | high (CT=20) | moderate (CT=30) | Only one condition met | null | AC: Both thresholds must be met |
| TV-ADJZIKA-GAP-004 | Non-adjacent wells not flagged (plate ordering) | low (CT=36.5) | high (CT=15) | A1 and H12 (opposite ends) | null | AC: Only plate-adjacent wells checked |
REQ-RULES-ADJZIKA-002: Suppress Errors for Repeat Accessions with Low-Positive History
| Variable | Type | Valid Values | Description |
|---|
well.accession | string | any | Accession number of current well |
history.exists | bool | true, false | Whether historical results exist |
history.quantity | float? | null, numeric | Historical result quantity |
config.POTENTIAL_CONTAMINATED | float | numeric | Upper bound defining low-positive range |
Output Variables
| Variable | Type | Description |
|---|
error_suppressed | bool | Whether ZIKA_ADJ_CT error was suppressed |
Decision Table: Historical Suppression Logic
| TV | history.exists | history.qty | POTENTIAL_CONTAMINATED | contamination_detected | error_assigned | Covers |
|---|
| TV-002-001 | false | null | 200 | true | ZIKA_ADJ_CT | AC: No history - apply error |
| TV-002-002 | true | 100 | 200 | true | null | AC: History in low-positive range - suppress |
| TV-002-003 | true | 300 | 200 | true | ZIKA_ADJ_CT | AC: History above threshold - apply error |
| TV-002-004 | true | 0 | 200 | true | ZIKA_ADJ_CT | AC: History at zero - not in range (qty > 0 required) |
Decision Table: Low-Positive Range Boundaries
| TV | history.qty | POTENTIAL_CONTAMINATED | in_low_positive_range | Covers |
|---|
| TV-002-005 | 1 | 200 | true | AC: Just above zero |
| TV-002-006 | 200 | 200 | true | AC: At threshold (inclusive) |
| TV-002-007 | 201 | 200 | false | AC: Just above threshold |
| TV-002-008 | -1 | 200 | false | AC: Negative (invalid) |
REQ-RULES-ADJZIKA-003: Use Latest Well Number for Same-Accession History
| Variable | Type | Valid Values | Description |
|---|
run.wells | array | [Well...] | Wells in the run with same accession |
well.well_number | string | A1, A2, B1, ... | Well position identifier |
well.accession | string | any | Accession number |
Output Variables
| Variable | Type | Description |
|---|
selected_history_well | string | Well number used as historical reference |
Decision Table: Well Ordering (Alphanumeric)
| TV | wells_same_accession | selected_for_history | Covers |
|---|
| TV-003-001 | [A1] | A1 | AC: Single well - use that well |
| TV-003-002 | [A1, A2] | A2 | AC: A2 > A1 |
| TV-003-003 | [A1, B1] | B1 | AC: B1 > A1 (row ordering) |
| TV-003-004 | [A10, A2, A1] | A10 | AC: Alphanumeric sort (A10 > A2) |
Decision Table: History Determination Integration
| TV | Run1 Wells | Run1 Selected | Run2 Well | Run2 Outcome | Covers |
|---|
| TV-003-005 | A1(qty=111K), A2(qty=24) | A2(qty=24) | A1(qty=24) adjacent to A2(qty=111K) | No error | AC: Latest well in range suppresses |
| TV-003-006 | A1(qty=24), A2(qty=111K) | A2(qty=111K) | A1(qty=24) adjacent to A2(qty=111K) | ZIKA_ADJ_CT | AC: Latest well above range - error applied |
Automation Status
| REQ ID | Test Vectors | Status | Notes |
|---|
| REQ-RULES-ADJZIKA-001 | TV-001-001 to TV-001-012 | Automated | Threshold evaluation |
| REQ-RULES-ADJZIKA-002 | TV-002-001 to TV-002-008 | Automated | Historical suppression |
| REQ-RULES-ADJZIKA-003 | TV-003-001 to TV-003-006 | Automated | Well ordering |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|
| REQ-RULES-ADJZIKA-001 | BT-5155 | Existing |
| REQ-RULES-ADJZIKA-002 | BT-5155, BT-5157 | Existing |
| REQ-RULES-ADJZIKA-003 | BT-5155, BT-5157 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Notes
- All test vectors derived from SRS acceptance criteria and acceptance tests
- Boundary conditions explicitly tested for threshold comparisons
- Low-positive range definition (qty > 0 AND qty <= threshold) tested at boundaries
- Well ordering tested with alphanumeric sort edge cases (A10 vs A2)