Skip to main content
Version: Next

STD: Rule Tags and Automatic Rule Mapping (RULETAGS)

Version: v3.1.0 Status: Draft SRS Source: docusaurus/docs/srs/kitcfg-ruletags.md Domain: 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 IDTitleACsTestsAC CoverageMethodGaps
REQ-RULETAGS-001Rule Tags Page Access3TC-RULETAGS-0013/3 (100%)TM-UINone
REQ-RULETAGS-002Rule Tags Table Display4TC-RULETAGS-0024/4 (100%)TM-API, TM-UINone
REQ-RULETAGS-003Rule Tags Table Columns6TC-RULETAGS-0026/6 (100%)TM-UINone
REQ-RULETAGS-004Rule Availability Toggle3TC-RULETAGS-0033/3 (100%)TM-APINone
REQ-RULETAGS-005Tag Category Multi-Select Dropdowns5TC-RULETAGS-0045/5 (100%)TM-API, TM-UINone
REQ-RULETAGS-006Tag Compatibility Validation4TC-RULETAGS-0054/4 (100%)TM-APINone
REQ-RULETAGS-007HIDDEN Modifier Tag Visibility3TC-RULETAGS-0063/3 (100%)TM-APINone
REQ-RULETAGS-008Tag Changes Trigger Auto Mapper4TC-RULETAGS-0074/4 (100%)TM-APINone
REQ-RULETAGS-009Rule Tags Help Data3TC-RULETAGS-0083/3 (100%)TM-UINone
REQ-RULETAGS-010Automatic Rule Mapping Engine43TC-RULETAGS-009 through TC-RULETAGS-01843/43 (100%)TM-APINone

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:

UserRoleExpected Visibility
User ASUPER_ADMINRule Tags link visible
User BCLIENT_CONFIGRule Tags link NOT visible
User CMANAGERRule Tags link NOT visible

Steps:

  1. Log in as SUPER_ADMIN user and enter Config Mode
  2. Navigate to "Other Settings" submenu in the config sidebar
  3. Verify "Rule Tags" link is visible
  4. Click "Rule Tags" link and verify navigation to /rule-tags?config_mode=true
  5. Log in as non-SUPER_ADMIN user (CLIENT_CONFIG)
  6. Enter Config Mode and navigate to "Other Settings" submenu
  7. 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 IDScenarioInputExpectedTags
TV-001-001SUPER_ADMIN sees Rule Tags linkSUPER_ADMIN in Config ModeLink visible in Other Settings@V3_1_0
TV-001-002CLIENT_CONFIG cannot see Rule Tags linkCLIENT_CONFIG in Config ModeLink not visible@V3_1_0
TV-001-003Rule Tags page route accessibleSUPER_ADMIN clicks Rule TagsNavigates 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:

  1. Navigate to Rule Tags page as SUPER_ADMIN
  2. Verify sticky header with title "Rule Tags" is displayed
  3. Verify API calls to GET /api/plain-rules and GET /api/rule-tags are made on page load
  4. Verify table lists all rules with their current tag assignments across four tag categories
  5. Verify column layout: Rule (25%), Availability (8%), Mix Property Tags (17%), Role Type Tags (17%), Target Type Tags (17%), Modifier Tags (16%)
  6. 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-rules and tags from GET /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 IDScenarioInputExpectedTags
TV-002-001Table displays all rulesPage loadAll rules listed with tag assignments@V3_1_0
TV-002-002Column layout correctPage loadSix columns with specified widths@V3_1_0
TV-002-003API endpoints calledPage loadGET /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:

  1. Disable Rule X via PUT /api/plain-rules/{rule} with is_enabled: false
  2. Query rule mappings for Rule X and verify all are deleted
  3. Enable Rule Y via PUT /api/plain-rules/{rule} with is_enabled: true
  4. 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 IDScenarioInputExpectedTags
TV-003-001Disable rule deletes mappingsDisable enabled ruleAll mappings for rule deleted@V3_1_0
TV-003-002Enable rule triggers mapperEnable disabled rule with tagsNew mappings generated per tags@V3_1_0
TV-003-003Enable rule with no tagsEnable disabled rule with no Mix Property TagsNo 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:

  1. Open Mix Property Tags dropdown on a rule row
  2. Verify all 25 predefined options are listed
  3. Select multiple tags and verify multi-select works
  4. Open Role Type Tags dropdown
  5. Verify dynamic values derived from Role::typesInUppercase() are listed
  6. Open Target Type Tags dropdown and verify 4 options
  7. Open Modifier Tags dropdown and verify HIDDEN is listed
  8. 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 IDScenarioInputExpectedTags
