Skip to main content
Version: 3.0.1

STD: BPEC Rule (Bad Positive Expected Control)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-bpec.md Rule Name: BPEC Domain: RULES-BPEC


Overview

This document specifies tests for the BPEC (Bad Positive Expected Control) rule using decision tables and test vectors. The rule validates positive control wells by detecting unexpected negative classification results and failing such wells with appropriate error codes.

Rule Characteristics:

  • Pure business logic (no UI)
  • Extends PEC (Positive Expected Control) rule
  • Binary classification validation (positive/negative)
  • Assay-agnostic logic with multi-assay compatibility
  • QC report exclusion behavior

Test Method: TM-API (per Test Plan Section 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 VectorsCoverageGaps
REQ-RULES-BPEC-001Validate Positive Control Classification1822100%None

Totals: 1 REQ, 18 Conditions, 22 Test Vectors, 100% Coverage


REQ-RULES-BPEC-001: Validate Positive Control Classification

Input Variables

VariableTypeValid ValuesDescription
well.typestringpositive_control, sample, NEC, ...Well type classification
well.classificationstringpositive, negativeClassification result from engine
assay.typestringViracor, COVID, HCOVID, PCOVID, QCOVIDAssay type identifier
assay.targetsarray[NCOV1, NCOV3], [NCOV3]Target genes for COVID assays
error.levelstringwell, targetGranularity of failure

Output Variables

VariableTypeDescription
validation.resultstringpass, fail
well.error_codestring?FAILED_POS_WELL, FAILED_POS_TARGET, or null
well.analysis_blockedboolWhether further analysis is prevented
report.westgard_visibleboolWhether result appears in Westgard/LJ report

Decision Table: Core Classification Validation

TVwell.typewell.classificationvalidation.resulterror_assignedCovers
TV-001-001positive_controlnegativefailtrueAC: Negative classification fails well
TV-001-002positive_controlpositivepassfalseAC: Positive classification passes BPEC
TV-001-003samplenegativeN/AfalseAC: Rule only applies to positive controls
TV-001-004NECnegativeN/AfalseAC: Rule only applies to positive controls

Decision Table: Error Code Assignment

TVerror.levelwell.classificationwell.error_codeCovers
TV-001-005wellnegativeFAILED_POS_WELLAC: Well-level failure code
TV-001-006targetnegativeFAILED_POS_TARGETAC: Target-level failure code
TV-001-007wellpositivenullAC: No error on pass
TV-001-008targetpositivenullAC: No error on pass

Decision Table: Analysis Blocking

TVvalidation.resultwell.analysis_blockedCovers
TV-001-009failtrueAC: Failure prevents further analysis
TV-001-010passfalseAC: Pass allows rule chain to continue

Decision Table: Viracor Assay Compatibility

TVassay.typewell.classificationvalidation.resultCovers
TV-001-011ViracornegativefailAC: Viracor negative fails
TV-001-012ViracorpositivepassAC: Viracor positive passes

Decision Table: COVID Assay Compatibility (NCOV1 + NCOV3)

TVassay.typeassay.targetswell.classificationvalidation.resultCovers
TV-001-013COVID[NCOV1, NCOV3]negativefailAC: COVID dual-target negative fails
TV-001-014COVID[NCOV1, NCOV3]positivepassAC: COVID dual-target positive passes
TV-001-015HCOVID[NCOV1, NCOV3]negativefailAC: HCOVID dual-target negative fails
TV-001-016PCOVID[NCOV1, NCOV3]negativefailAC: PCOVID dual-target negative fails
TV-001-017QCOVID[NCOV1, NCOV3]negativefailAC: QCOVID dual-target negative fails

Decision Table: COVID Assay Compatibility (NCOV3 Only)

TVassay.typeassay.targetswell.classificationvalidation.resultCovers
TV-001-018COVID[NCOV3]negativefailAC: COVID NCOV3-only negative fails
TV-001-019HCOVID[NCOV3]negativefailAC: HCOVID NCOV3-only negative fails
TV-001-020PCOVID[NCOV3]negativefailAC: PCOVID NCOV3-only negative fails
TV-001-021QCOVID[NCOV3]negativefailAC: QCOVID NCOV3-only negative fails

Decision Table: Westgard/LJ Report Exclusion

TVvalidation.resultreport.westgard_visiblestandard_results_visibleCovers
TV-001-022failfalsetrueAC: BPEC failures excluded from Westgard/LJ but visible in standard results

Test File Locations

RequirementTest FileMethodAutomation Status
REQ-RULES-BPEC-001tests/Unit/Rules/BpecRuleTest.phpTM-APIAutomated

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-BPEC-001BT-1360, BT-1575, BT-1576, BT-1577, BT-1578, BT-1579, BT-1580, BT-1581, BT-1582Existing

Jira Test Mapping

Jira TicketTest Vectors CoveredDescription
BT-1360TV-001-011, TV-001-012Viracor assay compatibility
BT-1575TV-001-013, TV-001-014COVID dual-target (NCOV1+NCOV3)
BT-1576TV-001-015HCOVID dual-target (NCOV1+NCOV3)
BT-1577TV-001-016PCOVID dual-target (NCOV1+NCOV3)
BT-1578TV-001-017QCOVID dual-target (NCOV1+NCOV3)
BT-1579TV-001-018COVID NCOV3-only
BT-1580TV-001-019HCOVID NCOV3-only
BT-1581TV-001-020PCOVID NCOV3-only
BT-1582TV-001-021QCOVID NCOV3-only

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All acceptance criteria covered by test vectors--

Coverage Notes

  • Core classification logic (TV-001-001 through TV-001-004) exercises the fundamental pass/fail decision
  • Error code assignment (TV-001-005 through TV-001-008) verifies both well-level and target-level error handling
  • Assay compatibility tests (TV-001-011 through TV-001-021) ensure rule works across all supported assay configurations
  • Report exclusion (TV-001-022) verifies the QC reporting constraint