STD: Negative Control Inhibition Rule (BICQUAL)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-negative-control-inhibition.md
Rule Name: BICQUAL
Domain: RULES-NECINH
Overview
This document specifies tests for the Negative Control Inhibition rule (BICQUAL) using decision tables and test vectors. The rule detects inhibition in Negative Extraction Control (NEC) wells by evaluating Internal Control (IC) amplification results and generates appropriate error codes when inhibition is detected.
Rule Characteristics:
- Pure business logic (no UI)
- Simple threshold evaluation (CT > 35)
- Classification-based fallback (Negative with null CT)
- Dual error output (well-level and run-target-level)
Test Method: TM-API (per Test Plan §3.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-NECINH-001 | Detect Inhibition in NEC Wells | 8 | 10 | 100% | None |
Totals: 1 REQ, 8 Conditions, 10 Test Vectors, 100% Coverage
REQ-RULES-NECINH-001: Detect Inhibition in NEC Wells
| Variable | Type | Valid Values | Description |
|---|
well.type | string | NEC, PEC, Patient, ... | Well control type |
obs.ic_ct | float? | null, numeric (0-50) | IC target CT value |
obs.ic_cls | string | Positive, Negative | IC target final classification |
Output Variables
| Variable | Type | Description |
|---|
well.error_code | string? | BIQUAL_WELL or null |
run_target.error_code | string? | BICQUAL_TARGET or null |
Constants
| Constant | Value | Description |
|---|
IC_CT_THRESHOLD | 35 | CT threshold above which IC amplification is considered inhibited |
Decision Table: Well Type Filter
| TV | well.type | rule_triggered | Covers |
|---|
| TV-001-001 | NEC | true | AC: Rule triggers on NEC wells |
| TV-001-002 | PEC | false | AC: Rule skips non-NEC wells |
| TV-001-003 | Patient | false | AC: Rule skips non-NEC wells |
Decision Table: CT Threshold Evaluation
| TV | obs.ic_ct | obs.ic_cls | well.error_code | run_target.error_code | Covers |
|---|
| TV-001-004 | 25.0 | Positive | null | null | AC: Normal IC (CT << 35) |
| TV-001-005 | 35.0 | Positive | null | null | AC: Boundary (CT = 35 exactly, no error) |
| TV-001-006 | 36.0 | Positive | BIQUAL_WELL | BICQUAL_TARGET | AC: Inhibited (CT > 35) |
| TV-001-007 | 45.0 | Positive | BIQUAL_WELL | BICQUAL_TARGET | AC: Late IC (CT >> 35) |
Decision Table: Negative Classification Handling
| TV | obs.ic_ct | obs.ic_cls | well.error_code | run_target.error_code | Covers |
|---|
| TV-001-008 | null | Negative | BIQUAL_WELL | BICQUAL_TARGET | AC: Negative classification with null CT |
| TV-001-009 | null | Positive | null | null | AC: Null CT with Positive classification (edge case) |
Decision Table: Combined Conditions
| TV | obs.ic_ct | obs.ic_cls | well.error_code | run_target.error_code | Covers |
|---|
| TV-001-010 | 35.0 | Negative | BIQUAL_WELL | BICQUAL_TARGET | AC: Boundary CT with Negative classification |
Boundary Value Analysis
| Boundary | Below | At | Above | Covers |
|---|
| CT = 35 | TV-001-004 (CT=25) | TV-001-005 (CT=35) | TV-001-006 (CT=36) | Threshold behavior |
Error Code Verification
| TV | Error Type | Expected Code | Prefix Validation | Covers |
|---|
| TV-001-006 | Well Error | BIQUAL_WELL | BIQUAL (single I) | AC: Well error uses BIQUAL prefix |
| TV-001-006 | Run Target Error | BICQUAL_TARGET | BICQUAL (with IC) | AC: Run target error uses BICQUAL prefix |
Traceability to Existing Tests
| Requirement | Jira Tests | Automation Status |
|---|
| REQ-RULES-NECINH-001 | BT-5175 | Automated (2 TVs) |
| REQ-RULES-NECINH-001 | BT-1315, BT-1318, BT-1338, BT-1340, BT-1138, BT-1141, BT-1164, BT-2786 | Manual (8 TVs) |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| None | - | All test vectors covered by existing automation | - | - |
Coverage Notes
- All acceptance criteria from SRS are covered by test vectors
- Boundary value at CT=35 explicitly tested (TV-001-005)
- Error code prefix validation included
- Both well-level and run-target-level outputs verified