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
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-SWCOMBOUT-001 | Assigns combined outcomes to wells when mix results count equals exactly 1 | HIGH | Draft |
Key Integration Points: Combined Outcome Management, Mix Result Processing, Well Assignment, Multi Well Combined Outcome Rule
Rule Summary
| Property | Value |
|---|---|
| Name | SINGLE_WELL_COMBINED_OUTCOME |
| Triggers | When evaluating combined outcomes with exactly one mix result |
| Output | Assigns combined outcome to all associated wells |
Rule Flowchart (Illustrative)
This diagram illustrates the core decision logic. The rule evaluates each combined outcome independently.
Definitions
| Term | Definition |
|---|---|
| Combined Outcome | An aggregated result derived from one or more mix results that may be assigned to wells |
| Mix Result | A single analytical result from a mix evaluation |
| Mix Results Count | The number of mix results associated with a given combined outcome |
| Well | A 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
| Option | Default | Description | Affects |
|---|---|---|---|
rule_name | SINGLE_WELL_COMBINED_OUTCOME | Programmatic identifier for this rule | REQ-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)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/SingleWellCombinedOutcomeRule.php |
| Outcome Matcher | Analyzer/Rules/Concerns/CombinedOutcomes/SatisfiesCombinedOutcome.php |
| Outcome Setter | Analyzer/Rules/Concerns/CombinedOutcomes/SetOutcomeToWell.php |
| Wells Lookup | Analyzer/RecentlyUploadedWellsGetter.php |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-SWCOMBOUT-001 | Single Well Combined Outcome Rule Execution | Test | SingleWellCombinedOutcomeRule.handle() | BT-5281 | Draft |
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
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
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDS Rules Index | Combined Outcomes Algorithm |
| Multiple Wells Combined Outcome Rule | Multi-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 Item | Source Reference | Disposition |
|---|---|---|
| REQ-RULES-SWCOMBOUT-001 | 3.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