TV-004-001Mix Property dropdown optionsOpen dropdown25 predefined values listed@V3_1_0
TV-004-002Role Type dropdown dynamicOpen dropdownValues match Role::typesInUppercase()@V3_1_0
TV-004-003Target Type dropdown optionsOpen dropdown4 values listed@V3_1_0
TV-004-004Modifier dropdown optionsOpen dropdownHIDDEN listed@V3_1_0
TV-004-005Dropdowns disabled during APITrigger API callAll 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_with properties

Test Data:

ScenarioTag ATag BExpected
Incompatible pairCLS_DISCREPANCYCLS_INVERT_SIGMOIDWarning modal, selection prevented
Compatible pairQUANTTHRESHOLDSaved without warning

Steps:

  1. Select CLS_DISCREPANCY on a rule that already has CLS_INVERT_SIGMOID
  2. Verify modal warning is displayed indicating the incompatible combination
  3. Verify the incompatible selection is prevented (not saved)
  4. Select QUANT and THRESHOLD on the same rule
  5. Verify no warning is shown and the selection is saved

Expected Results:

  • AC1: Tags define not_available_with property 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 IDScenarioInputExpectedTags
TV-005-001Incompatible tags rejectedSelect CLS_DISCREPANCY with CLS_INVERT_SIGMOIDModal warning, selection prevented@V3_1_0
TV-005-002Compatible tags acceptedSelect QUANT + THRESHOLDSaved 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:

  1. As SUPER_ADMIN, query rules and verify Rule Z is included
  2. As SUPER_ADMIN, view Modifier Tags dropdown and verify HIDDEN is available
  3. As MANAGER, query rules via API and verify Rule Z is NOT included in results
  4. 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 IDScenarioInputExpectedTags
TV-006-001SUPER_ADMIN sees HIDDEN rulesQuery rules as SUPER_ADMINHIDDEN rules included@V3_1_0
TV-006-002Non-SUPER_ADMIN filteredQuery rules as MANAGERHIDDEN rules excluded@V3_1_0
TV-006-003HIDDEN tag in dropdownSUPER_ADMIN views Modifier dropdownHIDDEN 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:

  1. Change Mix Property Tags on enabled Rule E from [QUANT] to [QUAL] via PUT /api/plain-rules/{rule}
  2. Verify the auto mapper re-runs and old QUANT mappings are replaced with QUAL mappings
  3. Change Mix Property Tags on disabled Rule D from [QUAL] to [THRESHOLD]
  4. Verify the tags are stored but no rule mapping regeneration occurs (no mappings exist)
  5. Enable Rule D via PUT /api/plain-rules/{rule} with is_enabled: true
  6. 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 and is_enabled status

Test Vectors:

TV IDScenarioInputExpectedTags
TV-007-001Tag change on enabled ruleChange QUANT to QUAL on enabled ruleOld mappings replaced with QUAL mappings@V3_1_0
TV-007-002Tag change on disabled ruleChange QUAL to THRESHOLD on disabled ruleTags stored, no mappings generated@V3_1_0
TV-007-003Re-enable uses current tagsEnable disabled rule with THRESHOLD tagsTHRESHOLD 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:

  1. Enable the help_items feature flag
  2. Navigate to Rule Tags page
  3. Verify "Help Data" button is visible in the sticky header
  4. Click the button and verify the HelpWidget toggles
  5. Disable the help_items feature flag
  6. Refresh Rule Tags page
  7. Verify "Help Data" button is NOT visible

Expected Results:

  • AC1: Help Data button visible when help_items feature flag is enabled
  • AC2: Clicking the button toggles the HelpWidget component for the "Rule Tags" page
  • AC3: Help Data button not visible when help_items feature is disabled

Test Vectors:

