Skip to main content
Version: 3.0.0

WDCLSC Rule

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: WDCLSC rule for detecting classification discrepancies between pcr.ai and machine classification on Control wells Domain: RULES-WDCLSC Precedence: Part of WD rule family


Statement

The system shall evaluate control wells to detect classification discrepancies between pcr.ai and machine classification systems.

When pcr.ai classification differs from machine classification on a control well, the system flags the well with a discrepancy error. Exemptions apply based on CT threshold and fluorescence levels: wells with final CT at or above the configured maximum are exempt, and wells with maximum fluorescence below the minimum threshold skip rule evaluation entirely.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-WDCLSC-001Detects classification discrepancies on control wellsHIGHDraft
REQ-RULES-WDCLSC-002Exempts wells with final CT at or above max thresholdHIGHDraft
REQ-RULES-WDCLSC-003Skips rule when max fluorescence is below minimum thresholdHIGHDraft

Key Integration Points: pcr.ai classification engine, machine classification output, well analysis workflow, kit configuration

Rule Summary

PropertyValue
NameWDCLSC (Well Discrepant Classification Control)
TriggersControl wells with both pcr.ai and machine classifications
OutputDiscrepancy error on well

Rule Flowchart (Illustrative)

This diagram illustrates the core decision logic. The minimum fluorescence check executes first, followed by CT threshold check, then classification comparison.


Definitions

TermDefinition
Control WellA well designated for quality control purposes, containing known reference material
pcr.ai ClassificationClassification result produced by the pcr.ai analytical engine
Machine ClassificationClassification result produced by the thermocycler instrument
Discrepancy ErrorError flag applied to a well when classifications from different sources do not match
Final CTThe final cycle threshold value determined for an observation
Maximum ReadingThe highest fluorescence value in an observation's readings array

Assumptions

  • Wells being evaluated have been assigned a control well designation
  • Both pcr.ai and machine classification results are available for the well
  • Target configuration includes relevant threshold parameters when exemptions are enabled
  • Observation data includes readings array and final_ct values when applicable

Requirements

Core Rule Behavior (REQ-RULES-WDCLSC-001)

FR-WDCLSC-001: Detect Control Well Classification Discrepancies

The system shall detect classification discrepancies between pcr.ai and machine classification on control wells and flag discrepant wells with a discrepancy error.

Acceptance Criteria

Scope:

  • The rule shall apply only to Control wells
  • The core classification check shall be evaluated last, only if no exemptions apply

Classification Comparison:

  • The rule shall compare pcr.ai classification against machine classification
  • When pcr.ai classification differs from machine classification, the well shall receive a discrepancy error
  • When pcr.ai classification matches machine classification, no discrepancy error shall be raised

Error Handling

  • Classification discrepancy detected: The system shall apply discrepancy error to the well

Trace: Source: 3.0.0-WDCLSC rule (Row 1) | Jira: BT-674 | Tests: See scenarios | Related: REQ-RULES-WDCLSC-002 (exemption), REQ-RULES-WDCLSC-003 (skip condition)


Exemption Conditions (REQ-RULES-WDCLSC-002)

FR-WDCLSC-002: Max CT Threshold Exemption

The system shall exempt control wells from WDCLSC discrepancy error when the observation's final CT value meets or exceeds the configured maximum CT for classification discrepancy threshold.

Acceptance Criteria

Configuration:

  • The system shall use configuration parameter target -> max_ct_for_cls_discrepancy
  • When max_ct_for_cls_discrepancy is null (not configured), the exemption shall not apply

Threshold Logic:

final_ct vs thresholdResult
final_ct > max_ct_for_cls_discrepancyWell does NOT receive discrepancy error
final_ct = max_ct_for_cls_discrepancyWell does NOT receive discrepancy error
final_ct < max_ct_for_cls_discrepancyExemption does not apply (standard rule behavior)

Evaluation Order:

  • The max CT check shall be evaluated second, after the minimum fluorescence check

Trace: Source: 3.0.0-WDCLSC: Consider 'Max CT for CLS Discrepancy' (Row 1, Cases 1-4) | Jira: BT-5227 | Tests: BT-5229, See scenarios | Epic: BT-5215 | Related: REQ-RULES-WDCLSC-001 (parent rule)


Skip Conditions (REQ-RULES-WDCLSC-003)

FR-WDCLSC-003: Minimum Fluorescence Skip Condition

The system shall skip WDCLSC rule evaluation entirely when the maximum fluorescence reading in the observation is below the configured minimum fluorescence to positive threshold.

Acceptance Criteria

Configuration:

  • The system shall use configuration parameter target -> minimum_fluorescence_to_positive

Skip Logic:

max(readings) vs thresholdResult
max(readings) < minimum_fluorescence_to_positiveRule is skipped
max(readings) >= minimum_fluorescence_to_positiveRule proceeds with normal evaluation

Evaluation Order:

  • The minimum fluorescence check shall be evaluated first
  • If the condition is met, the rule shall be SKIPPED entirely

Trace: Source: 3.0.0-WDCLSC: Consider Minimum Fluorescence in WD Rules (Row 1, Cases 1-2) | Jira: BT-5368 | Epic: BT-5367 | Related: REQ-RULES-WDCLSC-001 (parent rule)


Configuration Options

OptionDefaultDescriptionAffects
target -> max_ct_for_cls_discrepancynull (disabled)Maximum CT value threshold; wells with final_ct >= this value are exempt from discrepancy errorREQ-RULES-WDCLSC-002
target -> minimum_fluorescence_to_positive(required)Minimum fluorescence threshold; rule skipped when max reading is below this valueREQ-RULES-WDCLSC-003

