Skip to main content
Version: Next

BPEC Rule

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: BPEC rule for validating positive control wells during PCR assay analysis Domain: RULES-BPEC Precedence: After classification, before QC reporting


Statement

The system shall validate positive control wells by detecting unexpected negative classification results and failing such wells with appropriate error codes.

The BPEC (Bad Positive Expected Control) rule extends the existing PEC rule to identify quality control failures. A positive control well that produces a negative classification indicates potential assay or reagent failure. The rule applies across multiple COVID assay variants (Viracor, Quest) and different target configurations (NCOV1/NCOV3 dual or NCOV3 only). BPEC failures are excluded from Westgard/LJ reports but remain visible in standard results.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-BPEC-001Validate positive control classification and fail wells with negative resultsHIGHDraft

Key Integration Points: Classification Engine, Rule Engine, Error Handling Framework, QC Reporting

Rule Summary

PropertyValue
NameBPEC (Bad Positive Expected Control)
ExtendsPEC Rule
TriggersWhen positive control well has classification result
OutputPass validation or set FAILED_POS_WELL / FAILED_POS_TARGET error

Rule Flowchart (Illustrative)

This diagram illustrates the BPEC validation decision flow. It does not specify UI layout or error message formatting.


Definitions

TermDefinition
BPECBad Positive Expected Control - a rule that validates positive control wells have expected classification
PECPositive Expected Control - the parent rule that BPEC extends
Positive Control WellA well containing known positive sample material used to verify assay functionality
ClassificationThe result determination (positive/negative) for a well based on analysis
Westgard/LJ ReportQuality control trending report based on Westgard rules and Levey-Jennings charts
NCOV1, NCOV3COVID-19 target genes used in assay detection

Assumptions

  • Classification results are available for the well before BPEC rule execution
  • Well type (positive control vs sample) has been determined prior to rule evaluation
  • The rule engine evaluates BPEC after classification is complete
  • Error codes integrate with the standard error handling framework

Requirements

Positive Control Validation (REQ-RULES-BPEC-001)

FR-BPEC-001: Validate Positive Control Classification

The system shall fail positive control wells that have a negative classification result.

Inputs/Outputs

DirectionDataSource/Target
InputWell type (positive control)Well record
InputClassification result (positive/negative)Classification Engine
OutputValidation result (pass/fail)Rule Engine
OutputError code (FAILED_POS_WELL or FAILED_POS_TARGET)Error Handling Framework

Acceptance Criteria

Core Validation Logic:

  • Given a positive control well, when the classification result is negative, then the system shall fail the well with an error
  • Given a positive control well, when the classification result is positive, then the system shall pass the BPEC validation
  • The BPEC rule shall function as an extension of the existing PEC rule

Assay Compatibility - Viracor:

  • The BPEC rule shall correctly evaluate Viracor assays

Assay Compatibility - COVID Variants (NCOV1 + NCOV3):

  • The BPEC rule shall correctly evaluate COVID assays with NCOV1 and NCOV3 targets
  • The BPEC rule shall correctly evaluate HCOVID assays with NCOV1 and NCOV3 targets
  • The BPEC rule shall correctly evaluate PCOVID assays with NCOV1 and NCOV3 targets
  • The BPEC rule shall correctly evaluate QCOVID assays with NCOV1 and NCOV3 targets

Assay Compatibility - COVID Variants (NCOV3 Only):

  • The BPEC rule shall correctly evaluate COVID assays with NCOV3 target only
  • The BPEC rule shall correctly evaluate HCOVID assays with NCOV3 target only
  • The BPEC rule shall correctly evaluate PCOVID assays with NCOV3 target only
  • The BPEC rule shall correctly evaluate QCOVID assays with NCOV3 target only

Error Handling and Reporting:

  • The system shall set error code FAILED_POS_WELL for well-level failures and FAILED_POS_TARGET for target-level failures
  • BPEC rule results shall NOT be displayed on the Westgard/LJ report
  • The rule shall apply to multiple COVID assay variants across different customer configurations (Quest, Viracor)

Error Handling

  • Positive control well has negative classification: Set error code FAILED_POS_WELL or FAILED_POS_TARGET
  • BPEC validation failure: Mark the well as failed and prevent further analysis on this control

