Skip to main content
Version: Next

WDCLS Rule Requirements

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: Well Discrepant Classification rule for detecting pcr.ai vs machine classification discrepancies on Patient wells Domain: RULES-WDCLS Precedence: Standard rule execution order


Statement

The system shall detect classification discrepancies between pcr.ai and machine classifications for Patient wells, flagging a discrepancy error when the two classifications differ.

The rule includes two threshold-based conditions that modify its behavior: a CT threshold that suppresses discrepancy errors when the final CT value meets or exceeds the configured maximum, and a fluorescence threshold that skips the rule entirely when the maximum fluorescence reading falls below the configured minimum. These conditions prevent false discrepancy errors on curves with weak signals or high cycle thresholds.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-WDCLS-001Detects classification discrepancies between pcr.ai and machine for Patient wellsHIGHDraft
REQ-RULES-WDCLS-002Suppresses discrepancy errors when final CT >= configured thresholdHIGHDraft
REQ-RULES-WDCLS-003Skips rule when max fluorescence < configured minimum thresholdHIGHDraft

Key Integration Points: pcr.ai classification engine, PCR machine classification output, Target configuration settings, Rule execution framework

Rule Summary

PropertyValue
NameWDCLS
Applies ToPatient wells only
TriggersWhen pcr.ai classification differs from machine classification
OutputFlags discrepancy error on well

Rule Flowchart (Illustrative)

This diagram illustrates the WDCLS rule decision logic. The fluorescence threshold check (REQ-RULES-WDCLS-003) is evaluated first as a pre-condition, followed by classification comparison and CT threshold suppression (REQ-RULES-WDCLS-002).


Definitions

TermDefinition
WDCLSWell Discrepant Classification rule for Patient wells
pcr.ai classificationClassification determined by the AI model for an observation
Machine classificationClassification from the PCR machine for an observation
Final CTThe final cycle threshold value for an observation
Max fluorescence readingThe highest value among all fluorescence readings in an observation
Discrepancy errorAn error flagged when pcr.ai and machine classifications differ

Assumptions

  • The rule applies exclusively to Patient wells (not control wells)
  • Target configuration settings are available and accessible during rule evaluation
  • Observations contain valid pcr.ai classification, machine classification, final CT, and fluorescence readings data
  • Rule execution follows the documented flow sequence

Requirements

Core Discrepancy Detection (REQ-RULES-WDCLS-001)

FR-WDCLS-001: Detect Classification Discrepancies

The system shall detect classification discrepancies between pcr.ai and machine classifications for Patient wells and flag a discrepancy error when they differ.

Acceptance Criteria

Classification Comparison:

  • Compare pcr.ai classification against machine classification for each Patient well
  • Flag a discrepancy error when pcr.ai classification differs from machine classification

Scope:

  • Apply this rule only to Patient wells (not control wells)
  • Respect threshold conditions that may suppress or skip the discrepancy check (per REQ-RULES-WDCLS-002 and REQ-RULES-WDCLS-003)

Trace: Source: 3.0.0-WDCLS rule (Lines 19-39) | Jira: BT-674 (Epic: Rules) | Tests: See scenarios | Related: REQ-RULES-WDCLS-002, REQ-RULES-WDCLS-003


CT Threshold Suppression (REQ-RULES-WDCLS-002)

FR-WDCLS-002: Suppress Discrepancy Errors Based on CT Threshold

The system shall suppress discrepancy errors when the observation's final CT value meets or exceeds the configured max CT for CLS discrepancy threshold.

Acceptance Criteria

CT Threshold Logic:

  • Suppress the discrepancy error when final_ct >= max_ct_for_cls_discrepancy
  • Apply no CT-based suppression when the threshold is null

CT Threshold Truth Table:

max_ct_for_cls_discrepancyobservation.final_ctResult
null36Discrepancy error flagged (threshold not applied)
3536No error (36 > 35, suppressed)
3636No error (36 >= 36, suppressed)
3736Discrepancy error flagged (36 < 37, not suppressed)

Trace: Source: 3.0.0-WDCLS: Consider 'Max CT for CLS Discrepancy' (Lines 42-124) | Jira: BT-5227 | Epic: BT-5215 (Resolve Quest invalid sigmoid issues) | Tests: See scenarios | Related: REQ-RULES-WDCLS-001


Fluorescence Threshold Skip (REQ-RULES-WDCLS-003)

FR-WDCLS-003: Skip Rule Based on Minimum Fluorescence Threshold

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

Acceptance Criteria

Fluorescence Threshold Logic:

  • Skip the rule entirely (not just suppress) when the max reading is below the threshold
  • Use max(observation.readings) - the highest reading value in the observation - for the comparison
  • Execute this check as a pre-condition before the main discrepancy evaluation

Fluorescence Threshold Examples:

minimum_fluorescence_to_positivemax(observation.readings)Result
10099Rule skipped (99 < 100, insufficient fluorescence)
100100Rule evaluates normally (100 >= 100)

Trace: Source: 3.0.0-WDCLS: Consider Minimum Fluorescence in WD Rules (Lines 126-185) | Jira: BT-5368 | Epic: BT-5367 (Allow configuration and use of minimum fl) | Tests: See scenarios | Related: REQ-RULES-WDCLS-001


Configuration Options