Configuration Behavior Summary

ParameterNull/Missing BehaviorSet Behavior
max_ct_for_cls_discrepancyExemption disabled - rule always appliesExempts wells with final_ct >= threshold
minimum_fluorescence_to_positiveN/ASkips rule for wells with max(readings) < threshold

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/WdclscRule

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-WDCLSC-001Detect Control Well Classification DiscrepanciesTestWdclscRule[Pending]Draft
REQ-RULES-WDCLSC-002Max CT Threshold ExemptionTestWdclscRuleBT-5229Draft
REQ-RULES-WDCLSC-003Minimum Fluorescence Skip ConditionTestWdclscRule[Pending]Draft

Notes

  • Rule objective: Checks classification agreement between pcr.ai and machine for Control wells
  • The rule is part of the Well Discrepancy (WD) rule family
  • Design rationale for max CT exemption: Prevents false discrepancy alerts on wells with CT values beyond the meaningful range for classification comparison. High CT values may indicate weak signals where classification differences are expected.
  • Design rationale for minimum fluorescence skip: Prevents the rule from evaluating wells with insufficient fluorescence signal. Wells with readings below the minimum threshold do not have meaningful classification data to compare.

UI Notes (Illustrative)

  • Flow diagram available showing decision logic (image173 in source documentation)
  • Discrepancy errors displayed in well analysis interface

Acceptance Tests

Test: REQ-RULES-WDCLSC-001

Back to requirement

Test: Classification discrepancy detected

Given: A control well A1 with observation O1
And: pcr.ai classification is "Positive"
And: machine classification is "Negative"
And: no exemption conditions apply
When: WDCLSC rule is evaluated
Then: The well shall receive a discrepancy error

Test: Classifications match - no error

Given: A control well A1 with observation O1
And: pcr.ai classification is "Positive"
And: machine classification is "Positive"
When: WDCLSC rule is evaluated
Then: The well shall NOT receive a discrepancy error

Test: REQ-RULES-WDCLSC-002

Back to requirement

Test: No threshold configured - discrepancy error applied

Given: A control well A1 with observation O1
And: dxai classification differs from machine classification
And: observation -> target -> max_ct_for_cls_discrepancy is null
And: observation -> final_ct is 36
When: WDCLSC rule is evaluated
Then: The well shall receive a discrepancy error

Test: Final CT exceeds threshold - exemption applies

Given: A control well A1 with observation O1
And: dxai classification differs from machine classification
And: observation -> target -> max_ct_for_cls_discrepancy is 35
And: observation -> final_ct is 36
When: WDCLSC rule is evaluated
Then: The well shall NOT receive a discrepancy error

Test: Final CT equals threshold (boundary) - exemption applies

Given: A control well A1 with observation O1
And: dxai classification differs from machine classification
And: observation -> target -> max_ct_for_cls_discrepancy is 36
And: observation -> final_ct is 36
When: WDCLSC rule is evaluated
Then: The well shall NOT receive a discrepancy error

Test: Final CT below threshold - discrepancy error applied

Given: A control well A1 with observation O1
And: dxai classification differs from machine classification
And: observation -> target -> max_ct_for_cls_discrepancy is 37
And: observation -> final_ct is 36
When: WDCLSC rule is evaluated
Then: The well shall receive a discrepancy error

Test: REQ-RULES-WDCLSC-003

Back to requirement

Test: Maximum reading below threshold - rule skipped

Given: A control well A1 with observation O1, target T1
And: observation -> target -> minimum_fluorescence_to_positive is 100
And: observation -> readings is [99]
When: WDCLSC rule is evaluated
Then: The rule shall be skipped
And: No discrepancy error shall be applied regardless of classification values

Test: Maximum reading at threshold (boundary) - rule proceeds

Given: A control well A1 with observation O1, target T1
And: observation -> target -> minimum_fluorescence_to_positive is 100
And: observation -> readings is [100]
And: dxai classification differs from machine classification
When: WDCLSC rule is evaluated
Then: The rule shall proceed with evaluation
And: The well shall receive a discrepancy error (if no other exemptions apply)

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion) - N/A: distinct behaviors preserved per RULES guidance
  • 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 I/O, validation, and external system requirements
  • Open questions documented with owners assigned - N/A: no open questions
  • Consolidations documented in Reviewer Notes with reversibility info
  • Module can survive a full UI redesign unchanged
  • Refinements do not introduce new capabilities
  • Traceability matrix is complete

Reviewer Notes

No Consolidation Applied

The three requirements in this domain represent distinct rule behaviors:

RequirementRoleRationale for Preservation
REQ-RULES-WDCLSC-001Core detection logicPrimary rule capability - detects discrepancies
REQ-RULES-WDCLSC-002CT-based exemptionDistinct conditional behavior with specific boundary logic
REQ-RULES-WDCLSC-003Fluorescence-based skipDifferent skip mechanism with different data source

Rationale: Per RULES domain guidance, consolidation is conservative for analytics rules. Each requirement represents a distinct, independently testable condition that affects rule execution flow. The exemption requirements (002, 003) are not variants of the core rule but rather separate conditional behaviors that modify rule execution.

Reversibility: Source requirements preserved 1:1.

Source Reference: output/pilot/rules/rule-wdclsc/rule-wdclsc-restructured.md