Skip to main content
Version: Next

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 IDTitleConditionsTest VectorsCoverageGapsVersion
REQ-RULES-NECINH-001Detect Inhibition in NEC Wells810100%Nonev3.0.0
REQ-RULES-NECINH-002Missing IC Observation Detection45100%None@V3_1_0
REQ-RULES-NECINH-003IC_MAPPED_BUT_NO_IC_TARGET Error Code Properties99100%None@V3_1_0

Totals: 3 REQs, 21 Conditions, 24 Test Vectors, 100% Coverage


REQ-RULES-NECINH-001: Detect Inhibition in NEC Wells

Input Variables

VariableTypeValid ValuesDescription
well.typestringNEC, PEC, Patient, ...Well control type
obs.ic_ctfloat?null, numeric (0-50)IC target CT value
obs.ic_clsstringPositive, NegativeIC target final classification

Output Variables

VariableTypeDescription
well.error_codestring?BIQUAL_WELL or null
run_target.error_codestring?BICQUAL_TARGET or null

Constants

ConstantValueDescription
IC_CT_THRESHOLD35CT threshold above which IC amplification is considered inhibited

Decision Table: Well Type Filter

TVwell.typerule_triggeredCovers
TV-001-001NECtrueAC: Rule triggers on NEC wells
TV-001-002PECfalseAC: Rule skips non-NEC wells
TV-001-003PatientfalseAC: Rule skips non-NEC wells

Decision Table: CT Threshold Evaluation

TVobs.ic_ctobs.ic_clswell.error_coderun_target.error_codeCovers
TV-001-00425.0PositivenullnullAC: Normal IC (CT << 35)
TV-001-00535.0PositivenullnullAC: Boundary (CT = 35 exactly, no error)
TV-001-00636.0PositiveBIQUAL_WELLBICQUAL_TARGETAC: Inhibited (CT > 35)
TV-001-00745.0PositiveBIQUAL_WELLBICQUAL_TARGETAC: Late IC (CT >> 35)

Decision Table: Negative Classification Handling

TVobs.ic_ctobs.ic_clswell.error_coderun_target.error_codeCovers
TV-001-008nullNegativeBIQUAL_WELLBICQUAL_TARGETAC: Negative classification with null CT
TV-001-009nullPositivenullnullAC: Null CT with Positive classification (edge case)

Decision Table: Combined Conditions

TVobs.ic_ctobs.ic_clswell.error_coderun_target.error_codeCovers
TV-001-01035.0NegativeBIQUAL_WELLBICQUAL_TARGETAC: Boundary CT with Negative classification

Boundary Value Analysis

BoundaryBelowAtAboveCovers
CT = 35TV-001-004 (CT=25)TV-001-005 (CT=35)TV-001-006 (CT=36)Threshold behavior

REQ-RULES-NECINH-002: Missing IC Observation Detection

Version: @V3_1_0 | Jira: BT-6126

Input Variables

VariableTypeValid ValuesDescription
well.ic_mappingbooleantrue, falseWhether the well has an IC control rule mapped (BICQUAL rule assigned)
well.ic_observationobject?null, ObservationThe IC target observation in the well's observation collection
well.resolution_codesstring?null, "BICQUAL", ...Resolution codes applied to the well

Output Variables

VariableTypeDescription
well.error_codestring?IC_MAPPED_BUT_NO_IC_TARGET or null
inhibition_checks_performedbooleanWhether standard IC inhibition checks (REQ-RULES-NECINH-001) proceed

Decision Table: Resolution Code Guard

TVwell.resolution_codeswell.ic_observationwell.error_codeinhibition_checks_performedCovers
TV-002-001"BICQUAL"N/Anull (resolution applied)falseAC: Resolution code bypass skips all checks including missing IC

Decision Table: IC Observation Presence

TVwell.ic_mappingwell.ic_observationwell.error_codeinhibition_checks_performedCovers
TV-002-002YesnullIC_MAPPED_BUT_NO_IC_TARGETfalseAC: IC mapped but no IC target observation raises error and prevents further analysis
TV-002-003YesPresent (CT=25, Pos)nulltrueAC: IC target observation present proceeds to standard inhibition checks
TV-002-004YesPresent (CT=36, Pos)BIQUAL_WELL (from REQ-001)trueAC: IC target observation present, inhibition detected via standard checks

Decision Table: Early Exit Behavior

TVwell.ic_mappingwell.ic_observationrun_target.error_codeCovers
TV-002-005Yesnullnull (no run target error)AC: IC_MAPPED_BUT_NO_IC_TARGET is well-level only, no run target error generated

REQ-RULES-NECINH-003: IC_MAPPED_BUT_NO_IC_TARGET Error Code Properties

Version: @V3_1_0 | Jira: BT-6126

Error Code Property Verification

TVPropertyExpected ValueSourceCovers
TV-003-001error_codeIC_MAPPED_BUT_NO_IC_TARGETMigration + SeederAC: Error code identifier
TV-003-002error_message"IC is mapped but no IC target observation was found."Migration + SeederAC: Error message text
TV-003-003error_levelWell (1)Migration + SeederAC: Well-level error
TV-003-004error_typeError (1)Migration + SeederAC: Error type
TV-003-005does_prevent_analyseYes (1)Migration + SeederAC: Prevents analysis
TV-003-006is_inhibitedNo (0)Migration + SeederAC: Does not indicate inhibition
TV-003-007causes_missing_mixesNo (0)Migration + SeederAC: Does not cause missing mixes

Decision Table: Site-Scoped Provisioning

TVSite Has Error Code?Migration ActionResultCovers
TV-003-008NoInsert new recordError code created for siteAC: Site-scoped provisioning via migration
TV-003-009YesSkip insertNo duplicate recordAC: Idempotent migration (no duplicates)

Error Code Verification

TVError TypeExpected CodePrefix ValidationCovers
TV-001-006Well ErrorBIQUAL_WELLBIQUAL (single I)AC: Well error uses BIQUAL prefix
TV-001-006Run Target ErrorBICQUAL_TARGETBICQUAL (with IC)AC: Run target error uses BICQUAL prefix

Traceability to Existing Tests

RequirementJira TestsAutomation Status
REQ-RULES-NECINH-001BT-5175Automated (2 TVs)
REQ-RULES-NECINH-001BT-1315, BT-1318, BT-1338, BT-1340, BT-1138, BT-1141, BT-1164, BT-2786Manual (8 TVs)
REQ-RULES-NECINH-002BT-6126Pending (@V3_1_0)
REQ-RULES-NECINH-003BT-6126Pending (@V3_1_0)

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All test vectors covered; REQ-002/003 automation pending v3.1.0 deployment--

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
  • REQ-RULES-NECINH-002: Missing IC observation early exit verified — confirms no run target error generated (well-level only)
  • REQ-RULES-NECINH-003: Error code properties verified against migration and seeder source; site-scoped provisioning idempotency covered