TV IDScenarioInputExpectedTags
TV-008-001Help button visible when enabledhelp_items = trueButton visible@V3_1_0
TV-008-002Help button hidden when disabledhelp_items = falseButton 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:

  1. Assign tags to Rule R1 and trigger auto mapper via PUT /api/plain-rules/{rule}
  2. Verify the mapper job dispatches
  3. Verify generated mappings match the Cartesian product of compatible (rule, role, target) combinations
  4. Verify Role-Rule compatibility: only roles whose type matches a Role Type Tag on the rule
  5. Verify Target Type filtering: NON_IC_TARGETS excludes IC and passive targets
  6. Verify deduplication via hash key (rule + role + target + specimen + site)
  7. Verify all existing strict mappings for the site are deleted before new mappings inserted
  8. Verify batch insert of new mappings
  9. 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 IDScenarioInputExpectedTags
TV-009-001Mapper dispatched on tag changeChange tags on enabled ruleMapper job dispatched@V3_1_0
TV-009-002Strict mappings replacedTrigger mapper with existing strict mappingsOld strict mappings deleted, new inserted@V3_1_0
TV-009-003IC_TARGETS filteringRule with IC_TARGETS tagMappings only for IC targets@V3_1_0
TV-009-004NON_IC_TARGETS filteringRule with NON_IC_TARGETS tagIC and passive targets excluded@V3_1_0
TV-009-005PASSIVE_TARGETS filteringRule with PASSIVE_TARGETS tagMappings only for passive targets@V3_1_0
TV-009-006ROLE_SPECIFIED_TARGETS filteringRule with ROLE_SPECIFIED_TARGETS tagOnly targets with control label affected target mapping@V3_1_0
TV-009-007Role-Rule compatibilityRule with Role Type = [PATIENT]Only patient-typed roles get mappings@V3_1_0
TV-009-008Control role requires control labelRule applied to PC roleMapping only when control label mapping exists for role-mix@V3_1_0
TV-009-009Deduplication by hash keyMapper runs with overlapping generatorsNo duplicate mappings in output@V3_1_0

Automation Status: Planned (API test)

Jira: BT-4820, BT-6160


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:

  1. Trigger auto mapper for all rules
  2. Verify QUANT generator produces mappings only for targets in quantitative mixes (T1-T4) on patient roles
  3. Verify QUAL generator produces mappings only for targets in qualitative mixes (T5, T6) on patient roles
  4. Verify STORED_STANDARD generator produces mappings only for targets in Stored Curve mixes (T1, T2)
  5. 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 IDScenarioInputExpectedTags
TV-010-001QUANT maps to quantitative targetsQUANT-tagged rule, mixed mixesMappings for T1-T4 only@V3_1_0
TV-010-002QUAL maps to qualitative targetsQUAL-tagged rule, mixed mixesMappings for T5-T6 only@V3_1_0
TV-010-003STORED_STANDARD selects Stored CurveSTORED_STANDARD-tagged ruleMappings for T1-T2 (Stored Curve) only@V3_1_0
TV-010-004QUANTIFY_IN_RUN selects In-Run StandardsQUANTIFY_IN_RUN-tagged ruleMappings for T3-T4 (In-Run) only@V3_1_0
TV-010-005QUANT excludes qualitative mixesQUANT-tagged ruleNo 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:

  1. Trigger auto mapper
  2. Verify THRESHOLD generator produces mappings only for targets with expected threshold set (T1, T3)
  3. Verify CT_DELTA generator produces mappings only for targets with delta CT combination configured (T1)
  4. Verify CT_INHIBITION_DELTA generator produces mappings only for targets with CT inhibition delta set and not empty (T1, T3)
  5. 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 IDScenarioInputExpectedTags
TV-011-001THRESHOLD filters by thresholdTHRESHOLD-tagged ruleMappings for T1, T3 (have threshold)@V3_1_0
TV-011-002CT_DELTA filters by delta CTCT_DELTA-tagged ruleMappings for T1 only (has delta CT)@V3_1_0
TV-011-003CT_INHIBITION_DELTA filtersCT_INHIBITION_DELTA-tagged ruleMappings for T1, T3 (have inhibition delta)@V3_1_0
TV-011-004Target without any config excludedT2 has no threshold/delta/inhibitionNo 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 with is_hide_invert_sigmoid
  • Target T2: should_check_cls_discrepancy = true, HAS active calibration with is_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:

  1. Trigger auto mapper
  2. Verify CLS_DISCREPANCY generator creates mappings for T1 (cls discrepancy = true, no invert sigmoid calibration) but NOT T2 or T3
  3. Verify CLS_INVERT_SIGMOID generator creates mappings for T2 (cls discrepancy = true, has invert sigmoid calibration) but NOT T1 or T3
  4. Verify CLS_DISCREPANCY and CLS_INVERT_SIGMOID are mutually exclusive per target
  5. Verify CT_DISCREPANCY generator creates mappings for T4 only
  6. Activate a calibration with is_hide_invert_sigmoid on T1
  7. 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 IDScenarioInputExpectedTags
