Multiple Wells Combined Outcome Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: MULTIPLE_WELLS_COMBINED_OUTCOME rule for assigning combined outcomes only when multiple mix results exist Domain: RULES-MWCOMBOUT Precedence: Part of Combined Outcome rule chain
Statement
The system shall execute the Multiple Wells Combined Outcome rule to assign combined outcomes only to wells when the combined outcome has multiple mix results.
This rule acts as a gate in the combined outcome assignment logic, ensuring that outcomes requiring multi-well aggregation are not incorrectly assigned based on single-sample data. Wells associated with combined outcomes that have only one mix result are excluded from receiving that outcome assignment.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-MWCOMBOUT-001 | Assigns combined outcomes only when mix results count > 1 | HIGH | Draft |
Key Integration Points: Combined Outcome Assignment Engine, Mix Result Aggregation, Rule Engine
Rule Summary
| Property | Value |
|---|---|
| Name | MULTIPLE_WELLS_COMBINED_OUTCOME |
| Precedence | Part of Combined Outcome rule chain |
| Triggers | When evaluating combined outcome assignment eligibility |
| Output | Allows or prevents combined outcome assignment to well |
Rule Flowchart (Illustrative)
This diagram illustrates the threshold logic for combined outcome assignment. The sole determining factor is whether the mix results count exceeds 1.
Definitions
| Term | Definition |
|---|---|
| Combined Outcome | An outcome assignment that aggregates results from multiple wells |
| Mix Results Count | The number of mix results associated with a combined outcome |
| Well Assignment | The association of a combined outcome to a specific well position |
Assumptions
- Combined outcomes have been configured in the system before rule execution
- Wells have been associated with combined outcomes through prior processing
- Mix results count is available and calculable for each combined outcome
Requirements
Combined Outcome Assignment (REQ-RULES-MWCOMBOUT-001)
FR-MWCOMBOUT-001: Multiple Wells Combined Outcome Rule Execution
The system shall execute the Multiple Wells Combined Outcome rule to assign combined outcomes only to wells when the combined outcome has multiple mix results.
Inputs/Outputs
| Direction | Data | Source/Target |
|---|---|---|
| Input | Combined outcome configuration | Kit configuration |
| Input | Well-to-outcome associations | Prior processing |
| Input | Mix results count per combined outcome | Aggregation logic |
| Output | Outcome assignment decision (allow/deny) | Well record |
Acceptance Criteria
Rule Identification:
- The rule shall be identified programmatically as
MULTIPLE_WELLS_COMBINED_OUTCOME
Assignment Logic:
- Given a combined outcome with an associated well, when the combined outcome has a mix results count of 1 (single), then the well shall NOT receive the combined outcome assignment
- Given a combined outcome with an associated well, when the combined outcome has a mix results count of 2 or more (multiple), then the well shall receive the combined outcome assignment
Threshold Behavior:
- The rule shall evaluate mix results count as the sole determining factor for outcome assignment eligibility
- The system shall use a mix results count threshold of strictly greater than 1 (count > 1) for assignment eligibility
- The system shall not assign a combined outcome when mix results count equals 1, and shall assign when mix results count is 2 or more
Decision Table
| Mix Results Count | Outcome Assigned? |
|---|---|
| 1 | No |
| 2 | Yes |
| 3+ | Yes |
Error Handling
- No error states defined; rule returns binary allow/deny decision
Trace: Source: 3.0.0-Multiple Wells Combined Outcome Rule (Row 1) | Jira: BT-5281 | Tests: See scenarios
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
| - | - | No configurable parameters; threshold of >1 is fixed business rule | - |
Note: The threshold of >1 mix results appears to be a fixed business rule, not a configuration option. Confirm if threshold should be configurable.
UI Notes (Illustrative)
No UI specifications exist for this rule. It operates as backend logic without direct UI representation.
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/MultipleWellsCombinedOutcomeRule.php |
| Combined Outcome Satisfier | Analyzer/Rules/Concerns/CombinedOutcomes/SatisfiesCombinedOutcome.php |
| Outcome Setter | Analyzer/Rules/Concerns/CombinedOutcomes/SetOutcomeToWell.php |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-MWCOMBOUT-001 | Multiple Wells Combined Outcome Rule Execution | Test | MultipleWellsCombinedOutcomeRule | TC-MWCOMBOUT-001, TC-MWCOMBOUT-002 | Draft |
Notes
- Rule type: Validation/Assignment rule
- This rule is part of the combined outcome assignment logic in the rule engine
- The rule enforces a minimum threshold of 2 mix results before combined outcome assignment
- This prevents false-positive combined outcomes based on single sample data
- Related to Single / Multi Combined Outcome Rules functionality (BT-5281)
Open Questions
| ID | Question | Source | Owner | Date Raised |
|---|---|---|---|---|
| OQ-001 | Should the >1 threshold be configurable or remain a fixed business rule? | Configuration Review | @tbd | 2026-01-23 |
| OQ-002 | Error handling for edge cases (e.g., count = 0) not specified in source material | Error Handling | @tbd | 2026-01-23 |
Acceptance Tests
Test: REQ-RULES-MWCOMBOUT-001
Test: Single Mix Result - Combined Outcome Not Assigned
Given: Combined Outcome A is configured
And: Well A1 is associated with Combined Outcome A
When: Combined Outcome A has mix results count = 1
Then: The system shall NOT assign Combined Outcome A to Well A1
Test: Multiple Mix Results - Combined Outcome Assigned
Given: Combined Outcome A is configured
And: Well A1 is associated with Combined Outcome A
When: Combined Outcome A has mix results count = 2
Then: The system shall assign Combined Outcome A to Well A1
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Combined Outcomes Algorithm |
| Combined Outcomes Rule | Related rule for outcome matching |
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
- Statement section present
- Mermaid diagram present and marked as Illustrative
- No "non-normative" text (replaced with Illustrative)
- All ACs preserved with blank lines before bullet lists
- Tests at end with back-links
Reviewer Notes
No Consolidation Required
This domain contains a single requirement (REQ-RULES-MWCOMBOUT-001) that represents a single, well-defined rule capability. No consolidation was necessary.
Source Preservation:
- Original requirement structure maintained
- All acceptance criteria preserved (analytics precision requirement)
- Both test scenarios preserved as Given/When/Then format
- Decision matrix logic folded into AC and added as explicit table
Reversibility: Source file: output/pilot/rules/rule-multiple-wells-combined-outcome/rule-multiple-wells-combined-outcome-restructured.md