Skip to main content
Version: 3.0.0

Reporting Quant as Qual Rule (RQUANTASQUAL)

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: RQUANTASQUAL rule for converting quantitative PCR results to qualitative outcomes Domain: RULES-RQUANTQUAL Precedence: After quantification completes


Statement

The system shall convert quantitative PCR results into qualitative outcomes (Detected/Not Detected) by comparing measured quantity or CT values against configured Limit of Detection (LoD) thresholds.

When specimen-type matching is enabled, the rule selects the LoD threshold specific to the well's specimen type (e.g., Plasma vs Serum). When disabled, the rule uses the most recently modified reporting configuration regardless of specimen type, maintaining backwards compatibility.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-RQUANTQUAL-001Converts quantitative results to Detected/Not Detected based on LoD thresholdHIGHDraft
REQ-RULES-RQUANTQUAL-002Selects LoD threshold based on specimen type when enabledHIGHDraft

Key Integration Points: Quantification system, Reporting configuration, Rule mapping, Specimen type system

Rule Summary

PropertyValue
NameRQUANTASQUAL
TriggersAfter quantification completes
InputWell observations with CT/Quantity values
OutputQualitative outcome (Detected/Not Detected)

Rule Flowchart (Illustrative)

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


Definitions

TermDefinition
LoD (Limit of Detection)The configured threshold value below which a quantitative measurement is considered undetectable
Quant-as-QualA reporting mode where quantitative PCR results are converted to qualitative outcomes (Detected/Not Detected)
Specimen TypeThe sample matrix category (e.g., Plasma, Serum) that may affect detection sensitivity
Upper BoundaryThe LoD threshold value configured in the reporting configuration
Rule MappingConfiguration associating a mix/target/specimen combination with a specific rule

Assumptions

  • Quantification has completed before the RQUANTASQUAL rule executes
  • Well observations contain valid CT or Quantity values
  • At least one reporting configuration exists for the mix/target combination
  • Rule mappings are configured to associate the RQUANTASQUAL rule with applicable targets

Requirements

Qualitative Outcome Determination (REQ-RULES-RQUANTQUAL-001)

FR-RQUANTQUAL-001: Report Quantitative Results as Qualitative Outcomes

The system shall report quantitative results as qualitative outcomes based on comparison against the Limit of Detection threshold.

Inputs/Outputs

DirectionDataSource/Target
InputWell observation (CT value, Quantity)PCR analysis
InputLoD threshold (upper boundary)Reporting configuration
OutputQualitative outcome (Detected/Not Detected)Well record

Acceptance Criteria

Threshold Comparison:

  • Given a well observation with Quantity >= LoD threshold, when the RQUANTASQUAL rule executes, then the result outcome shall be "Detected"
  • Given a well observation with Quantity < LoD threshold, when the RQUANTASQUAL rule executes, then the result outcome shall be "Not Detected"
  • Given a well observation with CT value at exactly the LoD boundary, when the RQUANTASQUAL rule executes, then the result outcome shall be "Detected" (boundary is inclusive)

Trace: Source: 3.0.0-Reporting Quant as Qual (Row 1, Objective) | Jira: BT-674 | Tests: See scenarios


Specimen-Based Threshold Selection (REQ-RULES-RQUANTQUAL-002)

FR-RQUANTQUAL-002: Select LoD Threshold Based on Specimen Type

The system shall select the LoD reporting threshold based on specimen type when sample type matching is enabled.

Inputs/Outputs

DirectionDataSource/Target
InputWell specimen typeWell record
InputUse sample type flagSystem configuration
InputMultiple reporting configurations (per specimen)Kit configuration
OutputSelected LoD thresholdRule execution context

Acceptance Criteria

Specimen Type Enabled:

  • Given "use sample type" is enabled, the system shall use the reporting configuration matching the well's specimen type for LoD threshold selection
  • The system shall require rule mappings to be configured per specimen type for specimen-based thresholds to apply

Specimen Type Disabled (Legacy Mode):

  • Given "use sample type" is disabled, the system shall use the last modified reporting configuration (by timestamp) for the mix/target combination, regardless of specimen type
  • Given sample type disabled with multiple reportings, when any well is evaluated, then all wells shall use the same LoD threshold (the last modified reporting)

Example Scenarios:

ScenarioSample TypePlasma LoDSerum LoDWell SpecimenCT ValueExpected Outcome
Enabled, Plasma wellEnabled3010Plasma25Not Detected (25 < 30)
Enabled, Serum wellEnabled3010Serum25Detected (25 >= 10)
Disabled, any wellDisabled3010 (last modified)Plasma25Detected (uses 10)

Trace: Source: 3.0.0-RQUANTASQUAL Rule - Should use unique reporting based on specimen (Row 1) | Jira: BT-4204, BT-4283 | Tests: BT-4283, See scenarios


Configuration Options

OptionDefaultDescriptionAffects
use_sample_typefalseEnable specimen-type-specific LoD threshold selectionREQ-RULES-RQUANTQUAL-002

UI Notes (Illustrative)

Reporting Configuration Fields

