STD: Combined Outcomes Control Rule (COMBOUTCTRL)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/rules/rule-combined-outcomes-control.mdRule Name: COMBINED_OUTCOME_CONTROL Domain: RULES-COMBOUTCTRL
Overview
This document specifies tests for the Combined Outcomes Control rule using decision tables and test vectors. The rule extends the base COMBINED_OUTCOME rule with additional control conditions: role verification as a gate, error outcome handling with separate well and target error codes, and special result matching conditions including wildcards and classification discrepancy detection.
Rule Characteristics:
- Pure business logic (no UI)
- Role-based gating (role must match before other criteria)
- Error-typed outcomes set error codes without LIMS status
- Special result matching: Any (wildcard), Classification/Discrepancy, exact CLS
- CT and quantity range boundaries (nullable = unbounded)
- All targets within a Combined Outcome must match (AND logic)
Test Method: TM-API (per Test Plan - 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 ID | Title | Conditions | Test Vectors | Coverage | Gaps |
|---|---|---|---|---|---|
| REQ-RULES-COMBOUTCTRL-001 | Combined Outcome Control Matching | 22 | 48 | 100% | None |
Totals: 1 REQ, 22 Conditions, 48 Test Vectors, 100% Coverage
REQ-RULES-COMBOUTCTRL-001: Combined Outcome Control Matching
Input Variables
| Variable | Type | Valid Values | Description |
|---|---|---|---|
config.role | string | NEC, PEC, Patient, ... | Combined outcome control role (required) |
obs.role | string | NEC, PEC, Patient, ... | Observation role |
config.result | string | Any, Classification/Discrepancy, Pos, Neg, Amb | Result matching condition per target |
obs.final_cls | string | Pos, Neg, Amb | Observation final classification |
obs.problems | array | [], [CLASSIFICATION] | Observation problem flags |
config.min_ct | float? | null, numeric | CT lower bound (null = unbounded) |
config.max_ct | float? | null, numeric | CT upper bound (null = unbounded) |
obs.ct | float | numeric | Observation CT value |
config.min_quant | float? | null, numeric | Quantity lower bound (null = unbounded) |
config.max_quant | float? | null, numeric | Quantity upper bound (null = unbounded) |
obs.quantity | float | numeric | Observation quantity value |
config.type | string | Normal, Error | Outcome type |
config.well_error_code | string? | null, Error_A, ... | Well error code (conditional on Error type) |
config.target_error | string? | null, Error_B, ... | Run Target error code (optional) |
targets[] | array | Target configurations | Array of target result conditions |
Output Variables
| Variable | Type | Description |
|---|---|---|
well.lims | string? | LIMS outcome code (null if Error type) |
well.error_code | string? | Well error code (set if Error type) |
target.error_code | string? | Run Target error code (set if configured) |
matched | bool | Whether the combined outcome was assigned |
Decision Table: Role Verification (Gate)
Role verification is the first gate condition. If role does not match, no other criteria are evaluated.
| TV | config.role | obs.role | matched | evaluation_continues | Covers |
|---|---|---|---|---|---|
| TV-COMBOUTCTRL-001 | PEC | PEC | true | yes | AC: Role match allows evaluation |
| TV-COMBOUTCTRL-002 | NEC | NEC | true | yes | AC: Role match allows evaluation |
| TV-COMBOUTCTRL-003 | NEC | PEC | false | no | AC: Role mismatch skips outcome |
| TV-COMBOUTCTRL-004 | PEC | Patient | false | no | AC: Role mismatch skips outcome |
| TV-COMBOUTCTRL-005 | Patient | NEC | false | no | AC: Role mismatch prevents evaluation |
Decision Table: Result Matching - Any (Wildcard)
When result == Any, the condition matches any observation regardless of classification.
| TV | config.result | obs.final_cls | obs.problems | matched | Covers |
|---|---|---|---|---|---|
| TV-COMBOUTCTRL-006 | Any | Pos | [] | true | AC: "Any" matches Pos |
| TV-COMBOUTCTRL-007 | Any | Neg | [] | true | AC: "Any" matches Neg |
| TV-COMBOUTCTRL-008 | Any | Amb | [] | true | AC: "Any" matches Amb |
| TV-COMBOUTCTRL-009 | Any | Pos | [CLASSIFICATION] | true | AC: "Any" matches with problem |
Decision Table: Result Matching - Classification/Discrepancy
When result == Classification/Discrepancy, matches observations with CLASSIFICATION problem flag.
| TV | config.result | obs.final_cls | obs.problems | matched | Covers |
|---|---|---|---|---|---|
| TV-COMBOUTCTRL-010 | Classification/Discrepancy | Amb | [CLASSIFICATION] | true | AC: Discrepancy with problem flag |
| TV-COMBOUTCTRL-011 | Classification/Discrepancy | Pos | [CLASSIFICATION] | true | AC: Discrepancy with problem flag |
| TV-COMBOUTCTRL-012 | Classification/Discrepancy | Pos | [] | false | AC: No CLASSIFICATION problem |
| TV-COMBOUTCTRL-013 | Classification/Discrepancy | Neg | [] | false | AC: No CLASSIFICATION problem |
Decision Table: Result Matching - Exact Classification
When result is a specific CLS value, matches observations with exact final classification.
| TV | config.result | obs.final_cls | matched | Covers |
|---|---|---|---|---|
| TV-COMBOUTCTRL-014 | Pos | Pos | true | AC: Exact CLS match |
| TV-COMBOUTCTRL-015 | Pos | Neg | false | AC: CLS mismatch |
| TV-COMBOUTCTRL-016 | Neg | Neg | true | AC: Exact CLS match |
| TV-COMBOUTCTRL-017 | Amb | Pos | false | AC: CLS mismatch |
Decision Table: CT Range Matching
CT boundaries are inclusive. Null boundaries are unbounded.
| TV | config.min_ct | config.max_ct | obs.ct | matched | Covers |
|---|---|---|---|---|---|
| TV-COMBOUTCTRL-018 | null | null | 35 | true | AC: No bounds = match any |
| TV-COMBOUTCTRL-019 | 40 | 42 | 41 | true | AC: Within bounds (inclusive) |
| TV-COMBOUTCTRL-020 | 40 | 42 | 40 | true | AC: At min boundary (inclusive) |
| TV-COMBOUTCTRL-021 | 40 | 42 | 42 | true | AC: At max boundary (inclusive) |
| TV-COMBOUTCTRL-022 | 40 | 42 | 39 | false | AC: Below min |
| TV-COMBOUTCTRL-023 | 40 | 42 | 43 | false | AC: Exceeds max |
| TV-COMBOUTCTRL-024 | 40 | null | 50 | true | AC: Above min, no max |
| TV-COMBOUTCTRL-025 | null | 42 | 30 | true | AC: No min, below max |
Decision Table: Quantity Range Matching
Quantity boundaries follow same logic as CT. Null boundaries are unbounded.
| TV | config.min_quant | config.max_quant | obs.quantity | matched | Covers |
|---|---|---|---|---|---|
| TV-COMBOUTCTRL-026 | null | null | 1000 | true | AC: No bounds = match any |
| TV-COMBOUTCTRL-027 | 500 | 1500 | 1000 | true | AC: Within bounds |
| TV-COMBOUTCTRL-028 | 500 | 1500 | 500 | true | AC: At min boundary |
| TV-COMBOUTCTRL-029 | 500 | 1500 | 1500 | true | AC: At max boundary |
| TV-COMBOUTCTRL-030 | 500 | 1500 | 499 | false | AC: Below min |
| TV-COMBOUTCTRL-031 | 500 | 1500 | 1501 | false | AC: Exceeds max |
| TV-COMBOUTCTRL-032 | 500 | null | 2000 | true | AC: Above min, no max |
| TV-COMBOUTCTRL-033 | null | 1500 | 100 | true | AC: No min, below max |
Decision Table: Combined Criteria (AND Logic)
All criteria (role, result, CT, quantity) must match for outcome assignment.
| TV | role_match | result_match | ct_in_range | qty_in_range | matched | Covers |
|---|---|---|---|---|---|---|
| TV-COMBOUTCTRL-034 | true | true | true | true | true | AC: All criteria satisfied |
| TV-COMBOUTCTRL-035 | true | true | true | false | false | AC: Quantity out of range |
| TV-COMBOUTCTRL-036 | true | true | false | true | false | AC: CT out of range |
| TV-COMBOUTCTRL-037 | true | false | true | true | false | AC: Result mismatch |
| TV-COMBOUTCTRL-038 | false | true | true | true | false | AC: Role mismatch gates |
Decision Table: Target Results AND Logic
All target result conditions within a Combined Outcome must be satisfied.
| TV | Target A result | Target A match | Target B result | Target B match | outcome_assigned | Covers |
|---|---|---|---|---|---|---|
| TV-COMBOUTCTRL-039 | Pos | true | Any | true | true | AC: All targets match |
| TV-COMBOUTCTRL-040 | Pos | true | Neg | false | false | AC: One target fails |
| TV-COMBOUTCTRL-041 | Classification/Discrepancy | true | Any | true | true | AC: Mixed conditions |
| TV-COMBOUTCTRL-042 | Pos | false | Any | true | false | AC: First target fails |
Decision Table: Error Outcome Assignment
Error-typed outcomes set error codes without setting LIMS status.
| TV | config.type | config.well_error_code | config.target_error | well.lims | well.error_code | target.error_code | Covers |
|---|---|---|---|---|---|---|---|
| TV-COMBOUTCTRL-043 | Normal | null | null | OUTCOME_A | null | null | AC: Normal sets LIMS |
| TV-COMBOUTCTRL-044 | Error | Error_A | null | null | Error_A | null | AC: Error sets well error only |
| TV-COMBOUTCTRL-045 | Error | Error_A | Error_B | null | Error_A | Error_B | AC: Error sets both well and target error |
| TV-COMBOUTCTRL-046 | Error | Error_A | Error_A | null | Error_A | Error_A | AC: Same error code for both |
Decision Table: Error Handling
| TV | Scenario | behavior | Covers |
|---|---|---|---|
| TV-COMBOUTCTRL-047 | No matching combined outcome | Well falls through to subsequent rules | AC: Error handling - no match |
| TV-COMBOUTCTRL-048 | Role mismatch | Skip evaluation of remaining criteria | AC: Error handling - role mismatch |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|---|---|
| REQ-RULES-COMBOUTCTRL-001 | BT-3661, BT-3879 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|---|---|---|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Remediation Plan
No gaps identified. All acceptance criteria from REQ-RULES-COMBOUTCTRL-001 are covered by the decision tables above.
Automation Status
| Decision Table | Automation Status | Notes |
|---|---|---|
| Role Verification | Automated | BT-3586 |
| Result Matching - Any | Automated | BT-3661 |
| Result Matching - Classification/Discrepancy | Automated | BT-3850, BT-3879 |
| Result Matching - Exact | Automated | BT-3661 |
| CT Range Matching | Automated | BT-3661 |
| Quantity Range Matching | Automated | BT-3661 |
| Combined Criteria | Automated | BT-3661 |
| Target Results AND Logic | Automated | BT-3661 |
| Error Outcome Assignment | Automated | BT-3661 |
| Error Handling | Automated | BT-3661 |