Skip to main content
Version: Next

STD: Well Discrepant Classification Rule (WDCLS)

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


Overview

This document specifies tests for the WDCLS (Well Discrepant Classification) rule using decision tables and test vectors. The rule detects classification discrepancies between pcr.ai and machine classifications for Patient wells.

Rule Characteristics:

  • Pure business logic (no UI)
  • Applies exclusively to Patient wells (not controls)
  • Two threshold-based modifiers (CT suppression, fluorescence skip)
  • Ordered evaluation: fluorescence check -> classification comparison -> CT check

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-WDCLS-001Core Discrepancy Detection68100%None
REQ-RULES-WDCLS-002CT Threshold Suppression46100%None
REQ-RULES-WDCLS-003Fluorescence Threshold Skip35100%None

Totals: 3 REQs, 13 Conditions, 19 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
well.typestringPatient, ControlWell type (rule applies only to Patient)
obs.pcrai_clsstringPositive, Negative, Ambiguous, ...pcr.ai classification
obs.machine_clsstringPositive, Negative, Ambiguous, ...Machine classification
obs.final_ctfloatnumeric, nullFinal cycle threshold value
max(obs.readings)floatnumericMaximum fluorescence reading value
target.max_ct_for_cls_discrepancyfloat?null, numericCT threshold for suppression
target.minimum_fluorescence_to_positivefloat?null, numericMinimum fluorescence threshold

Output Variables

VariableTypeDescription
discrepancy_errorboolWhether discrepancy error is flagged on well
rule_skippedboolWhether rule was skipped due to fluorescence threshold
error_suppressedboolWhether error was suppressed due to CT threshold

REQ-RULES-WDCLS-001: Core Discrepancy Detection

Decision Table: Well Type Filter

TVwell.typerule_appliesCovers
TV-001-001PatienttrueAC: Rule applies to Patient wells
TV-001-002ControlfalseAC: Rule not applied to control wells

Decision Table: Classification Comparison

TVwell.typepcrai_clsmachine_clsthresholds_metdiscrepancy_errorCovers
TV-001-003PatientPositiveNegativetruetrueAC: Different classifications = error
TV-001-004PatientNegativePositivetruetrueAC: Different classifications = error
TV-001-005PatientPositivePositivetruefalseAC: Same classifications = no error
TV-001-006PatientNegativeNegativetruefalseAC: Same classifications = no error
TV-001-007PatientAmbiguousPositivetruetrueAC: Different classifications = error
TV-001-008PatientAmbiguousAmbiguoustruefalseAC: Same classifications = no error

REQ-RULES-WDCLS-002: CT Threshold Suppression

Decision Table: CT Threshold Logic

TVmax_ct_for_cls_discrepancyfinal_ctclassifications_differdiscrepancy_errorCovers
TV-002-001null36truetrueAC: Null threshold = no suppression
TV-002-0023536truefalseAC: CT > threshold = suppressed
TV-002-0033636truefalseAC: CT == threshold = suppressed (boundary)
TV-002-0043736truetrueAC: CT < threshold = not suppressed
TV-002-0053534truetrueAC: CT below threshold = not suppressed
TV-002-006null36falsefalseAC: No discrepancy = no error regardless

REQ-RULES-WDCLS-003: Fluorescence Threshold Skip

Decision Table: Fluorescence Threshold Logic

TVmin_fluorescence_to_positivemax_readingrule_skippedCovers
TV-003-00110099trueAC: Below threshold = rule skipped
TV-003-002100100falseAC: Equals threshold = rule evaluates (boundary)
TV-003-003100101falseAC: Above threshold = rule evaluates
TV-003-004null50falseAC: Null threshold = rule evaluates
TV-003-005null150falseAC: Null threshold = rule evaluates

Integrated Scenarios

Decision Table: Full Rule Evaluation Flow

These vectors verify the complete evaluation path through all three requirements.

TVwell.typemax_readingmin_fluorpcrai_clsmachine_clsfinal_ctmax_ctdiscrepancy_errorreasonCovers
TV-INT-001Control150100PosNeg30nullfalseControl well excludedREQ-001
TV-INT-002Patient50100PosNeg30nullfalseFluorescence too lowREQ-003
TV-INT-003Patient150100PosPos30nullfalseClassifications matchREQ-001
TV-INT-004Patient150100PosNeg30nulltrueDiscrepancy detectedREQ-001
TV-INT-005Patient150100PosNeg4035falseCT above thresholdREQ-002
TV-INT-006Patient150100PosNeg3035trueCT below thresholdREQ-002
TV-INT-007Patient150nullPosNeg40nulltrueBoth thresholds nullREQ-001,002,003
TV-INT-008Patient100100PosNeg3535falseBoth at boundaryREQ-002,003

Boundary Value Analysis

CT Threshold Boundaries

TVScenariomax_ctfinal_ctExpectedCovers
TV-BND-001CT exactly at threshold35.035.0SuppressedREQ-002 boundary
TV-BND-002CT just below threshold35.034.99Error flaggedREQ-002 boundary
TV-BND-003CT just above threshold35.035.01SuppressedREQ-002 boundary

Fluorescence Threshold Boundaries

TVScenariomin_fluormax_readingExpectedCovers
TV-BND-004Reading exactly at threshold100100EvaluatesREQ-003 boundary
TV-BND-005Reading just below threshold10099.99SkippedREQ-003 boundary
TV-BND-006Reading just above threshold100100.01EvaluatesREQ-003 boundary

Automation Mapping

Test Vector RangeTest FileMethodAutomation Status
TV-001-*tests/Unit/Rules/WdclsRuleTest.phpTM-APIAutomated
TV-002-*tests/Unit/Rules/WdclsRuleTest.phpTM-APIAutomated
TV-003-*tests/Unit/Rules/WdclsRuleTest.phpTM-APIAutomated
TV-INT-*tests/Unit/Rules/WdclsRuleTest.phpTM-APIAutomated
TV-BND-*tests/Unit/Rules/WdclsRuleTest.phpTM-APIAutomated

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-WDCLS-001BT-5133, BT-5221, BT-5238Existing
REQ-RULES-WDCLS-002BT-5229, BT-5237Existing
REQ-RULES-WDCLS-003BT-5369, BT-5700Existing

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
None-All requirements have Jira test coverage--

Verification Notes

  1. REQ-RULES-WDCLS-001: Core discrepancy detection covered by BT-5133 (v3 Quest_ez_pp_v30.xlsx), BT-5221, BT-5238 (v2 Quest_220_beta15.xlsx)
  2. REQ-RULES-WDCLS-002: CT threshold suppression covered by BT-5229, BT-5237 (Quest configs)
  3. REQ-RULES-WDCLS-003: Fluorescence threshold skip covered by BT-5369 (Idea_config 3.0.1.xlsx), BT-5700 (kit-configuration.xlsx)

All test vectors map to existing Jira test tickets. No new test tickets required.