Trace: Source: 3.0.0-BPEC Rule (Row 1, Objective, Flow Diagram) | Jira: BT-674 (Epic), BT-1360, BT-1575, BT-1576, BT-1577, BT-1578, BT-1579, BT-1580, BT-1581, BT-1582 | Tests: See scenarios | Related: PEC Rule (parent)


Configuration Options

OptionDefaultDescriptionAffects
None identified-No explicit configuration options in source materialREQ-RULES-BPEC-001

[REVIEW REQUIRED: Verify if assay-specific configurations affect BPEC behavior.]


UI Notes (Illustrative)

REQ-RULES-BPEC-001 Display

Flow Diagram:

  • BPEC rule flow additions shown in green boxes in flow diagram
  • Reference: media/image148.png

Error Display:

  • Failed positive control errors displayed with standard error highlighting
  • Error message indicates control validation failure
  • Error is NOT shown on Westgard/LJ reports (excluded from QC trending)

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/BpecRule.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-BPEC-001Validate Positive Control ClassificationTestBpecRule.phpBT-1360, BT-1575, BT-1576, BT-1577, BT-1578, BT-1579, BT-1580, BT-1581, BT-1582Draft

Notes

  • This rule is an extension of the existing PEC (Positive Expected Control) rule
  • Rule applies to multiple COVID assay variants across different customer configurations
  • Supported assay configurations include Viracor and Quest COVID variants
  • BPEC validation is essential for quality control as a positive control well should never produce a negative result

Acceptance Tests

Test: REQ-RULES-BPEC-001

Back to requirement

Test: Negative classification fails positive control

Given: A positive control well exists
And: The well has completed classification
When: The classification result is negative
Then: The system shall fail the well with BPEC error
And: The error code shall be FAILED_POS_WELL or FAILED_POS_TARGET
And: Further analysis on this control shall be prevented

Test: Positive classification passes BPEC

Given: A positive control well exists
And: The well has completed classification
When: The classification result is positive
Then: The system shall pass the BPEC validation
And: The well shall continue to next rule in chain

Test: BPEC excluded from Westgard/LJ report

Given: A positive control well has failed BPEC validation
When: The Westgard/LJ report is generated
Then: The BPEC failure shall NOT appear on the report
And: The failure shall be visible in standard results view

Test: Viracor assay compatibility (BT-1360)

Given: A Viracor assay positive control well exists
When: The BPEC rule is evaluated
Then: The rule shall correctly determine pass/fail based on classification

Test: COVID assay compatibility - NCOV1/NCOV3 (BT-1575)

Given: A COVID assay positive control well exists
And: The assay uses NCOV1 and NCOV3 targets
When: The BPEC rule is evaluated
Then: The rule shall correctly determine pass/fail based on classification

Test: COVID assay compatibility - NCOV3 only (BT-1579)

Given: A COVID assay positive control well exists
And: The assay uses NCOV3 target only
When: The BPEC rule is evaluated
Then: The rule shall correctly determine pass/fail based on classification

Design DocumentRelevant Sections
SDD AlgorithmsBPEC Rule Algorithm

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion - single requirement preserved)
  • UI details are fully demoted to Illustrative section
  • Configuration options are not encoded as requirements
  • Acceptance criteria describe behavior, not UI mechanics
  • Every requirement has acceptance criteria and source traceability
  • Error handling addressed for validation requirements
  • Open questions documented with owners assigned
  • Consolidations documented in Reviewer Notes with reversibility info
  • Module can survive a full UI redesign unchanged
  • Refinements folded into acceptance criteria
  • Traceability matrix is complete

Reviewer Notes

No Consolidation Required

The source file contained a single requirement (REQ-RULES-BPEC-001) that was already at capability-level. No consolidation was performed.

Original ItemSource ReferenceDisposition
REQ-RULES-BPEC-0013.0.0-BPEC Rule (Row 1, Objective, Flow Diagram)Preserved as REQ-RULES-BPEC-001

Rationale: The BPEC rule represents a single, distinct QC validation capability. The multiple assay-specific acceptance criteria (Viracor, COVID variants) are test coverage requirements, not separate capabilities, and were preserved as detailed ACs grouped by assay type per RULES domain guidance.

Reversibility: Source file: output/srs/rules/rule-bpec.md