FieldExamplePurpose
MixHEVReagent mixture identifier
TargetHEVDetection target
Specimen typePlasma, SerumSample matrix category
Quant or CTCtMeasurement mode
Group1 LoDConfiguration grouping
Upper Boundary30LoD threshold value
Last modified timestamp2023-11-08 00:00:00For fallback selection when sample type disabled

Rule Mapping Configuration Fields

FieldExample
MixHEV
TargetHEV
Specimen typePlasma
RuleRQUANTASQUAL

Flow Diagram Reference

The RQUANTASQUAL rule flow is visualized in media/image166.png:

  1. Start - Rule execution begins
  2. Decision: Is quantity >= LoD?
    • Yes: Result is "Detected"
    • No: Result is "Not Detected"
  3. End - Qualitative outcome assigned to well

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/RquantasqualRule.php
LIMS Status SetterAnalyzer/Rules/Concerns/SetLimsStatusToWell.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-RQUANTQUAL-001Report Quantitative Results as Qualitative OutcomesTestRquantasqualRule.handle()[Pending]Draft
REQ-RULES-RQUANTQUAL-002Select LoD Threshold Based on Specimen TypeTestRquantasqualRule.handle(), ConfigurationRepository.getFirstGroupReportingForObservation()BT-4283Draft

Notes

  • This rule is used for assays that perform quantitative analysis but require qualitative reporting
  • The LoD threshold is configured per target in the reporting configuration
  • Specimen-based thresholds are particularly important for assays where sample matrix affects detection sensitivity
  • Legacy behavior (sample type disabled) uses timestamp-based fallback to maintain backwards compatibility
  • Error handling not included as this rule operates on already-validated well observations. Error conditions (missing CT value, missing reporting configuration) are handled by upstream systems.

Acceptance Tests

Test: REQ-RULES-RQUANTQUAL-001

Back to requirement

Test: Quantity at or above threshold yields Detected

Given: Well observation with Quantity = 100
And: LoD threshold = 50
When: RQUANTASQUAL rule executes
Then: Result outcome shall be "Detected"

Test: Quantity below threshold yields Not Detected

Given: Well observation with Quantity = 30
And: LoD threshold = 50
When: RQUANTASQUAL rule executes
Then: Result outcome shall be "Not Detected"

Test: Boundary is inclusive (exactly at LoD)

Given: Well observation with CT value = 30
And: LoD threshold = 30
When: RQUANTASQUAL rule executes
Then: Result outcome shall be "Detected"

Test: REQ-RULES-RQUANTQUAL-002

Back to requirement

Test: Specimen-based threshold selection (BT-4283)

Given: Configuration setup
Reportings:
Plasma:
Mix: HEV
Target: HEV
Specimen type: Plasma
Quant or CT: Ct
Group: 1 LoD
Upper Boundary: 30
Last modified at: 2023-11-08 00:00:00
Serum:
Mix: HEV
Target: HEV
Specimen type: Serum
Quant or CT: Ct
Group: 1 LoD
Upper Boundary: 10
Last modified at: 2023-11-08 00:01:00

Rule mappings:
Plasma:
Mix: HEV
Target: HEV
Specimen type: Plasma
Rule: RQUANTASQUAL
Serum:
Mix: HEV
Target: HEV
Specimen type: Serum
Rule: RQUANTASQUAL

Runfile:
Well A1: Mix=HEV, Target=HEV, Specimen=Plasma, Ct=25
Well A2: Mix=HEV, Target=HEV, Specimen=Serum, Ct=25

When: Use sample type is enabled
And: Import the runfile
And: Open imported run and observe A1 and A2 wells

Then: A1 (Plasma) shall have Not Detected outcome (Ct=25 < threshold=30)
And: A2 (Serum) shall have Detected outcome (Ct=25 >= threshold=10)

When: Use sample type is disabled
And: Import the runfile
And: Open imported run and observe A1 and A2 wells

Then: A1 shall have Detected outcome (uses last modified Serum threshold=10)
And: A2 shall have Detected outcome (uses last modified Serum threshold=10)

Design DocumentRelevant Sections
SDD AlgorithmsRQUANTASQUAL Rule Algorithm

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion) - N/A, only 2 requirements
  • 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 - N/A, upstream systems handle errors
  • Open questions documented with owners assigned - N/A, no open questions
  • Consolidations documented in Reviewer Notes with reversibility info
  • Module can survive a full UI redesign unchanged
  • Refinements do not introduce new capabilities
  • Traceability matrix is complete

Reviewer Notes

No Consolidation Required

The source document contained exactly 2 requirements representing distinct system capabilities:

RequirementCapabilityJustification
REQ-RULES-RQUANTQUAL-001Core quant-as-qual comparison logicPrimary rule behavior
REQ-RULES-RQUANTQUAL-002Specimen-based threshold selectionConfiguration-driven threshold routing

These requirements were preserved as-is per the RULES domain guidance for conservative consolidation. No requirement explosion pattern was detected.

Reversibility: N/A - No consolidation performed.

Source Reference:

  • output/pilot/rules/rule-reporting-quant-as-qual/rule-reporting-quant-as-qual-restructured.md