Skip to main content
Version: 3.0.1

STD: WDCT Rule (CT Discrepancy Detection)

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


Overview

This document specifies tests for the WDCT rule using decision tables and test vectors. The rule detects CT (Cycle Threshold) discrepancies between pcr.ai-calculated values and machine-reported CT values for Patient wells, flagging wells where the absolute difference exceeds the configured ct_discrepancy_delta threshold.

Rule Characteristics:

  • Pure business logic (no UI)
  • Sequential condition evaluation (fluorescence -> classification -> max CT threshold -> CT difference)
  • Two configuration-based modifiers (suppression and skip)
  • Patient wells only (Control wells delegated to WDCTC)

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-WDCT-001CT Discrepancy Detection1117100%None
REQ-RULES-WDCT-002Max CT Threshold Suppression45100%None
REQ-RULES-WDCT-003Fluorescence-Based Skip34100%None

Totals: 3 REQs, 18 Conditions, 26 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
well.typestringPatient, ControlWell classification type
obs.classificationstringPositive, Negative, AmbiguousObservation classification result
obs.pcrai_ctfloatnumericCT value calculated by pcr.ai algorithm
obs.machine_ctfloatnumericCT value reported by thermocycler instrument
obs.final_ctfloatnumericAuthoritative CT value for downstream analysis
obs.max_readingfloatnumericmax(observation.readings) - highest fluorescence reading
target.ct_discrepancy_deltafloat?null, numericConfigurable threshold for CT difference detection; null disables rule for target
target.max_ct_for_ct_discrepancyfloat?null, numericMaximum CT value above which CT discrepancy checks are suppressed
target.minimum_fluorescence_to_positivefloatnumericMinimum fluorescence threshold for rule evaluation

Output Variables

VariableTypeDescription
well.error_codestring?CTDISC_WELL if discrepancy detected, null otherwise
rule_evaluatedboolWhether the rule completed evaluation (false if skipped)
error_suppressedboolWhether an error was suppressed by threshold

REQ-RULES-WDCT-001: CT Discrepancy Detection

Decision Table: Well Type Filter

TVwell.typerule_appliesCovers
TV-001-001PatienttrueAC: Apply rule to Patient wells
TV-001-002ControlfalseAC: Delegate control wells to WDCTC

Decision Table: Classification Handling

TVobs.classificationct_differror_codeCovers
TV-001-003Negative5.0nullAC: Skip discrepancy detection for negative classification
TV-001-004Positive5.0CTDISC_WELLAC: Compare CTs for non-negative classification
TV-001-005Ambiguous5.0CTDISC_WELLAC: Compare CTs for non-negative classification

Decision Table: CT Difference Threshold (Default ct_discrepancy_delta=2)

Note: These test vectors assume ct_discrepancy_delta=2 (the default threshold). See "Configurable Threshold" table below for variable threshold tests.

TVobs.pcrai_ctobs.machine_ctabs_differror_codeCovers
TV-001-00625.028.53.5CTDISC_WELLAC: Flag when abs diff > threshold
TV-001-00725.022.03.0CTDISC_WELLAC: Flag when abs diff > threshold (negative direction)
TV-001-00825.026.51.5nullAC: No error when abs diff <= threshold
TV-001-00925.027.02.0nullAC: No error when abs diff = threshold (boundary)
TV-001-01025.027.012.01CTDISC_WELLAC: Flag when abs diff > threshold (boundary exceeded)

Decision Table: Configurable Threshold (ct_discrepancy_delta)

TVct_discrepancy_deltaobs.pcrai_ctobs.machine_ctct_differror_codeCovers
TV-001-011null25.035.010.0nullAC: Null threshold disables rule for target
TV-001-012325.027.52.5nullAC: No error when diff within threshold=3
TV-001-013325.028.53.5CTDISC_WELLAC: Flag when diff exceeds threshold=3
TV-001-014525.029.94.9nullAC: No error when diff within larger threshold=5
TV-001-015525.030.15.1CTDISC_WELLAC: Flag when diff exceeds larger threshold=5
TV-001-016225.027.02.0nullAC: No error when diff equals threshold (boundary)
TV-001-017225.027.012.01CTDISC_WELLAC: Flag when diff just exceeds threshold (boundary)

REQ-RULES-WDCT-002: Max CT Threshold Suppression

Decision Table: Suppression Logic

TVmax_ct_for_ct_discrepancyobs.final_ctct_differror_codeerror_suppressedCovers
TV-002-001null36.05.0CTDISC_WELLfalseAC: Null threshold = no suppression
TV-002-0023536.05.0nulltrueAC: final_ct > threshold = suppressed
TV-002-0033636.05.0nulltrueAC: final_ct = threshold = suppressed (>=)
TV-002-0043736.05.0CTDISC_WELLfalseAC: final_ct < threshold = not suppressed
TV-002-0053534.05.0CTDISC_WELLfalseAC: final_ct below threshold = not suppressed

REQ-RULES-WDCT-003: Fluorescence-Based Skip

Decision Table: Minimum Fluorescence Check

TVminimum_fluorescence_to_positiveobs.max_readingrule_evaluatedCovers
TV-003-00110099falseAC: Skip rule when max reading < threshold
TV-003-002100100trueAC: Evaluate rule when max reading = threshold
TV-003-003100150trueAC: Evaluate rule when max reading > threshold
TV-003-00410050falseAC: Skip to prevent false discrepancy errors on low fluorescence

Combined Evaluation: End-to-End Scenarios

The following decision table tests the complete rule evaluation path, verifying the execution order: fluorescence check (003) -> classification -> max CT threshold (002) -> CT difference (001).

Decision Table: Full Evaluation Path

TVmax_readingmin_fluorclassificationfinal_ctmax_ct_threshpcrai_ctmachine_ctrule_evaluatederror_suppressederror_codeCovers
TV-E2E-00150100Positive25.0null25.030.0falsefalsenullAC: Fluorescence skip takes precedence
TV-E2E-002150100Negative25.0null25.030.0truefalsenullAC: Negative classification ends without error
TV-E2E-003150100Positive36.03525.030.0truetruenullAC: Max CT threshold suppresses error
TV-E2E-004150100Positive34.03525.030.0truefalseCTDISC_WELLAC: All checks pass, error flagged
TV-E2E-005150100Positive34.0null25.026.0truefalsenullAC: All checks pass, within tolerance

Automation Status

REQ IDAutomation StatusNotes
REQ-RULES-WDCT-001AutomatedData-driven test with parameterized inputs
REQ-RULES-WDCT-002AutomatedData-driven test with parameterized inputs
REQ-RULES-WDCT-003AutomatedData-driven test with parameterized inputs

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-WDCT-001BT-5133, BT-5305, BT-5244, BT-5328, BT-5261, BT-5700, BT-5369Existing
REQ-RULES-WDCT-002BT-5308, BT-5307Existing
REQ-RULES-WDCT-003BT-5368, BT-5367Existing

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All acceptance criteria have corresponding test vectors--

Remediation Plan

No gaps identified. All requirements have:

  • Complete condition coverage via decision tables
  • Boundary value testing for thresholds
  • End-to-end integration scenarios
  • Traceability to existing Jira test tickets