Skip to main content
Version: 3.0.0

STD: Reporting Quant as Qual Rule (RQUANTASQUAL)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-reporting-quant-as-qual.md Rule Name: RQUANTASQUAL Domain: RULES-RQUANTQUAL


Overview

This document specifies tests for the Reporting Quant as Qual rule using decision tables and test vectors. The rule converts quantitative PCR results (CT/Quantity values) into qualitative outcomes (Detected/Not Detected) by comparing against configured Limit of Detection (LoD) thresholds.

Rule Characteristics:

  • Pure business logic (no UI)
  • Threshold comparison (inclusive boundary)
  • Specimen-type-based threshold selection (when enabled)
  • Fallback to last-modified reporting configuration (when specimen matching disabled)

Test Method: TM-API (per Test Plan §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-RQUANTQUAL-001Qualitative Outcome Determination46100%None
REQ-RULES-RQUANTQUAL-002Specimen-Based Threshold Selection610100%None

Totals: 2 REQs, 10 Conditions, 16 Test Vectors, 100% Coverage


REQ-RULES-RQUANTQUAL-001: Qualitative Outcome Determination

Input Variables

VariableTypeValid ValuesDescription
obs.quantityfloat≥ 0Measured quantity from PCR analysis
obs.ct_valuefloat> 0Measured CT (cycle threshold) value
config.lod_thresholdfloat> 0Configured Limit of Detection (upper boundary)

Output Variables

VariableTypeDescription
well.outcomestringQualitative result: "Detected" or "Not Detected"

Decision Table: Threshold Comparison

Tests the core quant-as-qual conversion logic. The LoD boundary is inclusive (>= yields Detected).

TVobs.quantityconfig.lod_thresholdexpected_outcomeCovers
TV-001-00110050DetectedAC: Quantity above threshold
TV-001-0025050DetectedAC: Quantity at threshold (boundary inclusive)
TV-001-0033050Not DetectedAC: Quantity below threshold

Decision Table: CT Value Boundary

Tests boundary behavior using CT values at the LoD threshold.

TVobs.ct_valueconfig.lod_thresholdexpected_outcomeCovers
TV-001-0042530DetectedAC: CT below threshold (lower CT = higher quantity)
TV-001-0053030DetectedAC: CT at boundary (inclusive)
TV-001-0063530Not DetectedAC: CT above threshold (higher CT = lower quantity)

REQ-RULES-RQUANTQUAL-002: Specimen-Based Threshold Selection

Input Variables

VariableTypeValid ValuesDescription
config.use_sample_typebooltrue, falseEnable specimen-type-specific threshold selection
well.specimen_typestringPlasma, Serum, ...Sample matrix category
reporting.specimen_typestringPlasma, Serum, ...Reporting configuration specimen type
reporting.lod_thresholdfloat> 0LoD threshold for the reporting configuration
reporting.last_modifiedtimestampdatetimeLast modification timestamp of reporting config

Output Variables

VariableTypeDescription
selected_lodfloatThe LoD threshold selected for comparison
well.outcomestringQualitative result based on selected threshold

Decision Table: Specimen Type Enabled

When use_sample_type is enabled, the system selects the LoD threshold matching the well's specimen type.

TVuse_sample_typewell.specimenplasma_lodserum_lodobs.ctexpected_lodexpected_outcomeCovers
TV-002-001truePlasma30102530Not DetectedAC: Plasma well uses Plasma LoD (25 < 30)
TV-002-002trueSerum30102510DetectedAC: Serum well uses Serum LoD (25 >= 10)
TV-002-003truePlasma30103530Not DetectedAC: CT above Plasma threshold
TV-002-004trueSerum3010510DetectedAC: CT well below Serum threshold

Decision Table: Specimen Type Disabled (Legacy Mode)

When use_sample_type is disabled, the system uses the last-modified reporting configuration regardless of specimen type.

TVuse_sample_typeplasma_last_modserum_last_modwell.specimenobs.ctexpected_lodexpected_outcomeCovers
TV-002-005false2023-11-08 00:00:002023-11-08 00:01:00Plasma2510 (Serum)DetectedAC: Uses last modified (Serum newer)
TV-002-006false2023-11-08 00:01:002023-11-08 00:00:00Serum2530 (Plasma)Not DetectedAC: Uses last modified (Plasma newer)

Decision Table: All Wells Same Threshold (Disabled Mode)

When sample type is disabled, all wells in the same run use the same LoD threshold.

TVuse_sample_typelast_mod_lodwell_A.specimenwell_B.specimenobs.ctwell_A_outcomewell_B_outcomeCovers
TV-002-007false10PlasmaSerum25DetectedDetectedAC: Same threshold for all wells
TV-002-008false30PlasmaSerum25Not DetectedNot DetectedAC: Uniform threshold application

Decision Table: Rule Mapping Requirement

Specimen-based threshold selection requires rule mappings to be configured per specimen type.

TVuse_sample_typeplasma_mappingserum_mappingwell.specimenrule_appliesCovers
TV-002-009trueconfiguredconfiguredPlasmatrueAC: Rule mapping exists
TV-002-010trueconfiguredmissingSerumfalseAC: Rule mapping required per specimen

Traceability to Existing Tests

RequirementJira TestsAutomation Status
REQ-RULES-RQUANTQUAL-001BT-5204Automated (3 TVs)
REQ-RULES-RQUANTQUAL-002BT-4283Manual

Gap Analysis

Identified Gaps

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

Coverage Notes

  1. REQ-RULES-RQUANTQUAL-001: Core threshold comparison is fully covered by TV-001-001 through TV-001-006, including boundary conditions.

  2. REQ-RULES-RQUANTQUAL-002: Specimen-based selection is covered by:

    • Enabled mode scenarios (TV-002-001 through TV-002-004)
    • Disabled/legacy mode scenarios (TV-002-005 through TV-002-008)
    • Rule mapping requirement (TV-002-009, TV-002-010)