Skip to main content
Version: Next

STD: Single Well Combined Outcome Rule (SWCOMBOUT)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-single-well-combined-outcome.md Rule Name: SINGLE_WELL_COMBINED_OUTCOME Domain: RULES-SWCOMBOUT


Overview

This document specifies tests for the Single Well Combined Outcome rule using decision tables and test vectors. The rule assigns combined outcomes to associated wells only when the combined outcome has exactly one mix result, delegating multi-mix scenarios to the Multi Well Combined Outcome Rule.

Rule Characteristics:

  • Pure business logic (no UI)
  • Simple binary condition (count = 1 vs count >= 2)
  • Deterministic behavior for single-mix scenarios
  • Part of Combined Outcome Rules family

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-SWCOMBOUT-001Single Well Combined Outcome Rule Execution412FullMinor (edge cases)

Totals: 1 REQ, 4 Conditions, 12 Test Vectors, Full Coverage (v3 config: 11 tests covering TV-002, TV-005, TV-010)


REQ-RULES-SWCOMBOUT-001: Single Well Combined Outcome Rule Execution

Input Variables

VariableTypeValid ValuesDescription
combined_outcomeobjectValid CO entityThe combined outcome being evaluated
mix_results_countint0, 1, 2, 3, ...Number of mix results associated with the combined outcome
associated_wellsarrayValid well entitiesWells linked to the combined outcome

Output Variables

VariableTypeDescription
well.combined_outcomeobject/nullAssigned combined outcome (null if not assigned by this rule)
rule_appliedboolWhether this rule performed the assignment

Decision Table: Mix Results Count Condition

This table verifies the core decision logic based on mix results count.

TVmix_results_countexpected_assignmentrule_appliedCovers
TV-SWCOMBOUT-0010falsefalseAC: Edge case - no mix results
TV-SWCOMBOUT-0021truetrueAC: Exactly one mix result - rule applies
TV-SWCOMBOUT-0032falsefalseAC: Two or more - delegate to Multi Well Rule
TV-SWCOMBOUT-00410falsefalseAC: Large count - delegate to Multi Well Rule

Decision Table: Well Assignment Behavior

This table verifies that when the rule applies, ALL associated wells receive the combined outcome.

TVmix_results_countassociated_wellswells_receiving_outcomeCovers
TV-SWCOMBOUT-0051[Well_A1][Well_A1]AC: Single well assignment
TV-SWCOMBOUT-0061[Well_A1, Well_B1, Well_C1][Well_A1, Well_B1, Well_C1]AC: Multiple wells all receive assignment

Decision Table: Independence of Evaluation

This table verifies that each combined outcome is evaluated independently.

TVcombined_outcomesco1_mix_countco2_mix_countco1_assignedco2_assignedCovers
TV-SWCOMBOUT-007[CO_A, CO_B]12truefalseAC: Independent evaluation - mixed scenario
TV-SWCOMBOUT-008[CO_A, CO_B]11truetrueAC: Both qualify
TV-SWCOMBOUT-009[CO_A, CO_B]35falsefalseAC: Neither qualifies

Decision Table: Eligibility for Subsequent Rules

This table verifies that wells not assigned by this rule remain eligible for other rules.

TVmix_results_countrule_appliedwell_eligible_for_multi_well_ruleCovers
TV-SWCOMBOUT-0101trueN/A (already assigned)AC: Assigned wells - no further processing needed
TV-SWCOMBOUT-0112falsetrueAC: Unassigned wells remain eligible
TV-SWCOMBOUT-0125falsetrueAC: Unassigned wells remain eligible

Boundary Value Analysis

Test VectorConditionValueExpectedRationale
TV-SWCOMBOUT-001mix_results_count0No assignmentBelow threshold
TV-SWCOMBOUT-002mix_results_count1AssignmentExact boundary (rule applies)
TV-SWCOMBOUT-003mix_results_count2No assignmentJust above threshold
TV-SWCOMBOUT-004mix_results_count10No assignmentWell above threshold

Test File Locations

RequirementTest FileAutomation Status
REQ-RULES-SWCOMBOUT-001NoneGap - No dedicated unit test exists

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-SWCOMBOUT-001BT-5128 (Legacy)v2 config only (Viracor_PROD.xlsx); tests multi-mix scenario
REQ-RULES-SWCOMBOUT-001BT-5578-5595 (v3)Full - Quest Combined Outcomes tests (see Implemented Test Coverage below)

Note: BT-5281 was previously referenced but does not exist in the feature catalogue.


Implemented Test Coverage

The following tests exercise single-analyte combined outcome scenarios using v3 configuration.

Test IDDescriptionTVs CoveredConfig
TEST_BT-5578Quest COVID Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5579Quest HHV6 Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5581Quest MPX Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5582Quest PARVO Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5588Quest ADV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5589Quest EBV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5590Quest BKV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5591Quest CMV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5592Quest NOROV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5594Quest NOROV II Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx
TEST_BT-5595Quest VZV Combined OutcomesTV-002, TV-005, TV-010EZ - San Juan Capistrano CA_v3_from clone.xlsx

Coverage Notes:

  • All 11 tests use single-analyte assays where mix_results_count = 1, directly exercising this rule
  • TV-SWCOMBOUT-002: Exactly one mix result triggers assignment
  • TV-SWCOMBOUT-005: Single well receives combined outcome
  • TV-SWCOMBOUT-010: Assigned wells marked complete (no further rule processing)

Gap Analysis

Identified Gaps

RESOLVED: Core single-mix-result combined outcome scenarios are now covered by BT-5578-5595 (11 v3 tests).

Gap IDDescriptionSeverityNotes
GAP-SWCOMBOUT-001No unit test for SingleWellCombinedOutcomeRuleLowUnit test path does not exist; Behat coverage sufficient
GAP-SWCOMBOUT-002No v3 test coverageHighRESOLVED - BT-5578-5595 use v3 config
GAP-SWCOMBOUT-003No isolated single-mix testHighRESOLVED - All 11 tests use single-analyte assays
GAP-SWCOMBOUT-004TV-SWCOMBOUT-001 (zero mix results)LowEdge case not explicitly tested
GAP-SWCOMBOUT-005TV-SWCOMBOUT-004 (large count boundary)LowNo large count boundary test
GAP-SWCOMBOUT-006TV-SWCOMBOUT-007-009 (independence)LowNo explicit multi-CO independence test

Coverage Verification

Acceptance CriteriaTest VectorsStatus
Count = 1 triggers assignmentTV-SWCOMBOUT-002, TV-SWCOMBOUT-005, TV-SWCOMBOUT-006Covered - BT-5578-5595
Count >= 2 skips assignmentTV-SWCOMBOUT-003, TV-SWCOMBOUT-004Partial - BT-5128 (v2 multi-mix)
Independent evaluation per COTV-SWCOMBOUT-007, TV-SWCOMBOUT-008, TV-SWCOMBOUT-009Gap - Low priority
Unassigned wells remain eligibleTV-SWCOMBOUT-011, TV-SWCOMBOUT-012Gap - Low priority
Boundary: count = 0TV-SWCOMBOUT-001Gap - Edge case
Single well assignmentTV-SWCOMBOUT-005, TV-SWCOMBOUT-010Covered - BT-5578-5595