OptionDefaultDescriptionAffects
target.max_ct_for_cls_discrepancynullCT threshold above which discrepancy errors are suppressedREQ-RULES-WDCLS-002
target.minimum_fluorescence_to_positivenullMinimum fluorescence threshold for rule to applyREQ-RULES-WDCLS-003

Notes

  • Rule execution flow is documented in the associated flowchart
  • The WDCLS rule may be suppressed by CT threshold (REQ-RULES-WDCLS-002) or skipped by fluorescence threshold (REQ-RULES-WDCLS-003) conditions
  • This rule applies only to Patient wells; control wells have a separate rule (WDCLSC)
  • The rule prevents false discrepancy errors on curves with insufficient fluorescence signal

UI Detail (Illustrative)

Rule Flow Diagram

A process flow diagram exists showing the WDCLS rule logic and decision points for detecting classification discrepancies between pcr.ai and machine classifications for patient wells. Reference: media/image172.png

Jira Integration

  • Epic BT-674 (Rules) - on hold
  • Epic BT-5215 (Resolve Quest invalid sigmoid issues) - in testing
  • Epic BT-5367 (Allow configuration and use of minimum fl) - done
  • Task BT-5227 (Check Max CT for CLS Discrepancy) - regression
  • Task BT-5368 (Consider Minimum Fluorescence in WD Rules) - regression

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/WdclsRule

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-WDCLS-001Detect Classification DiscrepanciesTestWdclsRuleSee testsDraft
REQ-RULES-WDCLS-002Suppress Discrepancy Errors Based on CT ThresholdTestWdclsRuleSee testsDraft
REQ-RULES-WDCLS-003Skip Rule Based on Minimum Fluorescence ThresholdTestWdclsRuleSee testsDraft

Acceptance Tests

Test: REQ-RULES-WDCLS-001

Back to requirement

Test: Discrepancy detected for Patient well

Given: A Patient well exists
And: The pcr.ai classification is "Positive"
And: The machine classification is "Negative"
And: No threshold conditions suppress or skip the rule
When: The WDCLS rule is executed
Then: The system shall flag a discrepancy error on the well

Test: No discrepancy when classifications match

Given: A Patient well exists
And: The pcr.ai classification is "Positive"
And: The machine classification is "Positive"
When: The WDCLS rule is executed
Then: The system shall NOT flag a discrepancy error on the well

Test: Rule not applied to control wells

Given: A Control well exists
And: The pcr.ai classification differs from the machine classification
When: The WDCLS rule is evaluated
Then: The system shall NOT apply this rule to the control well

Test: REQ-RULES-WDCLS-002

Back to requirement

Test: Null threshold - discrepancy error triggered

Given: A Patient well with differing pcr.ai and machine classifications
And: target.max_ct_for_cls_discrepancy is null
And: observation.final_ct is 36
When: The WDCLS rule is executed
Then: The well shall get a discrepancy error

Test: CT exceeds threshold - discrepancy error suppressed

Given: A Patient well with differing pcr.ai and machine classifications
And: target.max_ct_for_cls_discrepancy is 35
And: observation.final_ct is 36
When: The WDCLS rule is executed
Then: The well shall NOT get a discrepancy error

Test: CT equals threshold - discrepancy error suppressed

Given: A Patient well with differing pcr.ai and machine classifications
And: target.max_ct_for_cls_discrepancy is 36
And: observation.final_ct is 36
When: The WDCLS rule is executed
Then: The well shall NOT get a discrepancy error

Test: CT below threshold - discrepancy error triggered

Given: A Patient well with differing pcr.ai and machine classifications
And: target.max_ct_for_cls_discrepancy is 37
And: observation.final_ct is 36
When: The WDCLS rule is executed
Then: The well shall get a discrepancy error

Test: REQ-RULES-WDCLS-003

Back to requirement

Test: Max reading below threshold - rule skipped

Given: A Patient well with observation on target T1
And: target.minimum_fluorescence_to_positive is 100
And: max(observation.readings) is 99
When: The WDCLS rule is evaluated
Then: The rule shall be skipped entirely

Test: Max reading meets threshold - rule evaluates

Given: A Patient well with observation on target T1
And: target.minimum_fluorescence_to_positive is 100
And: max(observation.readings) is 100
When: The WDCLS rule is evaluated
Then: The rule shall proceed with normal evaluation

Design DocumentRelevant Sections
SDD AlgorithmsRule execution framework

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion) - N/A, distinct capabilities 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 I/O, validation, and external system requirements - N/A (rule logic, not I/O)
  • Open questions documented with owners assigned - No open questions identified
  • 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 Performed

The three requirements in this domain were preserved as separate requirements because they represent distinct system capabilities:

RequirementCapabilityJustification
REQ-RULES-WDCLS-001Core discrepancy detectionPrimary rule logic - detects discrepancies
REQ-RULES-WDCLS-002CT threshold suppressionIndependent threshold condition - suppresses errors based on CT
REQ-RULES-WDCLS-003Fluorescence threshold skipIndependent threshold condition - skips rule based on fluorescence

Rationale: Per RULES domain guidance, conservative consolidation is required. These requirements represent analytically distinct behaviors:

  • 001 is the core detection capability
  • 002 and 003 are independent threshold-based conditions that modify rule behavior

Each must be independently testable and traceable for analytics precision.

Reversibility: Source preserved at:

  • Source: output/pilot/rules/rule-wdcls/rule-wdcls-restructured.md
  • SDD: output/pilot/rules/rule-wdcls/sdd/rule-wdcls-design.md