TV-012-001CLS_DISCREPANCY without invert sigmoidT1: cls_disc=true, no calibCLS_DISCREPANCY mappings for T1@V3_1_0
TV-012-002CLS_INVERT_SIGMOID with invert sigmoidT2: cls_disc=true, calib activeCLS_INVERT_SIGMOID mappings for T2@V3_1_0
TV-012-003Mutual exclusivityT1 and T2No target has both CLS_DISC and CLS_INVERT mappings@V3_1_0
TV-012-004CT_DISCREPANCY filteringCT_DISCREPANCY-tagged ruleMappings for T4 only@V3_1_0
TV-012-005Calibration activation triggers mapperActivate invert sigmoid calibration on T1Mapper 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:

  1. Trigger auto mapper
  2. Verify MIN_FL generator creates mappings only for T1 (has min fluorescence)
  3. Verify MAX_FL generator creates mappings only for T1 (has max fluorescence)
  4. Verify ADJACENT_WELL generator creates mappings only for T1 (has cross contamination limits)
  5. Verify QUANT_ROUNDING generator creates mappings only for T1 (has quantity reportings)
  6. Verify AUTO_BASELINE generator creates mappings only for T1 (has auto baseline)
  7. 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 IDScenarioInputExpectedTags
TV-013-001MIN_FL filters by min fluorescenceMIN_FL-tagged ruleMappings for T1 only@V3_1_0
TV-013-002MAX_FL filters by max fluorescenceMAX_FL-tagged ruleMappings for T1 only@V3_1_0
TV-013-003ADJACENT_WELL filters by cross contamADJACENT_WELL-tagged ruleMappings for T1 only@V3_1_0
TV-013-004QUANT_ROUNDING filters by reportingsQUANT_ROUNDING-tagged ruleMappings for T1 only@V3_1_0
TV-013-005AUTO_BASELINE filters by baselineAUTO_BASELINE-tagged ruleMappings for T1 only@V3_1_0
TV-013-006Unconfigured target excludedT2 has none of the featuresNo 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:

  1. Trigger auto mapper
  2. Verify LOD_QUANT generator creates mappings only for targets with quantitative LoD reportings (T1, T3)
  3. Verify LOD_QUAL generator creates mappings only for targets with qualitative LoD reportings (T2, T3)
  4. 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 IDScenarioInputExpectedTags
TV-014-001LOD_QUANT maps quant LoD targetsLOD_QUANT-tagged ruleMappings for T1, T3@V3_1_0
TV-014-002LOD_QUAL maps qual LoD targetsLOD_QUAL-tagged ruleMappings for T2, T3@V3_1_0
TV-014-003Target with both LoDsT3 has bothMappings from both generators@V3_1_0
TV-014-004No LoD target excludedT4 has no LoD reportingsNo 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:

  1. Trigger auto mapper
  2. Verify NEG_CONTROL generator creates mappings for T1 (configured to verify as negative)
  3. Verify POS_CONTROL generator creates mappings for T2 (configured to verify as positive)
  4. 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)
  5. Verify CONTROL_LIMITS generator creates mappings only when control range setting exists for the role-target pair (PC-T1)
  6. 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 IDScenarioInputExpectedTags
