RRESOLUTION Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: Resolution-based LIMS export for wells with assigned resolution codes Domain: RULES-RRES Precedence: Part of rules engine execution (Epic BT-674)
Statement
The system shall set a well's LIMS export value based on its assigned resolution code configuration when the resolution code is configured to set a LIMS Export code.
This rule enables manual intervention in automated result processing by allowing resolution codes to directly control LIMS export values. The rule only activates when both conditions are met: the well has a resolution code assigned AND that resolution code has LIMS Export configuration enabled.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-RRES-001 | Sets well LIMS export from resolution code configuration | HIGH | Draft |
Key Integration Points: Resolution Code Configuration, Well Management, LIMS Export Pipeline, Rules Engine
Rule Summary
| Property | Value |
|---|---|
| Name | RRESOLUTION |
| Triggers | When well has resolution code with LIMS export enabled |
| Output | Sets LIMS export value on well |
Rule Flowchart (Illustrative)
This diagram illustrates the rule's decision logic. Both conditions must be satisfied for the rule to modify the well's LIMS export value.
Definitions
| Term | Definition |
|---|---|
| Resolution Code | A code assigned to a well during manual intervention that can override automated result processing |
| LIMS Export | The value sent to the Laboratory Information Management System representing the well result |
| Managed Directly | Wells whose results are controlled via resolution codes rather than automated processing |
Assumptions
- Resolution codes must be pre-configured before the rule can apply them
- Wells support resolution code assignment
- Resolution codes can optionally be configured to set LIMS Export values
- The RRESOLUTION rule is part of the overall rules engine execution (Epic BT-674)
Requirements
Resolution-Based LIMS Export (REQ-RULES-RRES-001)
FR-RRES-001: Set Well LIMS Export from Resolution Code
The system shall set a well's LIMS export value based on its assigned resolution code's configuration when the resolution code is configured to set a LIMS Export code.
Inputs/Outputs
| Direction | Data | Source/Target |
|---|---|---|
| Input | Well with resolution code assignment | Well Management |
| Input | Resolution code LIMS export configuration | Resolution Code Configuration |
| Output | LIMS export value | Well record |
Acceptance Criteria
Core Behavior:
- Given a well with a resolution code assigned AND the resolution code is configured to set a LIMS Export code, when the RRESOLUTION rule is executed, then the well's LIMS export shall be set to the resolution code's LIMS Export value
No Modification Conditions:
- Given a well without a resolution code, when the RRESOLUTION rule is executed, then the well's LIMS export shall not be modified by this rule
- Given a well with a resolution code assigned AND the resolution code is NOT configured to set a LIMS Export code, when the RRESOLUTION rule is executed, then the well's LIMS export shall not be modified by this rule
Precondition Evaluation:
- The rule shall evaluate both preconditions: (1) resolution code exists AND (2) resolution code has LIMS Export configuration
- The system shall verify resolution code presence via:
well.resolution_code IS NOT NULL - The system shall verify LIMS export flag via:
resolution_code.sets_lims_export = TRUE - The system shall perform output assignment via:
well.lims_export = resolution_code.lims_export_value
Error Handling
- No resolution code assigned: rule does not modify the well
- Resolution code lacks LIMS export configuration: rule does not modify the well
Trace: Source: 3.0.0-RRESOLUTION / Objective, Requirements Table (Row 1) | Jira: BT-674 (Epic) | Tests: See scenarios
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
resolution_code.sets_lims_export | false | Boolean flag to enable LIMS export setting for a resolution code | REQ-RULES-RRES-001 |
resolution_code.lims_export_value | null | The LIMS export value to assign when the flag is enabled | REQ-RULES-RRES-001 |
Notes
- Rule ID: RRESOLUTION
- This rule applies when wells are "managed directly" via resolution codes
- Resolution codes provide a mechanism for manual intervention in automated result processing
- The rule only affects LIMS export when both conditions are met: (1) resolution code exists, and (2) resolution code has LIMS Export configuration
- The rule may interact with other resolution-based rules and LIMS export processing rules
Open Questions
| ID | Question | Source | Owner | Date Raised |
|---|---|---|---|---|
| OQ-001 | No UI specifications identified in source material. Resolution code configuration UI details should be documented if available. | UI Detail | @tbd | 2026-01-23 |
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/RresolutionRule.php |
| LIMS Status Setter | Analyzer/Rules/Concerns/SetLimsStatusToWell.php |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-RRES-001 | Set Well LIMS Export from Resolution Code | Test | RresolutionRule.handle() | See scenarios | Draft |
Acceptance Tests
Test: REQ-RULES-RRES-001
Test: Resolution code with LIMS export configuration sets well export
Given: A well has a resolution code assigned
And: The resolution code is configured to set a LIMS Export code
And: The resolution code's LIMS Export value is "RESOLVED_POS"
When: The RRESOLUTION rule is executed
Then: The well's LIMS export shall be set to "RESOLVED_POS"
Test: Well without resolution code is not modified
Given: A well without a resolution code assigned
And: The well's current LIMS export value is "ORIGINAL_VALUE"
When: The RRESOLUTION rule is executed
Then: The well's LIMS export shall remain "ORIGINAL_VALUE"
And: The RRESOLUTION rule shall not modify the well
Test: Resolution code without LIMS export configuration does not modify well
Given: A well has a resolution code assigned
And: The resolution code is NOT configured to set a LIMS Export code
And: The well's current LIMS export value is "ORIGINAL_VALUE"
When: The RRESOLUTION rule is executed
Then: The well's LIMS export shall remain "ORIGINAL_VALUE"
And: The RRESOLUTION rule shall not modify the well
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Rules Engine |
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 do not introduce new capabilities
- Traceability matrix is complete
Reviewer Notes
No Consolidation Applied
This domain contains a single, well-structured requirement that was preserved in its entirety.
| Original Item | Source Reference | Disposition |
|---|---|---|
| REQ-RULES-RRES-001 (Resolution LIMS Export) | 3.0.0-RRESOLUTION / Objective, Row 1 | Preserved as REQ-RULES-RRES-001 |
Rationale: This is a RULES domain requiring conservative handling. The single requirement represents a complete, testable capability. The Given/When/Then acceptance criteria from the source were preserved to maintain analytics precision.
Reversibility: Source file: output/pilot/rules/rule-rresolution/rule-rresolution-restructured.md
Format Conversion Notes
- Converted from legacy SRS format to new readable format
- Added Statement section for quick understanding
- Added Mermaid flowchart illustrating decision logic
- Grouped acceptance criteria by concern (Core Behavior, No Modification, Precondition Evaluation)
- Moved tests to end with back-links
- All normative data preserved (REQ-*, ACs, traceability, tests)