Skip to main content
Version: Next

Single Well Combined Outcome Rule

Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: SINGLE_WELL_COMBINED_OUTCOME rule for assigning combined outcomes to wells with exactly one mix result Domain: RULES-SWCOMBOUT Precedence: After COMBINED_OUTCOME


Statement

The system shall assign combined outcomes to associated wells only when the combined outcome has exactly one mix result, ensuring deterministic behavior in single-mix scenarios.

This rule is part of the Combined Outcome Rules family and provides explicit handling for unambiguous single-mix-result conditions. Wells with multiple mix results are delegated to the Multi Well Combined Outcome Rule.


Quick Reference

IDCore BehaviorPriorityStatus
REQ-RULES-SWCOMBOUT-001Assigns combined outcomes to wells when mix results count equals exactly 1HIGHDraft

Key Integration Points: Combined Outcome Management, Mix Result Processing, Well Assignment, Multi Well Combined Outcome Rule

Rule Summary

PropertyValue
NameSINGLE_WELL_COMBINED_OUTCOME
TriggersWhen evaluating combined outcomes with exactly one mix result
OutputAssigns combined outcome to all associated wells

Rule Flowchart (Illustrative)

This diagram illustrates the core decision logic. The rule evaluates each combined outcome independently.


Definitions

TermDefinition
Combined OutcomeAn aggregated result derived from one or more mix results that may be assigned to wells
Mix ResultA single analytical result from a mix evaluation
Mix Results CountThe number of mix results associated with a given combined outcome
WellA physical location on an assay plate that receives outcome assignments

Assumptions

  • Combined outcomes and their associated wells are configured prior to rule execution
  • Mix results have been calculated and counts are available for evaluation
  • Well-to-combined-outcome associations are established in the system

Requirements

Combined Outcome Assignment (REQ-RULES-SWCOMBOUT-001)

FR-SWCOMBOUT-001: Single Well Combined Outcome Rule Execution

The system shall apply the Single Well Combined Outcome rule to assign combined outcomes to associated wells only when the combined outcome has exactly one mix result.

Acceptance Criteria

Assignment Logic:

  • When a combined outcome has a mix results count of exactly 1, assign that combined outcome to all associated wells
  • When a combined outcome has a mix results count of 2 or more, do NOT assign the combined outcome to associated wells through this rule

Scope and Independence:

  • Evaluate the mix results count for each combined outcome independently
  • Wells that do not receive a combined outcome assignment through this rule remain eligible for assignment by other rules (e.g., Multi Well Combined Outcome Rule)

Error Handling

  • No matching condition (count >= 2): allow the well to fall through to subsequent rules

Trace: Source: 3.0.0-Single Well Combined Outcome Rule (Row 1) | Jira: BT-5281 | Tests: BT-5281 (regression) | Related: Multi Well Combined Outcome Rule


Configuration Options

OptionDefaultDescriptionAffects
rule_nameSINGLE_WELL_COMBINED_OUTCOMEProgrammatic identifier for this ruleREQ-RULES-SWCOMBOUT-001

UI Notes (Illustrative)

No UI specifications found in source material. This is an analytics rule with no direct user interface.


Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/SingleWellCombinedOutcomeRule.php
Outcome MatcherAnalyzer/Rules/Concerns/CombinedOutcomes/SatisfiesCombinedOutcome.php
Outcome SetterAnalyzer/Rules/Concerns/CombinedOutcomes/SetOutcomeToWell.php
Wells LookupAnalyzer/RecentlyUploadedWellsGetter.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-SWCOMBOUT-001Single Well Combined Outcome Rule ExecutionTestSingleWellCombinedOutcomeRule.handle()BT-5281Draft

Notes

  • This rule is part of the Combined Outcome Rules family
  • For scenarios with multiple mix results, see the Multi Well Combined Outcome Rule
  • The rule provides deterministic behavior by explicitly preventing outcome assignment in ambiguous multi-mix scenarios

Acceptance Tests

Test: REQ-RULES-SWCOMBOUT-001

Back to requirement

Test: Single Mix Result - Rule Applies

Given: A combined outcome (Combined Outcome A) is configured with associated wells (Well A1)
When: The combined outcome has a mix results count of 1
Then: The associated well (Well A1) shall receive the combined outcome assignment (Combined Outcome A)

Test: Multiple Mix Results - Rule Does Not Apply

Given: A combined outcome (Combined Outcome A) is configured with associated wells (Well A1)
When: The combined outcome has a mix results count of 2 or more
Then: The associated well (Well A1) shall NOT receive the combined outcome assignment through this rule

Design DocumentRelevant Sections
SDS Rules IndexCombined Outcomes Algorithm
Multiple Wells Combined Outcome RuleMulti-mix handling

Appendix: Process Artifacts

Completion Checklist

  • All requirements are capability-level (describe behavior, not UI)
  • Requirement variants consolidated (no requirement explosion)
  • 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 for I/O, validation, and external system requirements
  • Open questions documented with owners assigned
  • Consolidations documented in Reviewer Notes with reversibility info
  • Module can survive a full UI redesign unchanged
  • Refinements folded into acceptance criteria
  • Traceability matrix is complete

Note: Error handling checkbox unchecked - this is an analytics rule operating on internal data structures; no I/O, validation, or external system interactions requiring error handling documentation.

Reviewer Notes

No Consolidation Required

This domain contains a single requirement (REQ-RULES-SWCOMBOUT-001) representing one distinct system capability. No consolidation was performed.

Original ItemSource ReferenceDisposition
REQ-RULES-SWCOMBOUT-0013.0.0-Single Well Combined Outcome Rule (Row 1)Preserved as-is

Rationale: The Single Well Combined Outcome rule is an atomic analytics rule with clear decision logic (count = 1 vs count >= 2). Both test cases are preserved as acceptance criteria to maintain precision required for analytics validation.

Reversibility: To reference original structure:

  • Source: output/pilot/rules/rule-single-well-combined-outcome/rule-single-well-combined-outcome-restructured.md
  • Confluence: 3.0.0-Single Well Combined Outcome Rule