TV-015-001NEG_CONTROL maps negative verifyNEG_CONTROL-tagged ruleMappings for T1@V3_1_0
TV-015-002POS_CONTROL maps positive verifyPOS_CONTROL-tagged ruleMappings for T2@V3_1_0
TV-015-003NEG_IC_CONTROL with IC targetNEG_IC_CONTROL-tagged rule, mix has ICMappings for T3@V3_1_0
TV-015-004NEG_IC_CONTROL without IC target (v3.1.0)NEG_IC_CONTROL-tagged rule, mix has no ICNo mappings for T4@V3_1_0
TV-015-005CONTROL_LIMITS with range settingCONTROL_LIMITS-tagged ruleMappings for PC-T1 pair@V3_1_0
TV-015-006CONTROL_LIMITS without range settingCONTROL_LIMITS-tagged rule, no range for PC-T2No mapping for PC-T2@V3_1_0
TV-015-007EXTRACTION_CONTROLS maps extractionEXTRACTION_CONTROLS-tagged ruleMappings 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:

  1. Trigger auto mapper
  2. Verify SYSTEM generator creates mappings for all compatible role-target combinations across all mixes
  3. Verify COMBINED_OUTCOME generator creates mappings only for T1 (has outcome-to-LIMS-status mappings)
  4. 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 IDScenarioInputExpectedTags
TV-016-001SYSTEM maps all compatibleSYSTEM-tagged ruleMappings for all role-target combos with compatibility@V3_1_0
TV-016-002COMBINED_OUTCOME maps LIMS statusCOMBINED_OUTCOME-tagged ruleMappings for T1 only@V3_1_0
TV-016-003MULTI_MIX_KIT multi-mixMULTI_MIX_KIT-tagged ruleMappings for T1-T4 (2-mix kit)@V3_1_0
TV-016-004MULTI_MIX_KIT excludes single-mixMULTI_MIX_KIT-tagged ruleNo 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:

  1. Trigger auto mapper
  2. Verify WESTGARD generator reads directly from Westgard limit records
  3. Verify mapping created for WG12S on PC-T1 (from WL1)
  4. Verify mapping created for WG13S on NC-T2 (from WL2)
  5. Verify no Westgard mapping created for T3 (no Westgard limit record)
  6. 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 IDScenarioInputExpectedTags
TV-017-001Westgard maps from limit recordsWL1: WG12S-PC-T1Mapping for WG12S on PC-T1@V3_1_0
TV-017-002Westgard maps second limitWL2: WG13S-NC-T2Mapping for WG13S on NC-T2@V3_1_0
TV-017-003No limit means no mappingNo WG limit for T3No 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:

  1. Trigger auto mapper
  2. Verify CUSTOM generator runs last (after all other generators)
  3. Verify CM1 is preserved alongside auto-generated mappings (no conflict)
  4. Verify CM2 is deleted and replaced by the auto-generated mapping (conflict)
  5. Verify Rule R3 (no Mix Property Tags) gets no auto-generated mappings from any generator
  6. 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 IDScenarioInputExpectedTags
TV-018-001Non-conflicting custom preservedCM1 does not overlap auto mappingsCM1 preserved in final mapping set@V3_1_0
TV-018-002Conflicting custom replacedCM2 overlaps auto-generated mappingCM2 deleted, auto mapping used@V3_1_0
TV-018-003No Mix Property TagsRule R3 has no tagsNo auto-mappings created@V3_1_0
TV-018-004Disabled rule cleanupRule R4 disabledAll mappings deleted, no regeneration@V3_1_0

Automation Status: Planned (API test)

Jira: BT-4820


Traceability Matrix

REQ IDTitleTest CasesAC CoverageStatus
REQ-RULETAGS-001Rule Tags Page AccessTC-RULETAGS-0013/3Draft
REQ-RULETAGS-002Rule Tags Table DisplayTC-RULETAGS-0024/4Draft
REQ-RULETAGS-003Rule Tags Table ColumnsTC-RULETAGS-0026/6Draft
REQ-RULETAGS-004Rule Availability ToggleTC-RULETAGS-0033/3Draft
REQ-RULETAGS-005Tag Category Multi-Select DropdownsTC-RULETAGS-0045/5Draft
REQ-RULETAGS-006Tag Compatibility ValidationTC-RULETAGS-0054/4Draft
REQ-RULETAGS-007HIDDEN Modifier Tag VisibilityTC-RULETAGS-0063/3Draft
REQ-RULETAGS-008Tag Changes Trigger Auto MapperTC-RULETAGS-0074/4Draft
REQ-RULETAGS-009Rule Tags Help DataTC-RULETAGS-0083/3Draft
REQ-RULETAGS-010Automatic Rule Mapping EngineTC-RULETAGS-009 through TC-RULETAGS-01843/43Draft

Version History

VersionDateAuthorChanges
v3.1.0-draft2026-03-08AI-assistedInitial creation covering 10 REQs, 78 ACs, 18 TCs