Skip to main content
Version: 3.0.1

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

IDCore BehaviorPriorityStatus
REQ-RULES-RRES-001Sets well LIMS export from resolution code configurationHIGHDraft

Key Integration Points: Resolution Code Configuration, Well Management, LIMS Export Pipeline, Rules Engine

Rule Summary

PropertyValue
NameRRESOLUTION
TriggersWhen well has resolution code with LIMS export enabled
OutputSets 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

TermDefinition
Resolution CodeA code assigned to a well during manual intervention that can override automated result processing
LIMS ExportThe value sent to the Laboratory Information Management System representing the well result
Managed DirectlyWells 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

DirectionDataSource/Target
InputWell with resolution code assignmentWell Management
InputResolution code LIMS export configurationResolution Code Configuration
OutputLIMS export valueWell 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

OptionDefaultDescriptionAffects
resolution_code.sets_lims_exportfalseBoolean flag to enable LIMS export setting for a resolution codeREQ-RULES-RRES-001
resolution_code.lims_export_valuenullThe LIMS export value to assign when the flag is enabledREQ-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

IDQuestionSourceOwnerDate Raised
OQ-001No UI specifications identified in source material. Resolution code configuration UI details should be documented if available.UI Detail@tbd2026-01-23

Implementation (Illustrative)

ComponentLocation
Rule ClassAnalyzer/Rules/RresolutionRule.php
LIMS Status SetterAnalyzer/Rules/Concerns/SetLimsStatusToWell.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-RRES-001Set Well LIMS Export from Resolution CodeTestRresolutionRule.handle()See scenariosDraft

Acceptance Tests

Test: REQ-RULES-RRES-001

Back to requirement

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

Design DocumentRelevant Sections
SDD AlgorithmsRules 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 ItemSource ReferenceDisposition
REQ-RULES-RRES-001 (Resolution LIMS Export)3.0.0-RRESOLUTION / Objective, Row 1Preserved 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)