STD: Systemic Inhibition Rule (SYSINH)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/rules/rule-systemic-inhibition.mdRule Name: SYSTEMIC_INHIBITION Domain: RULES-SYSINH
Overview
This document specifies tests for the Systemic Inhibition rule using decision tables and test vectors. The rule detects systemic inhibition patterns when multiple associated wells show inhibition, indicating a systematic processing issue rather than isolated well-specific inhibition.
Rule Characteristics:
- Pure business logic (no UI)
- Well association grouping (mix, extraction instrument, extraction date, batch)
- Threshold-based detection (>2 inhibited patient wells)
- Exclusion logic for control wells and detected-type LIMS
- Conditional error assignment based on observation classification
Test Method: TM-API (per Test Plan S3.3 - 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-SYSINH-001 | Core Detection | 18 | 26 | 100% | None |
| REQ-RULES-SYSINH-002 | Control Well Exclusion | 5 | 6 | 100% | None |
| REQ-RULES-SYSINH-003 | Detected-Type Exclusion | 6 | 8 | 100% | None |
Totals: 3 REQs, 29 Conditions, 40 Test Vectors, 100% Coverage
Input Variables (All Requirements)
| Variable | Type | Valid Values | Description |
|---|---|---|---|
well.mix | string | Mix_A, Mix_B, ... | Well mix identifier |
well.extraction_instrument | string | Ext_A, Ext_B, ... | Extraction instrument used |
well.extraction_date | date | Date_A, Date_B, ... | Date of extraction |
well.batch | string | Batch_A, Batch_B, ... | Batch identifier |
well.type | string | Patient, Control | Well type classification |
well.lims.is_inhibited | bool | true, false | Whether LIMS outcome is inhibited |
well.lims.code | string | DETECTED_LOQ, DETECTED_QUANT, DETECTED_HIQ, OTHER | LIMS outcome code |
obs.target_type | string | IC, non-IC | Observation target type |
obs.active | bool | true, false | Whether observation is active |
obs.classification | string | positive, negative | Observation classification |
Output Variables
| Variable | Type | Description |
|---|---|---|
well.error_code | string? | SYSTEMIC_INHIBITON_DETECTED, INHN, or null |
well.lims | string? | Retained original LIMS (for detected-type wells) |
error_triggered | bool | Whether systemic inhibition error was assigned |
REQ-RULES-SYSINH-001: Core Detection
Decision Table: Well Association Matching
Tests that wells must share ALL four association criteria to be grouped.
| TV | mix | extraction | date | batch | wells_in_group | Covers |
|---|---|---|---|---|---|---|
| TV-001-001 | A | A | A | A | 4 (all same) | AC: All criteria match |
| TV-001-002 | A,A,A,B | A | A | A | 3 (mix differs) | AC: Mix mismatch separates |
| TV-001-003 | A | A,A,A,B | A | A | 3 (extraction differs) | AC: Extraction mismatch separates |
| TV-001-004 | A | A | A,A,A,B | A | 3 (date differs) | AC: Date mismatch separates |
| TV-001-005 | A | A | A | A,A,A,B | 3 (batch differs) | AC: Batch mismatch separates |
Decision Table: Inhibition Threshold
Tests the >2 threshold (3+ inhibited patient wells triggers rule).
| TV | patient_inhibited_count | control_inhibited_count | threshold_met | error_triggered | Covers |
|---|---|---|---|---|---|
| TV-001-006 | 0 | 0 | false | false | AC: No inhibition |
| TV-001-007 | 1 | 0 | false | false | AC: Below threshold |
| TV-001-008 | 2 | 0 | false | false | AC: At threshold (not exceeded) |
| TV-001-009 | 3 | 0 | true | true | AC: Exceeds threshold (3+) |
| TV-001-010 | 4 | 0 | true | true | AC: Well above threshold |
| TV-001-011 | 2 | 1 | false | false | AC: Controls not counted |
Decision Table: Inhibited Flag Evaluation
Tests that only is_inhibited=true wells count.
| TV | well_lims.is_inhibited | counts_toward_threshold | Covers |
|---|---|---|---|
| TV-001-012 | true | true | AC: Inhibited counts |
| TV-001-013 | false | false | AC: Non-inhibited ignored |
| TV-001-014 | null/undefined | false | AC: Missing flag = not inhibited |
Decision Table: Positive Well Determination
Tests classification of "positive well" (all non-IC active obs are negative).
| TV | obs_1 (non-IC active) | obs_2 (non-IC active) | obs_3 (IC) | is_positive_well | Covers |
|---|---|---|---|---|---|
| TV-001-015 | negative | negative | negative | true | AC: All non-IC negative = positive well |
| TV-001-016 | negative | negative | positive | true | AC: IC classification ignored |
| TV-001-017 | positive | negative | negative | false | AC: Any positive = not positive well |
| TV-001-018 | positive | positive | negative | false | AC: Multiple positive obs |
Decision Table: Error Code Assignment
Tests which error code is assigned based on observation status.
| TV | threshold_met | is_patient | has_positive_obs | expected_error | Covers |
|---|---|---|---|---|---|
| TV-001-019 | true | true | false | SYSTEMIC_INHIBITON_DETECTED | AC: Positive well gets SYSINH |
| TV-001-020 | true | true | true | INHN | AC: Well with positive obs gets INHN |
| TV-001-021 | true | false | false | null | AC: Control wells excluded |
| TV-001-022 | false | true | false | null | AC: Threshold not met |
Decision Table: INHN Override Priority
Tests that INHN is assigned instead of SYSTEMIC_INHIBITON_DETECTED when positive observations exist.
| TV | non_ic_active_obs_count | positive_obs_count | negative_obs_count | expected_error | Covers |
|---|---|---|---|---|---|
| TV-001-023 | 2 | 0 | 2 | SYSTEMIC_INHIBITON_DETECTED | AC: All negative = SYSINH |
| TV-001-024 | 2 | 1 | 1 | INHN | AC: At least one positive = INHN |
| TV-001-025 | 2 | 2 | 0 | INHN | AC: All positive = INHN |
| TV-001-026 | 1 | 1 | 0 | INHN | AC: Single positive = INHN |
REQ-RULES-SYSINH-002: Control Well Exclusion
Decision Table: Control Well Filtering
Tests that control wells are excluded from threshold count and error assignment.
| TV | well.type | lims.is_inhibited | counts_toward_threshold | receives_error | Covers |
|---|---|---|---|---|---|
| TV-002-001 | Patient | true | true | eligible | AC: Patient wells count |
| TV-002-002 | Patient | false | false | eligible | AC: Non-inhibited patient |
| TV-002-003 | Control | true | false | false | AC: Control excluded from count |
| TV-002-004 | Control | false | false | false | AC: Control never receives error |
Decision Table: Mixed Patient/Control Scenarios
Tests threshold calculation with mixed well types.
| TV | patient_inh | control_inh | total_inh | threshold_met | error_on_patient | Covers |
|---|---|---|---|---|---|---|
| TV-002-005 | 2 | 1 | 3 | false | false | AC: Only patient wells counted (2 <= threshold) |
| TV-002-006 | 3 | 2 | 5 | true | true | AC: 3 patient wells exceeds threshold |
REQ-RULES-SYSINH-003: Detected-Type Exclusion
Decision Table: Detected-Type LIMS Recognition
Tests that detected-type LIMS codes are recognized for exclusion.
| TV | lims.code | is_detected_type | Covers |
|---|---|---|---|
| TV-003-001 | DETECTED_LOQ | true | AC: LOQ is detected-type |
| TV-003-002 | DETECTED_QUANT | true | AC: QUANT is detected-type |
| TV-003-003 | DETECTED_HIQ | true | AC: HIQ is detected-type |
| TV-003-004 | NOT_DETECTED | false | AC: Other codes not detected-type |
| TV-003-005 | INHIBITED | false | AC: Inhibited is not detected-type |
Decision Table: Detected-Type Error Exclusion
Tests that detected-type wells retain original LIMS instead of receiving error.
| TV | threshold_met | is_patient | lims.code | expected_outcome | Covers |
|---|---|---|---|---|---|
| TV-003-006 | true | true | DETECTED_LOQ | retain DETECTED_LOQ | AC: Detected well retains LIMS |
| TV-003-007 | true | true | NOT_DETECTED | SYSTEMIC_INHIBITON_DETECTED | AC: Non-detected gets error |
| TV-003-008 | true | true | DETECTED_QUANT | retain DETECTED_QUANT | AC: QUANT retained |
End-to-End Scenario Coverage
Scenario: Complete Associated Group Evaluation
| TV | Well | Assoc | Type | Inhibited | LIMS | Positive Obs | Expected Result | Covers |
|---|---|---|---|---|---|---|---|---|
| TV-E2E-001 | W1 | A | Patient | false | OTHER | - | SYSTEMIC_INHIBITON_DETECTED | REQ-001: Positive well in affected group |
| TV-E2E-002 | W2 | A | Patient | true | INHIBITED | - | SYSTEMIC_INHIBITON_DETECTED | REQ-001: Inhibited + threshold |
| TV-E2E-003 | W3 | A | Patient | true | INHIBITED | - | SYSTEMIC_INHIBITON_DETECTED | REQ-001: Inhibited + threshold |
| TV-E2E-004 | W4 | A | Patient | true | INHIBITED | - | SYSTEMIC_INHIBITON_DETECTED | REQ-001: Inhibited + threshold |
| TV-E2E-005 | W5 | A | Patient | true | DETECTED_LOQ | - | retain DETECTED_LOQ | REQ-003: Detected-type excluded |
| TV-E2E-006 | W6 | A | Control | true | INHIBITED | - | null (no error) | REQ-002: Control excluded |
| TV-E2E-007 | W7 | A | Patient | false | OTHER | 1+ | INHN | REQ-001: Has positive obs |
Traceability to Existing Tests
| Requirement | Jira Tests | Automation Status |
|---|---|---|
| REQ-RULES-SYSINH-001 | BT-5096, BT-5097, BT-5098, BT-5099, BT-5104, BT-5107, BT-5684 | Automated (v2: Viracor_PROD.xlsx) |
| REQ-RULES-SYSINH-002 | Pending | Gap |
| REQ-RULES-SYSINH-003 | Pending | Gap |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|---|---|---|---|
| GAP-001 | REQ-RULES-SYSINH-002 | No Jira test ticket for control well exclusion | High | TBD |
| GAP-002 | REQ-RULES-SYSINH-003 | No Jira test ticket for detected-type exclusion | High | TBD |
Remediation Plan
- GAP-001: Create test ticket covering TV-002-001 through TV-002-006 (control well filtering and mixed scenarios)
- GAP-002: Create test ticket covering TV-003-001 through TV-003-008 (detected-type recognition and error exclusion)