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
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-WDCLSC-001 | Detects classification discrepancies on control wells | HIGH | Draft |
| REQ-RULES-WDCLSC-002 | Exempts wells with final CT at or above max threshold | HIGH | Draft |
| REQ-RULES-WDCLSC-003 | Skips rule when max fluorescence is below minimum threshold | HIGH | Draft |
Key Integration Points: pcr.ai classification engine, machine classification output, well analysis workflow, kit configuration
Rule Summary
| Property | Value |
|---|---|
| Name | WDCLSC (Well Discrepant Classification Control) |
| Triggers | Control wells with both pcr.ai and machine classifications |
| Output | Discrepancy 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
| Term | Definition |
|---|---|
| Control Well | A well designated for quality control purposes, containing known reference material |
| pcr.ai Classification | Classification result produced by the pcr.ai analytical engine |
| Machine Classification | Classification result produced by the thermocycler instrument |
| Discrepancy Error | Error flag applied to a well when classifications from different sources do not match |
| Final CT | The final cycle threshold value determined for an observation |
| Maximum Reading | The 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_discrepancyis null (not configured), the exemption shall not apply
Threshold Logic:
| final_ct vs threshold | Result |
|---|---|
final_ct > max_ct_for_cls_discrepancy | Well does NOT receive discrepancy error |
final_ct = max_ct_for_cls_discrepancy | Well does NOT receive discrepancy error |
final_ct < max_ct_for_cls_discrepancy | Exemption 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 threshold | Result |
|---|---|
max(readings) < minimum_fluorescence_to_positive | Rule is skipped |
max(readings) >= minimum_fluorescence_to_positive | Rule 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
| Option | Default | Description | Affects |
|---|---|---|---|
target -> max_ct_for_cls_discrepancy | null (disabled) | Maximum CT value threshold; wells with final_ct >= this value are exempt from discrepancy error | REQ-RULES-WDCLSC-002 |
target -> minimum_fluorescence_to_positive | (required) | Minimum fluorescence threshold; rule skipped when max reading is below this value | REQ-RULES-WDCLSC-003 |
Configuration Behavior Summary
| Parameter | Null/Missing Behavior | Set Behavior |
|---|---|---|
max_ct_for_cls_discrepancy | Exemption disabled - rule always applies | Exempts wells with final_ct >= threshold |
minimum_fluorescence_to_positive | N/A | Skips rule for wells with max(readings) < threshold |
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/WdclscRule |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-WDCLSC-001 | Detect Control Well Classification Discrepancies | Test | WdclscRule | [Pending] | Draft |
| REQ-RULES-WDCLSC-002 | Max CT Threshold Exemption | Test | WdclscRule | BT-5229 | Draft |
| REQ-RULES-WDCLSC-003 | Minimum Fluorescence Skip Condition | Test | WdclscRule | [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
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
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
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:
| Requirement | Role | Rationale for Preservation |
|---|---|---|
| REQ-RULES-WDCLSC-001 | Core detection logic | Primary rule capability - detects discrepancies |
| REQ-RULES-WDCLSC-002 | CT-based exemption | Distinct conditional behavior with specific boundary logic |
| REQ-RULES-WDCLSC-003 | Fluorescence-based skip | Different 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