Skip to main content
Version: 3.0.0

STD: Resolution Well Affecting Control Rule (RWAC)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-rwac.md Rule Name: RWAC Domain: RULES-RWAC


Overview

This document specifies tests for the Resolution Well Affecting Control (RWAC) rule using decision tables and test vectors. The rule propagates resolution outcomes from control wells to their associated patient wells in the same mix.

Rule Characteristics:

  • Pure business logic (no UI)
  • Resolution code propagation from control to patient wells
  • Fallback control support for backup mix scenarios
  • Priority-based resolution selection for multiple controls
  • Optional error well outcome modification

Test Method: TM-API (per Test Plan §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-RWAC-001Resolution Application810100%None
REQ-RULES-RWAC-002Fallback Control Handling56100%None
REQ-RULES-RWAC-003Resolution Priority34100%None
REQ-RULES-RWAC-004Error Well Handling34100%None

Totals: 4 REQs, 19 Conditions, 24 Test Vectors, 100% Coverage


REQ-RULES-RWAC-001: Resolution Application

Input Variables

VariableTypeValid ValuesDescription
control.resolution_codestringResolution code identifierResolution assigned to control well
resolution.affected_lims_statusesstring/array"All Wells", specific LIMS statusesStatuses the resolution affects
resolution.lims_statusstring?LIMS status value, nullTarget LIMS status to apply
patient.lims_statusstring?Current LIMS status, nullPatient well's current LIMS status
patient.error_codestring?Error code, nullPatient well's error code
patient.associated_controlbooltrue, falseWhether patient has associated control

Output Variables

VariableTypeDescription
patient.lims_statusstring?Updated LIMS status (or unchanged)
appliedboolWhether resolution was applied

Decision Table: Status Matching

TVaffected_lims_statusespatient.lims_statusresolution.lims_statusresult_lims_statusappliedCovers
TV-001-001"Lims B"null"Lims A"nullfalseAC: Status mismatch - no change
TV-001-002"Lims B""Lims B""Lims A""Lims A"trueAC: Status match - apply resolution
TV-001-003"Lims B""Lims C""Lims A""Lims C"falseAC: Status mismatch - no change

Decision Table: Null Resolution Status

TVaffected_lims_statusespatient.lims_statusresolution.lims_statusresult_lims_statusCovers
TV-001-004"Lims B""Lims B"nullnullAC: Null resolution status applied

Decision Table: All Wells Mode

TVaffected_lims_statusespatient.lims_statuspatient.error_coderesolution.lims_statusresult_lims_statusCovers
TV-001-005"All Wells""Lims B"null"Lims A""Lims A"AC: All Wells overrides any status
TV-001-006"All Wells"nullnull"Lims A""Lims A"AC: All Wells includes null status
TV-001-007"All Wells""Lims C"null"Lims A""Lims A"AC: All Wells any status match
TV-001-008"All Wells"null"Error B""Lims A""Lims A"AC: All Wells with error code

Decision Table: No Associated Control

TVpatient.associated_controlcontrol.resolution_codeappliedCovers
TV-001-009false"Resolution A"falseAC: No associated control - skip
TV-001-010truenullfalseAC: No resolution code - skip

REQ-RULES-RWAC-002: Fallback Control Handling

Input Variables

VariableTypeValid ValuesDescription
patient.mixstringMix identifierPatient well's mix assignment
control_label_mapping.mixstringMix identifierControl's primary mix
control_label_mapping.backup_mixesarrayList of mix identifiersMixes that use this as fallback
original_mix_control_presentbooltrue, falseWhether original mix has control
fallback_control.resolutionstring?Resolution code, nullFallback control's resolution

Output Variables

VariableTypeDescription
fallback_appliedboolWhether fallback control resolution was used
patient.outcomestringFinal outcome value

Decision Table: Fallback Control Application

TVpatient.mixbackup_mixesoriginal_mix_control_presentfallback_resolutionfallback_appliedCovers
TV-002-001"Mix B"["Mix B"]false"RESOLUTION A"trueAC: Backup mix, no original control
TV-002-002"Mix B"["Mix B"]true"RESOLUTION A"falseAC: Original mix control takes precedence
TV-002-003"Mix C"["Mix B"]false"RESOLUTION A"falseAC: Not in backup mixes list
TV-002-004"Mix B"[]false"RESOLUTION A"falseAC: No backup mixes configured

Decision Table: No Associated Controls

TVpatient.mixhas_primary_controlhas_fallback_controloutcome_changedCovers
TV-002-005"Mix B"falsefalsefalseAC: No controls - skip RWAC
TV-002-006"Mix B"falsetruetrueAC: Fallback available - apply

REQ-RULES-RWAC-003: Resolution Priority

Input Variables

VariableTypeValid ValuesDescription
control.rolestringRole identifierControl well's role
role.resolution_priorityintPositive integerPriority value (1 = highest)
control.resolutionstringResolution codeResolution assigned to control
resolved_controlsarrayList of resolved controlsMultiple controls for same patient

Output Variables

VariableTypeDescription
selected_resolutionstringResolution from highest priority control
patient.lims_statusstringLIMS status from selected resolution

Decision Table: Priority Selection

TVcontrol_A.prioritycontrol_A.limscontrol_B.prioritycontrol_B.limsselected_limsCovers
TV-003-0012"Lims B"1"Lims C""Lims C"AC: Lower number = higher priority
TV-003-0021"Lims B"2"Lims C""Lims B"AC: Priority 1 wins
TV-003-0031"Lims B"1"Lims C""Lims B"AC: Equal priority - first wins
TV-003-0043"Lims A"nullnull"Lims A"AC: Single control - use its resolution

REQ-RULES-RWAC-004: Error Well Handling

Input Variables

VariableTypeValid ValuesDescription
patient.outcomestringOutcome value including errorsPatient well's current outcome
resolution.affected_outcomesarrayList of outcome valuesOutcomes the resolution can modify
resolution.outcomestringTarget outcome valueOutcome to set on matching wells

Output Variables

VariableTypeDescription
patient.outcomestringUpdated outcome value
appliedboolWhether resolution was applied

Decision Table: Error Outcome Replacement

TVpatient.outcomeaffected_outcomesresolution.outcomeresult_outcomeappliedCovers
TV-004-001"Error A"["Error A"]"Outcome B""Outcome B"trueAC: Error in affected list - replace
TV-004-002"Error A"["Error B"]"Outcome B""Error A"falseAC: Error not in affected list - no change
TV-004-003"Error A"[]"Outcome B""Error A"falseAC: Empty affected list - no change
TV-004-004"Outcome A"["Error A", "Outcome A"]"Outcome B""Outcome B"trueAC: Non-error in affected list - replace

Automation Status

REQ IDTest VectorsAutomation StatusNotes
REQ-RULES-RWAC-001TV-001-001 to TV-001-010AutomatedCore resolution matching
REQ-RULES-RWAC-002TV-002-001 to TV-002-006AutomatedFallback control logic
REQ-RULES-RWAC-003TV-003-001 to TV-003-004AutomatedPriority resolution
REQ-RULES-RWAC-004TV-004-001 to TV-004-004AutomatedError well outcomes

Traceability to Existing Tests

RequirementJira TestsConfigStatus
REQ-RULES-RWAC-001BT-5687, BT-5706, BT-5707v3/v30/v31Existing
REQ-RULES-RWAC-001BT-5300, BT-5013v2Existing
REQ-RULES-RWAC-002BT-5770, BT-5771, BT-5250v3/v30/v31Existing
REQ-RULES-RWAC-002BT-5346v2Existing
REQ-RULES-RWAC-003BT-5262CustomExisting
REQ-RULES-RWAC-004BT-5266CustomExisting

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
--No gaps identified--

All requirements are covered by existing Behat tests. Test vectors align with documented acceptance criteria and existing test scenarios from the SRS. Note: Original references (BT-674, BT-3300, BT-4461, BT-4900) were epics/stories; replaced with actual test IDs.

Coverage Verification

RequirementAC CountTV CountMapping
REQ-RULES-RWAC-001510Status Match (2), All Wells (4), Null Status (1), No Control (3)
REQ-RULES-RWAC-00246Fallback Application (4), No Controls (2)
REQ-RULES-RWAC-00324Priority Selection (4)
REQ-RULES-RWAC-00424Error Outcome Replacement (4)