Skip to main content
Version: Next

STD: QSSC Rule (Quantify Using Stored Standard Curve)

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


Overview

This document specifies tests for the QSSC rule using decision tables and test vectors. The rule calculates quantity values from Cycle Threshold (CT) measurements using stored standard curve parameters, with support for resolution code bypass and error handling for missing configuration.

Rule Characteristics:

  • Pure business logic (no UI)
  • Three processing paths: resolution code bypass, quantity calculation, error handling
  • Exponential formula: qty = multiplier * 10^((ct - intercept) / slope)
  • Precision-sensitive calculations (full CT decimal accuracy required)

Test Method: TM-API (per Test Plan - 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. Precision validation uses specific numeric examples from the SRS to verify calculation accuracy.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-QSSC-001Resolution Code Status Assignment34100%None
REQ-RULES-QSSC-002Quantity Calculation810100%None
REQ-RULES-QSSC-003Missing Standards Error24100%None

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


Input Variables (Rule-Level)

VariableTypeValid ValuesDescription
well.resolution_codesarray[], [QSSC], [OTHER]Resolution codes assigned to well
resolution_config.lims_statusstringDETECTED, NOT_DETECTED, ...LIMS status for resolution code
obs.targetstringTarget identifierTarget being quantified
obs.ctfloatNumeric (full precision)Cycle threshold value
quant_settings.slopefloatNumeric (typically negative)Standard curve slope
quant_settings.interceptfloatNumericStandard curve intercept
well.quantity_multiplierfloatPositive numericScaling factor for quantity
quant_settings_existsbooltrue, falseWhether settings exist for target

Output Variables (Rule-Level)

VariableTypeDescription
well.lims_statusstringLIMS status assigned to well
well.error_codestringError code (e.g., QUANT_STANDARDS_MISSING)
obs.quantityfloatCalculated quantity value
calculation_performedboolWhether quantity calculation was executed

REQ-RULES-QSSC-001: Resolution Code Status Assignment

Acceptance Criteria Summary

  • AC1: When QSSC resolution code is present, look up LIMS status from configuration
  • AC2: Apply configured LIMS status to the well
  • AC3: No quantification calculation performed when resolution code handling applies
  • AC4: No error set on well when LIMS status successfully assigned

Decision Table: Resolution Code Processing

TVwell.resolution_codesresolution_configexpected_limscalculation_performederror_setCovers
TV-001-001[QSSC]lims_status=DETECTEDDETECTEDfalsefalseAC1, AC2, AC3, AC4
TV-001-002[QSSC]lims_status=NOT_DETECTEDNOT_DETECTEDfalsefalseAC1, AC2
TV-001-003[]N/AnulltrueN/AAC3 (inverse - no resolution code)
TV-001-004[OTHER]N/AnulltrueN/AAC3 (non-QSSC resolution code)

Automation Status: Automated


REQ-RULES-QSSC-002: Quantity Calculation

Acceptance Criteria Summary

  • AC1: Retrieve slope and intercept from Calculated Quantification Settings for matching target
  • AC2: Apply formula: quantity = multiplier * pow(10, ((ct - intercept) / slope))
  • AC3: Use accurate CT value (not rounded) for calculation
  • AC4: Apply well's quantity multiplier to result
  • AC5: CT=28.1235, slope=-1, intercept=30, multiplier=1 yields quantity=75.248873017358
  • AC6: CT=28.12345678, slope=-1, intercept=30, multiplier=1 yields quantity=75.256361986851

Decision Table: Formula Verification

TVctslopeinterceptmultiplierexpected_quantityCovers
TV-002-00128.1235-130175.248873017358AC2, AC3, AC5
TV-002-00228.12345678-130175.256361986851AC2, AC3, AC6
TV-002-00340-13010.0000000001AC2 (high CT, low qty)
TV-002-004360.1230.234100466AC2, AC4 (with multiplier)

Decision Table: Multiplier Application

TVctslopeinterceptmultiplierexpected_quantityCovers
TV-002-00530-13011.0AC2, AC4 (boundary: ct=intercept)
TV-002-00630-1301010.0AC4 (multiplier scaling)
TV-002-00730-1300.50.5AC4 (fractional multiplier)

Decision Table: Parameter Retrieval

TVobs.targetquant_settingsslope_usedintercept_usedCovers
TV-002-008Target_A{Target_A: slope=-1, intercept=30}-130AC1
TV-002-009Target_B{Target_B: slope=-3.5, intercept=42}-3.542AC1
TV-002-010Target_A{Target_A: s=-1, i=30}, {Target_B: s=-2, i=35}-130AC1 (correct target selection)

Automation Status: Automated


REQ-RULES-QSSC-003: Missing Standards Error

Acceptance Criteria Summary

  • AC1: Verify Calculated Quantification Setting exists for observation's target before calculation
  • AC2: If no matching setting found, set QUANT_STANDARDS_MISSING error on well
  • AC3: No quantity calculation attempted when configuration is missing
  • AC4: Error retrievable from well for downstream processing

Decision Table: Configuration Validation

TVobs.targetquant_settings_existsexpected_errorcalculation_attemptedCovers
TV-003-001Target_AfalseQUANT_STANDARDS_MISSINGfalseAC1, AC2, AC3
TV-003-002Target_BtruenulltrueAC1 (inverse - settings exist)
TV-003-003Target_CfalseQUANT_STANDARDS_MISSINGfalseAC2, AC4 (error retrievable)
TV-QSSC-GAP-004Target (ENT)falseQUANT_STANDARDS_MISSINGfalseAC2, AC3 (missing standards prevents quantity)

Automation Status: Automated


Rule Precedence Decision Table

The QSSC rule has three mutually exclusive processing paths with defined precedence.

TVresolution_code_presentquant_settings_existprocessing_pathoutputCovers
TV-PREC-001truetrueResolution CodeLIMS status from configREQ-001 takes precedence
TV-PREC-002truefalseResolution CodeLIMS status from configREQ-001 takes precedence over error
TV-PREC-003falsetrueCalculationquantity valueREQ-002 normal path
TV-PREC-004falsefalseErrorQUANT_STANDARDS_MISSINGREQ-003 error path

Boundary Value Analysis

CT Value Boundaries

TVct_valuedescriptionexpected_behavior
TV-BND-0010Minimum CTValid calculation
TV-BND-00245High CT (typical max)Very small quantity
TV-BND-00328.123456789012High precision CTFull precision preserved

Multiplier Boundaries

TVmultiplierdescriptionexpected_behavior
TV-BND-0040.001Very small multiplierQuantity scaled down
TV-BND-0051000Large multiplierQuantity scaled up
TV-BND-0061Default multiplierNo scaling

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-QSSC-001NoneGap
REQ-RULES-QSSC-002BT-5242 (TM-API), BT-5077 (TM-MAN)Partial
REQ-RULES-QSSC-003NoneGap

Test Notes:

  • BT-5242: Automated API test covering TV-002-003, TV-002-008, TV-002-009, TV-002-010, TV-PREC-003, TV-BND-006
  • BT-5077: Manual test covering TV-002-001, TV-002-002, TV-BND-003 (precision verification)
  • BT-3899, BT-4001, BT-5076: Previously listed but not found in test catalogue (removed)

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
GAP-001REQ-RULES-QSSC-001No automated test for resolution code status assignment (TV-001-001 through TV-001-004)MediumTBD
GAP-002REQ-RULES-QSSC-003No Jira test ticket for missing standards error handling (TV-003-001 through TV-003-003)MediumTBD
GAP-003REQ-RULES-QSSC-002Partial automated coverage - TV-002-005 through TV-002-007 (multiplier boundaries) not coveredLowTBD

Remediation Plan

  1. GAP-001: Create test ticket covering TV-001-001 through TV-001-004 for resolution code LIMS status assignment
  2. GAP-002: Create test ticket covering TV-003-001 through TV-003-003 for QUANT_STANDARDS_MISSING error scenarios
  3. GAP-003: Extend BT-5242 or create new test for multiplier boundary scenarios