STD: Rule Tags and Automatic Rule Mapping (RULETAGS)
Version: v3.1.0 Status: Draft SRS Source:
docusaurus/docs/srs/kitcfg-ruletags.mdDomain: RULETAGS
Overview
This document specifies tests for the Rule Tags and Automatic Rule Mapping domain, which covers the structured tag system for analysis rules and the tag-driven automatic rule mapping engine introduced in v3.1.0. In v3.0.x, rule mappings were managed entirely through manual configuration or XLSX import. In v3.1.0, rules are annotated with four categories of tags (Mix Property, Role Type, Target Type, Modifier) that declaratively describe which observations each rule applies to. When tags change or a rule is enabled/disabled, the automatic rule mapper regenerates all strict (auto-generated) mappings using a sequence of 26 tag-specific generators.
Domain Characteristics:
- Primary function: Tag-driven automatic rule mapping generation
- Secondary function: Rule tag management UI (SUPER_ADMIN only)
- Tertiary function: Tag compatibility validation and visibility filtering
- Configuration dependency: Site configuration data (rules, roles, targets, control labels, specimens, Westgard limits)
Test Method Rationale: Per Test Plan SS3.3, Rule Tags page operations use TM-UI for access control and layout verification, and TM-API for tag CRUD and availability toggle. The automatic rule mapping engine (REQ-RULETAGS-010) is tested via TM-API: import a configuration, trigger the mapper, and verify generated mappings match expected Cartesian products. This provides deterministic, fast coverage of all 26 generators without UI overhead.
Test Case Convention: Steps describe logical actions, not UI mechanics. Use "Assign Mix Property Tag QUANT to rule" or "Trigger auto mapper", not "Click the dropdown" or "Select option from list". This ensures test intent survives UI redesigns.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-RULETAGS-001 | Rule Tags Page Access | 3 | TC-RULETAGS-001 | 3/3 (100%) | TM-UI | None |
| REQ-RULETAGS-002 | Rule Tags Table Display | 4 | TC-RULETAGS-002 | 4/4 (100%) | TM-API, TM-UI | None |
| REQ-RULETAGS-003 | Rule Tags Table Columns | 6 | TC-RULETAGS-002 | 6/6 (100%) | TM-UI | None |
| REQ-RULETAGS-004 | Rule Availability Toggle | 3 | TC-RULETAGS-003 | 3/3 (100%) | TM-API | None |
| REQ-RULETAGS-005 | Tag Category Multi-Select Dropdowns | 5 | TC-RULETAGS-004 | 5/5 (100%) | TM-API, TM-UI | None |
| REQ-RULETAGS-006 | Tag Compatibility Validation | 4 | TC-RULETAGS-005 | 4/4 (100%) | TM-API | None |
| REQ-RULETAGS-007 | HIDDEN Modifier Tag Visibility | 3 | TC-RULETAGS-006 | 3/3 (100%) | TM-API | None |
| REQ-RULETAGS-008 | Tag Changes Trigger Auto Mapper | 4 | TC-RULETAGS-007 | 4/4 (100%) | TM-API | None |
| REQ-RULETAGS-009 | Rule Tags Help Data | 3 | TC-RULETAGS-008 | 3/3 (100%) | TM-UI | None |
| REQ-RULETAGS-010 | Automatic Rule Mapping Engine | 43 | TC-RULETAGS-009 through TC-RULETAGS-018 | 43/43 (100%) | TM-API | None |
Totals: 10 REQs, 78 ACs, 18 Test Cases, 100% Coverage
Test Cases
TC-RULETAGS-001: Rule Tags page access control
Verifies: REQ-RULETAGS-001 (AC1-3: Page Access)
Method: TM-UI
Priority: High
Version: @V3_1_0
Preconditions:
- Application deployed with v3.1.0 codebase
- Config Mode available (site has config_mode enabled)
- Users with SUPER_ADMIN and non-SUPER_ADMIN roles exist
Test Data:
| User | Role | Expected Visibility |
|---|---|---|
| User A | SUPER_ADMIN | Rule Tags link visible |
| User B | CLIENT_CONFIG | Rule Tags link NOT visible |
| User C | MANAGER | Rule Tags link NOT visible |
Steps:
- Log in as SUPER_ADMIN user and enter Config Mode
- Navigate to "Other Settings" submenu in the config sidebar
- Verify "Rule Tags" link is visible
- Click "Rule Tags" link and verify navigation to
/rule-tags?config_mode=true - Log in as non-SUPER_ADMIN user (CLIENT_CONFIG)
- Enter Config Mode and navigate to "Other Settings" submenu
- Verify "Rule Tags" link is NOT visible
Expected Results:
- AC1: Rule Tags link appears in "Other Settings" submenu for SUPER_ADMIN role
- AC2: Rule Tags link is not visible for non-SUPER_ADMIN roles
- AC3: Page accessible at route
/rule-tags?config_mode=true
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-001-001 | SUPER_ADMIN sees Rule Tags link | SUPER_ADMIN in Config Mode | Link visible in Other Settings | @V3_1_0 |
| TV-001-002 | CLIENT_CONFIG cannot see Rule Tags link | CLIENT_CONFIG in Config Mode | Link not visible | @V3_1_0 |
| TV-001-003 | Rule Tags page route accessible | SUPER_ADMIN clicks Rule Tags | Navigates to /rule-tags?config_mode=true | @V3_1_0 |
Automation Status: Planned (browser test)
Jira: BT-4820
TC-RULETAGS-002: Rule Tags table display and columns
Verifies: REQ-RULETAGS-002 (AC1-4: Table Display), REQ-RULETAGS-003 (AC1-6: Table Columns)
Method: TM-API, TM-UI
Priority: High
Version: @V3_1_0
Preconditions:
- User with SUPER_ADMIN role on Rule Tags page
- Multiple rules configured with various tag assignments
Test Data:
- Rule A: Mix Property = [QUANT], Role Type = [PATIENT], Target Type = [NON_IC_TARGETS], Modifier = []
- Rule B: Mix Property = [SYSTEM], Role Type = [PATIENT, PC], Target Type = [], Modifier = [HIDDEN]
- Rule C: No tags assigned
Steps:
- Navigate to Rule Tags page as SUPER_ADMIN
- Verify sticky header with title "Rule Tags" is displayed
- Verify API calls to
GET /api/plain-rulesandGET /api/rule-tagsare made on page load - Verify table lists all rules with their current tag assignments across four tag categories
- Verify column layout: Rule (25%), Availability (8%), Mix Property Tags (17%), Role Type Tags (17%), Target Type Tags (17%), Modifier Tags (16%)
- Verify each rule row shows correct tag values in each column
Expected Results:
- REQ-002 AC1: Sticky header with title "Rule Tags" and optional Help Data button displayed
- REQ-002 AC2: Rules fetched from
GET /api/plain-rulesand tags fromGET /api/rule-tags - REQ-002 AC3: Both API calls made on page load
- REQ-002 AC4: Table lists all rules with current tag assignments across all four categories
- REQ-003 AC1: Rule column (25% width, read-only rule title)
- REQ-003 AC2: Availability column (8% width, toggle)
- REQ-003 AC3: Mix Property Tags column (17% width, multi-select dropdown)
- REQ-003 AC4: Role Type Tags column (17% width, multi-select dropdown)
- REQ-003 AC5: Target Type Tags column (17% width, multi-select dropdown)
- REQ-003 AC6: Modifier Tags column (16% width, multi-select dropdown)
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-002-001 | Table displays all rules | Page load | All rules listed with tag assignments | @V3_1_0 |
| TV-002-002 | Column layout correct | Page load | Six columns with specified widths | @V3_1_0 |
| TV-002-003 | API endpoints called | Page load | GET /api/plain-rules and GET /api/rule-tags called | @V3_1_0 |
Automation Status: Planned (browser test for layout; API test for data)
Jira: BT-4820
TC-RULETAGS-003: Rule availability toggle
Verifies: REQ-RULETAGS-004 (AC1-3: Availability Toggle)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Rules with existing tag assignments and generated mappings
- At least one rule currently enabled, one currently disabled
Test Data:
- Rule X: enabled, Mix Property = [QUANT], Role Type = [PATIENT] -- has auto-generated mappings
- Rule Y: disabled, Mix Property = [QUAL], Role Type = [PATIENT] -- no mappings
Steps:
- Disable Rule X via
PUT /api/plain-rules/{rule}withis_enabled: false - Query rule mappings for Rule X and verify all are deleted
- Enable Rule Y via
PUT /api/plain-rules/{rule}withis_enabled: true - Query rule mappings for Rule Y and verify new mappings were generated based on its tags
Expected Results:
- AC1: Disabling a rule deletes all associated RuleMapping records
- AC2: Enabling a previously disabled rule triggers the automatic rule mapper to create/update rule mappings
- AC3: Toggle updates via
PUT /api/plain-rules/{rule}
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-003-001 | Disable rule deletes mappings | Disable enabled rule | All mappings for rule deleted | @V3_1_0 |
| TV-003-002 | Enable rule triggers mapper | Enable disabled rule with tags | New mappings generated per tags | @V3_1_0 |
| TV-003-003 | Enable rule with no tags | Enable disabled rule with no Mix Property Tags | No mappings generated | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-004: Tag category multi-select dropdowns
Verifies: REQ-RULETAGS-005 (AC1-5: Tag Dropdowns)
Method: TM-API, TM-UI
Priority: High
Version: @V3_1_0
Preconditions:
- SUPER_ADMIN user on Rule Tags page
- Roles configured (e.g., PATIENT, PC, QUANTIFICATION, CROSSOVER, SAMPLE, IC, NEGATIVE)
Test Data:
- Mix Property Tags: 25 predefined values (SYSTEM, QUANT, QUAL, COMBINED_OUTCOME, CT_DELTA, CLS_DISCREPANCY, CLS_INVERT_SIGMOID, CT_DISCREPANCY, MIN_FL, MAX_FL, STORED_STANDARD, QUANTIFY_IN_RUN, ADJACENT_WELL, CONTROL_LIMITS, THRESHOLD, QUANT_ROUNDING, MULTI_MIX_KIT, NEG_CONTROL, POS_CONTROL, NEG_IC_CONTROL, CT_INHIBITION_DELTA, LOD_QUANT, LOD_QUAL, EXTRACTION_CONTROLS, AUTO_BASELINE)
- Role Type Tags: dynamic from
Role::typesInUppercase() - Target Type Tags: IC_TARGETS, NON_IC_TARGETS, PASSIVE_TARGETS, ROLE_SPECIFIED_TARGETS
- Modifier Tags: HIDDEN
Steps:
- Open Mix Property Tags dropdown on a rule row
- Verify all 25 predefined options are listed
- Select multiple tags and verify multi-select works
- Open Role Type Tags dropdown
- Verify dynamic values derived from
Role::typesInUppercase()are listed - Open Target Type Tags dropdown and verify 4 options
- Open Modifier Tags dropdown and verify HIDDEN is listed
- Trigger an API call and verify all dropdowns are disabled during the call
Expected Results:
- AC1: Mix Property Tags dropdown lists all 25 predefined values
- AC2: Role Type Tags dropdown lists values dynamically from
Role::typesInUppercase() - AC3: Target Type Tags dropdown lists IC_TARGETS, NON_IC_TARGETS, PASSIVE_TARGETS, ROLE_SPECIFIED_TARGETS
- AC4: Modifier Tags dropdown lists HIDDEN
- AC5: All dropdowns disabled during API calls
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-004-001 | Mix Property dropdown options | Open dropdown | 25 predefined values listed | @V3_1_0 |
| TV-004-002 | Role Type dropdown dynamic | Open dropdown | Values match Role::typesInUppercase() | @V3_1_0 |
| TV-004-003 | Target Type dropdown options | Open dropdown | 4 values listed | @V3_1_0 |
| TV-004-004 | Modifier dropdown options | Open dropdown | HIDDEN listed | @V3_1_0 |
| TV-004-005 | Dropdowns disabled during API | Trigger API call | All dropdowns disabled | @V3_1_0 |
Automation Status: Planned (browser test for dropdown behavior; API test for tag values)
Jira: BT-4820
TC-RULETAGS-005: Tag compatibility validation
Verifies: REQ-RULETAGS-006 (AC1-4: Compatibility Validation)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- SUPER_ADMIN user on Rule Tags page
- Tag definitions include
not_available_withproperties
Test Data:
| Scenario | Tag A | Tag B | Expected |
|---|---|---|---|
| Incompatible pair | CLS_DISCREPANCY | CLS_INVERT_SIGMOID | Warning modal, selection prevented |
| Compatible pair | QUANT | THRESHOLD | Saved without warning |
Steps:
- Select CLS_DISCREPANCY on a rule that already has CLS_INVERT_SIGMOID
- Verify modal warning is displayed indicating the incompatible combination
- Verify the incompatible selection is prevented (not saved)
- Select QUANT and THRESHOLD on the same rule
- Verify no warning is shown and the selection is saved
Expected Results:
- AC1: Tags define
not_available_withproperty listing incompatible tags - AC2: Incompatible combination triggers modal warning and selection is prevented
- AC3: Validation performed before saving to the API
- AC4: Compatible tag selections saved without warning
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-005-001 | Incompatible tags rejected | Select CLS_DISCREPANCY with CLS_INVERT_SIGMOID | Modal warning, selection prevented | @V3_1_0 |
| TV-005-002 | Compatible tags accepted | Select QUANT + THRESHOLD | Saved without warning | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-006: HIDDEN modifier tag visibility
Verifies: REQ-RULETAGS-007 (AC1-3: HIDDEN Tag Visibility)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- A rule tagged with HIDDEN modifier
- SUPER_ADMIN and non-SUPER_ADMIN users
Test Data:
- Rule Z: Modifier = [HIDDEN], Mix Property = [SYSTEM]
- User A: SUPER_ADMIN
- User B: MANAGER
Steps:
- As SUPER_ADMIN, query rules and verify Rule Z is included
- As SUPER_ADMIN, view Modifier Tags dropdown and verify HIDDEN is available
- As MANAGER, query rules via API and verify Rule Z is NOT included in results
- As MANAGER, verify HIDDEN tag is not available in any tag dropdown
Expected Results:
- AC1: HIDDEN tag visible in Modifier Tags dropdown for SUPER_ADMIN users only
- AC2: Rules tagged as HIDDEN filtered out at SQL level for non-SUPER_ADMIN users
- AC3: HIDDEN rules not included when non-SUPER_ADMIN users query rules elsewhere in the application
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-006-001 | SUPER_ADMIN sees HIDDEN rules | Query rules as SUPER_ADMIN | HIDDEN rules included | @V3_1_0 |
| TV-006-002 | Non-SUPER_ADMIN filtered | Query rules as MANAGER | HIDDEN rules excluded | @V3_1_0 |
| TV-006-003 | HIDDEN tag in dropdown | SUPER_ADMIN views Modifier dropdown | HIDDEN option available | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-007: Tag changes trigger auto mapper
Verifies: REQ-RULETAGS-008 (AC1-4: Trigger Behavior)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Enabled rule with existing tag assignments and mappings
- Disabled rule with tag assignments
- Site with configured mixes, roles, and targets
Test Data:
- Rule E (enabled): Mix Property = [QUANT], Role Type = [PATIENT] -- has QUANT mappings
- Rule D (disabled): Mix Property = [QUAL], Role Type = [PATIENT] -- no mappings
Steps:
- Change Mix Property Tags on enabled Rule E from [QUANT] to [QUAL] via
PUT /api/plain-rules/{rule} - Verify the auto mapper re-runs and old QUANT mappings are replaced with QUAL mappings
- Change Mix Property Tags on disabled Rule D from [QUAL] to [THRESHOLD]
- Verify the tags are stored but no rule mapping regeneration occurs (no mappings exist)
- Enable Rule D via
PUT /api/plain-rules/{rule}withis_enabled: true - Verify the mapper runs using Rule D's current tags (THRESHOLD) and generates appropriate mappings
Expected Results:
- AC1: Tag change on enabled rule triggers mapper and regenerates mappings based on new tags
- AC2: Tag change on disabled rule stores tags but no mapping regeneration occurs
- AC3: Re-enabling a disabled rule triggers mapper using current tag configuration
- AC4: Update submitted via
PUT /api/plain-rules/{rule}with updated tag arrays andis_enabledstatus
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-007-001 | Tag change on enabled rule | Change QUANT to QUAL on enabled rule | Old mappings replaced with QUAL mappings | @V3_1_0 |
| TV-007-002 | Tag change on disabled rule | Change QUAL to THRESHOLD on disabled rule | Tags stored, no mappings generated | @V3_1_0 |
| TV-007-003 | Re-enable uses current tags | Enable disabled rule with THRESHOLD tags | THRESHOLD mappings generated | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-008: Rule Tags Help Data toggle
Verifies: REQ-RULETAGS-009 (AC1-3: Help Data)
Method: TM-UI
Priority: Low
Version: @V3_1_0
Preconditions:
- SUPER_ADMIN user on Rule Tags page
- help_items feature flag can be toggled
Steps:
- Enable the
help_itemsfeature flag - Navigate to Rule Tags page
- Verify "Help Data" button is visible in the sticky header
- Click the button and verify the HelpWidget toggles
- Disable the
help_itemsfeature flag - Refresh Rule Tags page
- Verify "Help Data" button is NOT visible
Expected Results:
- AC1: Help Data button visible when
help_itemsfeature flag is enabled - AC2: Clicking the button toggles the HelpWidget component for the "Rule Tags" page
- AC3: Help Data button not visible when
help_itemsfeature is disabled
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-008-001 | Help button visible when enabled | help_items = true | Button visible | @V3_1_0 |
| TV-008-002 | Help button hidden when disabled | help_items = false | Button not visible | @V3_1_0 |
Automation Status: Planned (browser test)
Jira: BT-4820
TC-RULETAGS-009: Auto mapper core behavior
Verifies: REQ-RULETAGS-010 (Core Mapper Behavior ACs, Cartesian Product and Compatibility ACs)
Method: TM-API
Priority: Critical
Version: @V3_1_0
Preconditions:
- Site with complete configuration: mixes, roles, targets, control labels, specimens
- Rules with various Mix Property Tag assignments
- Existing strict (auto-generated) and custom (user-defined) mappings
Test Data:
- 2 mixes: Mix A (quantitative, 3 targets incl. IC), Mix B (qualitative, 2 targets)
- Roles: Patient, PC, NC, Sample
- Control label mappings for PC on Mix A
- Rule R1: Mix Property = [QUANT], Role Type = [PATIENT], Target Type = [NON_IC_TARGETS]
Steps:
- Assign tags to Rule R1 and trigger auto mapper via
PUT /api/plain-rules/{rule} - Verify the mapper job dispatches
- Verify generated mappings match the Cartesian product of compatible (rule, role, target) combinations
- Verify Role-Rule compatibility: only roles whose type matches a Role Type Tag on the rule
- Verify Target Type filtering: NON_IC_TARGETS excludes IC and passive targets
- Verify deduplication via hash key (rule + role + target + specimen + site)
- Verify all existing strict mappings for the site are deleted before new mappings inserted
- Verify batch insert of new mappings
- Verify audit records created for new mappings
Expected Results:
- Core-AC1: Tag change or enable/disable dispatches mapper job
- Core-AC2: Mapper loads all site configuration data with indexed caching
- Core-AC3: 26 generators run in sequence producing deduplicated mapping records
- Core-AC4: Deduplication uses hash key combining rule, role, target, specimen, site identifiers
- Core-AC5: All existing strict mappings deleted before new mappings inserted
- Core-AC6: All generated mappings inserted in batches
- Core-AC7: Audit records created for new mappings only
- Core-AC8: Disabled rule has all mappings deleted
- Core-AC9: Re-enabled disabled rule regenerates mappings based on tags
- Compat-AC1: Role-Rule compatibility: rule must have role's type as Role Type Tag
- Compat-AC2: Sample/Crossover roles always compatible with targets
- Compat-AC3: Other roles require control label mapping for role-mix combination
- Compat-AC4: IC_TARGETS tag: only IC targets included
- Compat-AC5: NON_IC_TARGETS tag: only non-IC, non-passive targets included
- Compat-AC6: PASSIVE_TARGETS tag: only passive targets included
- Compat-AC7: ROLE_SPECIFIED_TARGETS tag: role must have control label affected target mapping
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-009-001 | Mapper dispatched on tag change | Change tags on enabled rule | Mapper job dispatched | @V3_1_0 |
| TV-009-002 | Strict mappings replaced | Trigger mapper with existing strict mappings | Old strict mappings deleted, new inserted | @V3_1_0 |
| TV-009-003 | IC_TARGETS filtering | Rule with IC_TARGETS tag | Mappings only for IC targets | @V3_1_0 |
| TV-009-004 | NON_IC_TARGETS filtering | Rule with NON_IC_TARGETS tag | IC and passive targets excluded | @V3_1_0 |
| TV-009-005 | PASSIVE_TARGETS filtering | Rule with PASSIVE_TARGETS tag | Mappings only for passive targets | @V3_1_0 |
| TV-009-006 | ROLE_SPECIFIED_TARGETS filtering | Rule with ROLE_SPECIFIED_TARGETS tag | Only targets with control label affected target mapping | @V3_1_0 |
| TV-009-007 | Role-Rule compatibility | Rule with Role Type = [PATIENT] | Only patient-typed roles get mappings | @V3_1_0 |
| TV-009-008 | Control role requires control label | Rule applied to PC role | Mapping only when control label mapping exists for role-mix | @V3_1_0 |
| TV-009-009 | Deduplication by hash key | Mapper runs with overlapping generators | No duplicate mappings in output | @V3_1_0 |
Automation Status: Planned (API test)
TC-RULETAGS-010: Patient generators -- Quantification and Qualification
Verifies: REQ-RULETAGS-010 (AC-010-01 QUANT, AC-010-02 QUAL, AC-010-11 STORED_STANDARD, AC-010-12 QUANTIFY_IN_RUN)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Mix A: quantitative (Stored Curve method), targets T1, T2
- Mix B: quantitative (In-Run Standards method), targets T3, T4
- Mix C: qualitative, targets T5, T6
- Rules with QUANT, QUAL, STORED_STANDARD, QUANTIFY_IN_RUN Mix Property Tags enabled
- Patient and Sample role types configured
Steps:
- Trigger auto mapper for all rules
- Verify QUANT generator produces mappings only for targets in quantitative mixes (T1-T4) on patient roles
- Verify QUAL generator produces mappings only for targets in qualitative mixes (T5, T6) on patient roles
- Verify STORED_STANDARD generator produces mappings only for targets in Stored Curve mixes (T1, T2)
- Verify QUANTIFY_IN_RUN generator produces mappings only for targets in In-Run Standards mixes (T3, T4)
Expected Results:
- AC-010-01: QUANT mappings created only for quantitative mix targets with expected quantification method
- AC-010-02: QUAL mappings created only for qualitative mix targets
- AC-010-11: STORED_STANDARD mappings created only for Stored Curve quantification mixes
- AC-010-12: QUANTIFY_IN_RUN mappings created only for In-Run Standards quantification mixes
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-010-001 | QUANT maps to quantitative targets | QUANT-tagged rule, mixed mixes | Mappings for T1-T4 only | @V3_1_0 |
| TV-010-002 | QUAL maps to qualitative targets | QUAL-tagged rule, mixed mixes | Mappings for T5-T6 only | @V3_1_0 |
| TV-010-003 | STORED_STANDARD selects Stored Curve | STORED_STANDARD-tagged rule | Mappings for T1-T2 (Stored Curve) only | @V3_1_0 |
| TV-010-004 | QUANTIFY_IN_RUN selects In-Run Standards | QUANTIFY_IN_RUN-tagged rule | Mappings for T3-T4 (In-Run) only | @V3_1_0 |
| TV-010-005 | QUANT excludes qualitative mixes | QUANT-tagged rule | No mappings for T5-T6 | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-011: Patient generators -- Threshold, Delta CT, and CT Inhibition
Verifies: REQ-RULETAGS-010 (AC-010-03 THRESHOLD, AC-010-04 CT_DELTA, AC-010-05 CT_INHIBITION_DELTA)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Target T1: expected threshold = 25.0, delta CT combination configured, CT inhibition delta = 3
- Target T2: no threshold, no delta CT, no CT inhibition delta
- Target T3: expected threshold = 30.0, no delta CT, CT inhibition delta = 5
- Rules with THRESHOLD, CT_DELTA, CT_INHIBITION_DELTA Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify THRESHOLD generator produces mappings only for targets with expected threshold set (T1, T3)
- Verify CT_DELTA generator produces mappings only for targets with delta CT combination configured (T1)
- Verify CT_INHIBITION_DELTA generator produces mappings only for targets with CT inhibition delta set and not empty (T1, T3)
- Verify no mappings generated for T2 by any of these generators
Expected Results:
- AC-010-03: THRESHOLD mappings created only for targets with expected threshold value set
- AC-010-04: CT_DELTA mappings created only for targets with delta CT combination configured
- AC-010-05: CT_INHIBITION_DELTA mappings created only for targets with CT inhibition delta set (not empty)
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-011-001 | THRESHOLD filters by threshold | THRESHOLD-tagged rule | Mappings for T1, T3 (have threshold) | @V3_1_0 |
| TV-011-002 | CT_DELTA filters by delta CT | CT_DELTA-tagged rule | Mappings for T1 only (has delta CT) | @V3_1_0 |
| TV-011-003 | CT_INHIBITION_DELTA filters | CT_INHIBITION_DELTA-tagged rule | Mappings for T1, T3 (have inhibition delta) | @V3_1_0 |
| TV-011-004 | Target without any config excluded | T2 has no threshold/delta/inhibition | No mappings for T2 from any generator | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-012: Patient generators -- CLS Discrepancy and Invert Sigmoid
Verifies: REQ-RULETAGS-010 (AC-010-06 CLS_DISCREPANCY, AC-010-07 CLS_INVERT_SIGMOID, AC-010-08 CT_DISCREPANCY)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Target T1:
should_check_cls_discrepancy= true, NO active calibration withis_hide_invert_sigmoid - Target T2:
should_check_cls_discrepancy= true, HAS active calibration withis_hide_invert_sigmoid= true - Target T3:
should_check_cls_discrepancy= false - Target T4: CT discrepancy configured
- Rules with CLS_DISCREPANCY, CLS_INVERT_SIGMOID, CT_DISCREPANCY Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify CLS_DISCREPANCY generator creates mappings for T1 (cls discrepancy = true, no invert sigmoid calibration) but NOT T2 or T3
- Verify CLS_INVERT_SIGMOID generator creates mappings for T2 (cls discrepancy = true, has invert sigmoid calibration) but NOT T1 or T3
- Verify CLS_DISCREPANCY and CLS_INVERT_SIGMOID are mutually exclusive per target
- Verify CT_DISCREPANCY generator creates mappings for T4 only
- Activate a calibration with
is_hide_invert_sigmoidon T1 - Verify mapper is re-dispatched and T1 now gets CLS_INVERT_SIGMOID mappings instead of CLS_DISCREPANCY
Expected Results:
- AC-010-06: CLS_DISCREPANCY mappings for targets with cls discrepancy enabled AND no active invert sigmoid calibration
- AC-010-07: CLS_INVERT_SIGMOID mappings for targets with cls discrepancy enabled AND active invert sigmoid calibration; mapper dispatched on calibration activation/removal
- AC-010-08: CT_DISCREPANCY mappings for targets with CT discrepancy configured
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-012-001 | CLS_DISCREPANCY without invert sigmoid | T1: cls_disc=true, no calib | CLS_DISCREPANCY mappings for T1 | @V3_1_0 |
| TV-012-002 | CLS_INVERT_SIGMOID with invert sigmoid | T2: cls_disc=true, calib active | CLS_INVERT_SIGMOID mappings for T2 | @V3_1_0 |
| TV-012-003 | Mutual exclusivity | T1 and T2 | No target has both CLS_DISC and CLS_INVERT mappings | @V3_1_0 |
| TV-012-004 | CT_DISCREPANCY filtering | CT_DISCREPANCY-tagged rule | Mappings for T4 only | @V3_1_0 |
| TV-012-005 | Calibration activation triggers mapper | Activate invert sigmoid calibration on T1 | Mapper re-dispatched, T1 gets CLS_INVERT mappings | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-013: Patient generators -- Fluorescence, Adjacent, Baseline, and Rounding
Verifies: REQ-RULETAGS-010 (AC-010-09 MIN_FL, AC-010-10 MAX_FL, AC-010-13 ADJACENT_WELL, AC-010-14 QUANT_ROUNDING, AC-010-15 AUTO_BASELINE)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Target T1: min fluorescence = 100, max fluorescence = 50000, cross contamination limits configured, quantity reportings configured, automatic baseline enabled
- Target T2: no min/max fluorescence, no cross contamination, no quantity reportings, no auto baseline
- Rules with MIN_FL, MAX_FL, ADJACENT_WELL, QUANT_ROUNDING, AUTO_BASELINE Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify MIN_FL generator creates mappings only for T1 (has min fluorescence)
- Verify MAX_FL generator creates mappings only for T1 (has max fluorescence)
- Verify ADJACENT_WELL generator creates mappings only for T1 (has cross contamination limits)
- Verify QUANT_ROUNDING generator creates mappings only for T1 (has quantity reportings)
- Verify AUTO_BASELINE generator creates mappings only for T1 (has auto baseline)
- Verify T2 receives no mappings from any of these generators
Expected Results:
- AC-010-09: MIN_FL mappings for targets with minimum fluorescence value set
- AC-010-10: MAX_FL mappings for targets with maximum fluorescence value set
- AC-010-13: ADJACENT_WELL mappings for targets with cross contamination limits configured
- AC-010-14: QUANT_ROUNDING mappings for targets with quantity reportings configured
- AC-010-15: AUTO_BASELINE mappings for targets with automatic baseline enabled
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-013-001 | MIN_FL filters by min fluorescence | MIN_FL-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-013-002 | MAX_FL filters by max fluorescence | MAX_FL-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-013-003 | ADJACENT_WELL filters by cross contam | ADJACENT_WELL-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-013-004 | QUANT_ROUNDING filters by reportings | QUANT_ROUNDING-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-013-005 | AUTO_BASELINE filters by baseline | AUTO_BASELINE-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-013-006 | Unconfigured target excluded | T2 has none of the features | No mappings for T2 | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-014: Patient generators -- LOD Quantitative and LOD Qualitative
Verifies: REQ-RULETAGS-010 (AC-010-16 LOD_QUANT, AC-010-17 LOD_QUAL)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Target T1: has quantitative LoD reportings (group 1 quant reportings)
- Target T2: has qualitative LoD reportings (group 1 qual reportings)
- Target T3: has both quant and qual LoD reportings
- Target T4: no LoD reportings
- Rules with LOD_QUANT and LOD_QUAL Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify LOD_QUANT generator creates mappings only for targets with quantitative LoD reportings (T1, T3)
- Verify LOD_QUAL generator creates mappings only for targets with qualitative LoD reportings (T2, T3)
- Verify T4 gets no LoD-related mappings
Expected Results:
- AC-010-16: LOD_QUANT mappings for targets with quantitative LoD reportings (group 1 quant)
- AC-010-17: LOD_QUAL mappings for targets with qualitative LoD reportings (group 1 qual)
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-014-001 | LOD_QUANT maps quant LoD targets | LOD_QUANT-tagged rule | Mappings for T1, T3 | @V3_1_0 |
| TV-014-002 | LOD_QUAL maps qual LoD targets | LOD_QUAL-tagged rule | Mappings for T2, T3 | @V3_1_0 |
| TV-014-003 | Target with both LoDs | T3 has both | Mappings from both generators | @V3_1_0 |
| TV-014-004 | No LoD target excluded | T4 has no LoD reportings | No LOD mappings for T4 | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-015: Control generators
Verifies: REQ-RULETAGS-010 (AC-010-18 NEG_CONTROL, AC-010-19 POS_CONTROL, AC-010-20 NEG_IC_CONTROL, AC-010-21 CONTROL_LIMITS, AC-010-22 EXTRACTION_CONTROLS)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Mix A with targets: T1 (verify negative), T2 (verify positive), T3 (verify IC positive, mix has IC target), T4 (verify IC positive, mix has NO IC target)
- Control label mapping for PC role on Mix A
- Control range setting exists for PC-T1 pair
- Target T5: extraction controls configured
- Rules with NEG_CONTROL, POS_CONTROL, NEG_IC_CONTROL, CONTROL_LIMITS, EXTRACTION_CONTROLS Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify NEG_CONTROL generator creates mappings for T1 (configured to verify as negative)
- Verify POS_CONTROL generator creates mappings for T2 (configured to verify as positive)
- Verify NEG_IC_CONTROL generator creates mappings for T3 (verify IC positive AND mix has IC target) but NOT T4 (mix has no IC target)
- Verify CONTROL_LIMITS generator creates mappings only when control range setting exists for the role-target pair (PC-T1)
- Verify EXTRACTION_CONTROLS generator creates mappings for T5 (has extraction controls)
Expected Results:
- AC-010-18: NEG_CONTROL mappings for targets configured to verify as negative
- AC-010-19: POS_CONTROL mappings for targets configured to verify as positive
- AC-010-20: NEG_IC_CONTROL mappings for targets that verify IC positivity AND whose mix has at least one IC target (v3.1.0 change)
- AC-010-21: CONTROL_LIMITS mappings only when control range setting exists for specific role-target pair
- AC-010-22: EXTRACTION_CONTROLS mappings for targets with extraction controls configured
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-015-001 | NEG_CONTROL maps negative verify | NEG_CONTROL-tagged rule | Mappings for T1 | @V3_1_0 |
| TV-015-002 | POS_CONTROL maps positive verify | POS_CONTROL-tagged rule | Mappings for T2 | @V3_1_0 |
| TV-015-003 | NEG_IC_CONTROL with IC target | NEG_IC_CONTROL-tagged rule, mix has IC | Mappings for T3 | @V3_1_0 |
| TV-015-004 | NEG_IC_CONTROL without IC target (v3.1.0) | NEG_IC_CONTROL-tagged rule, mix has no IC | No mappings for T4 | @V3_1_0 |
| TV-015-005 | CONTROL_LIMITS with range setting | CONTROL_LIMITS-tagged rule | Mappings for PC-T1 pair | @V3_1_0 |
| TV-015-006 | CONTROL_LIMITS without range setting | CONTROL_LIMITS-tagged rule, no range for PC-T2 | No mapping for PC-T2 | @V3_1_0 |
| TV-015-007 | EXTRACTION_CONTROLS maps extraction | EXTRACTION_CONTROLS-tagged rule | Mappings for T5 | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-016: System generators
Verifies: REQ-RULETAGS-010 (AC-010-23 SYSTEM, AC-010-24 COMBINED_OUTCOME, AC-010-25 MULTI_MIX_KIT)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Mix A (part of Kit K1 with 2 mixes), targets T1, T2; T1 has outcome-to-LIMS-status mappings
- Mix B (part of Kit K1 with 2 mixes), targets T3, T4
- Mix C (standalone kit with 1 mix), targets T5
- Roles: Patient, PC, Sample
- Control label mapping for PC on Mix A
- Rules with SYSTEM, COMBINED_OUTCOME, MULTI_MIX_KIT Mix Property Tags enabled
Steps:
- Trigger auto mapper
- Verify SYSTEM generator creates mappings for all compatible role-target combinations across all mixes
- Verify COMBINED_OUTCOME generator creates mappings only for T1 (has outcome-to-LIMS-status mappings)
- Verify MULTI_MIX_KIT generator creates mappings for T1-T4 (mixes in Kit K1 with 2+ mixes) but NOT T5 (Mix C is standalone)
Expected Results:
- AC-010-23: SYSTEM mappings for all compatible role-target combinations (standard Cartesian product)
- AC-010-24: COMBINED_OUTCOME mappings only for targets with outcome-to-LIMS-status mappings
- AC-010-25: MULTI_MIX_KIT mappings only for targets in kits with two or more mixes
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-016-001 | SYSTEM maps all compatible | SYSTEM-tagged rule | Mappings for all role-target combos with compatibility | @V3_1_0 |
| TV-016-002 | COMBINED_OUTCOME maps LIMS status | COMBINED_OUTCOME-tagged rule | Mappings for T1 only | @V3_1_0 |
| TV-016-003 | MULTI_MIX_KIT multi-mix | MULTI_MIX_KIT-tagged rule | Mappings for T1-T4 (2-mix kit) | @V3_1_0 |
| TV-016-004 | MULTI_MIX_KIT excludes single-mix | MULTI_MIX_KIT-tagged rule | No mappings for T5 (single-mix kit) | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-017: Westgard generator
Verifies: REQ-RULETAGS-010 (AC-010-26 WESTGARD)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- Westgard limit record WL1: rule = WG12S, role = PC, target = T1
- Westgard limit record WL2: rule = WG13S, role = NC, target = T2
- No Westgard limit for T3
Steps:
- Trigger auto mapper
- Verify WESTGARD generator reads directly from Westgard limit records
- Verify mapping created for WG12S on PC-T1 (from WL1)
- Verify mapping created for WG13S on NC-T2 (from WL2)
- Verify no Westgard mapping created for T3 (no Westgard limit record)
- Verify WESTGARD generator does NOT follow the standard tag-based Cartesian product pattern
Expected Results:
- AC-010-26: WESTGARD mappings created directly from Westgard limit records (rule, role, target read from each record); does NOT follow standard generator Cartesian product pattern
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-017-001 | Westgard maps from limit records | WL1: WG12S-PC-T1 | Mapping for WG12S on PC-T1 | @V3_1_0 |
| TV-017-002 | Westgard maps second limit | WL2: WG13S-NC-T2 | Mapping for WG13S on NC-T2 | @V3_1_0 |
| TV-017-003 | No limit means no mapping | No WG limit for T3 | No Westgard mapping for T3 | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
TC-RULETAGS-018: Custom mapping preservation and error handling
Verifies: REQ-RULETAGS-010 (AC-010-27 CUSTOM, Error Handling)
Method: TM-API
Priority: High
Version: @V3_1_0
Preconditions:
- User-created custom mapping CM1: Rule R1, Role Patient, Target T1 (does NOT conflict with any auto-generated mapping)
- User-created custom mapping CM2: Rule R2, Role Patient, Target T2 (DOES conflict with an auto-generated mapping from QUANT generator)
- Rule R3: enabled, no Mix Property Tags assigned
- Rule R4: disabled
Steps:
- Trigger auto mapper
- Verify CUSTOM generator runs last (after all other generators)
- Verify CM1 is preserved alongside auto-generated mappings (no conflict)
- Verify CM2 is deleted and replaced by the auto-generated mapping (conflict)
- Verify Rule R3 (no Mix Property Tags) gets no auto-generated mappings from any generator
- Verify Rule R4 (disabled) has all mappings deleted and no regeneration attempted
Expected Results:
- AC-010-27: Non-conflicting custom mappings preserved; CUSTOM generator runs last; duplicate custom mappings matching auto-generated ones deleted before inclusion
- EH-1: Rule with no Mix Property Tags gets no auto-mappings (no generator processes it)
- EH-2: Disabled rule has all mappings deleted, no regeneration
- EH-3: Conflicting custom mappings (same rule-role-target-specimen) deleted and replaced by auto-generated ones
Test Vectors:
| TV ID | Scenario | Input | Expected | Tags |
|---|---|---|---|---|
| TV-018-001 | Non-conflicting custom preserved | CM1 does not overlap auto mappings | CM1 preserved in final mapping set | @V3_1_0 |
| TV-018-002 | Conflicting custom replaced | CM2 overlaps auto-generated mapping | CM2 deleted, auto mapping used | @V3_1_0 |
| TV-018-003 | No Mix Property Tags | Rule R3 has no tags | No auto-mappings created | @V3_1_0 |
| TV-018-004 | Disabled rule cleanup | Rule R4 disabled | All mappings deleted, no regeneration | @V3_1_0 |
Automation Status: Planned (API test)
Jira: BT-4820
Traceability Matrix
| REQ ID | Title | Test Cases | AC Coverage | Status |
|---|---|---|---|---|
| REQ-RULETAGS-001 | Rule Tags Page Access | TC-RULETAGS-001 | 3/3 | Draft |
| REQ-RULETAGS-002 | Rule Tags Table Display | TC-RULETAGS-002 | 4/4 | Draft |
| REQ-RULETAGS-003 | Rule Tags Table Columns | TC-RULETAGS-002 | 6/6 | Draft |
| REQ-RULETAGS-004 | Rule Availability Toggle | TC-RULETAGS-003 | 3/3 | Draft |
| REQ-RULETAGS-005 | Tag Category Multi-Select Dropdowns | TC-RULETAGS-004 | 5/5 | Draft |
| REQ-RULETAGS-006 | Tag Compatibility Validation | TC-RULETAGS-005 | 4/4 | Draft |
| REQ-RULETAGS-007 | HIDDEN Modifier Tag Visibility | TC-RULETAGS-006 | 3/3 | Draft |
| REQ-RULETAGS-008 | Tag Changes Trigger Auto Mapper | TC-RULETAGS-007 | 4/4 | Draft |
| REQ-RULETAGS-009 | Rule Tags Help Data | TC-RULETAGS-008 | 3/3 | Draft |
| REQ-RULETAGS-010 | Automatic Rule Mapping Engine | TC-RULETAGS-009 through TC-RULETAGS-018 | 43/43 | Draft |
Version History
| Version | Date | Author | Changes |
|---|---|---|---|
| v3.1.0-draft | 2026-03-08 | AI-assisted | Initial creation covering 10 REQs, 78 ACs, 18 TCs |