Skip to main content
Version: 3.0.1

STD: Extraction Controls Rule (MINEXTRACT)

Version: v1.0.0 Status: Draft SRS Source: docusaurus/docs/srs/rules/rule-extraction-controls.md Rule Name: MINEXTRACT Domain: RULES-EXTCTRL


Overview

This document specifies tests for the Extraction Controls rule (MINEXTRACT) using decision tables and test vectors. The rule validates that patient sample wells have matching positive and negative extraction controls (PEC/NEC) based on extraction details.

Rule Characteristics:

  • Pure business logic (no UI)
  • Multi-field matching (mix, extraction date, instrument, batch)
  • Fallback mechanism via backup mix
  • Role type recognition ("Quantification & PC" as PEC)
  • Label error exclusion filtering

Test Method: TM-API (per Test Plan Section 3.3 - Rules use automated API tests)

Verification Approach: Rule verification is performed using data-driven test vectors. Each row in a decision table represents a complete verification scenario with defined inputs and expected outputs. This format enables exhaustive condition coverage while remaining concise and auditable.


Coverage Summary

REQ IDTitleConditionsTest VectorsCoverageGaps
REQ-RULES-EXTCTRL-001Core Validation1216100%None
REQ-RULES-EXTCTRL-002Fallback Disabled44100%None
REQ-RULES-EXTCTRL-003Fallback Enabled44100%None
REQ-RULES-EXTCTRL-004Role Type Recognition44100%None
REQ-RULES-EXTCTRL-005Label Error Exclusion (MINEXTRACT)44100%None
REQ-RULES-EXTCTRL-006Label Error Exclusion (MINCONTROL)44100%None

Totals: 6 REQs, 32 Conditions, 36 Test Vectors, 100% Coverage


Input Variables

VariableTypeValid ValuesDescription
well.role_aliasstringControl, PatientWell role classification
well.resolution_codesarray[], [MINEXTRACT], ...Applied resolution codes
well.mixstringmix1, mix2, ...Well's assigned mix
well.extraction_datedateISO date stringExtraction date
well.extraction_instrumentstringEI-1, EI-2, ...Extraction instrument ID
well.batch_numberstring?null, "12", ...Batch number (optional)
control.role_typestringPC, NC, Quantification & PCControl well role type
control.has_extractionbooltrue, falseControl has extraction attribute
control.error_typestring?null, Label Error, Non-Label ErrorError type on control well
config.fallback_shared_controlbooltrue, falseFallback feature enabled
config.backup_mixstring?null, mix1, mix2, ...Backup mix from role-target mappings

Output Variables

VariableTypeDescription
well.error_codestring?Error code assigned (null if passes)
rule_skippedboolWhether rule was bypassed
control_validboolWhether control well is valid for matching

REQ-RULES-EXTCTRL-001: Core Validation

Decision Table: Skip Conditions

TVwell.role_aliaswell.resolution_codesrule_skippederror_codeCovers
TV-001-001Control[]truenullAC: Control wells skipped
TV-001-002Patient[MINEXTRACT]truenullAC: Resolution bypass
TV-001-003Patient[]false(depends on controls)AC: Patient wells evaluated
TV-001-004Patient[OTHER_CODE]false(depends on controls)AC: Non-MINEXTRACT resolution ignored

Decision Table: Control Matching - Extraction Details

TVsame_mixsame_datesame_instrumentsame_batchpec_presentnec_presenterror_codeCovers
TV-001-005truetruetruetruetruetruenullAC: All details match, both controls present
TV-001-006falsetruetruetruetruetrueEXTRACTION_CONTROLS_MISSINGAC: Mix mismatch
TV-001-007truefalsetruetruetruetrueEXTRACTION_CONTROLS_MISSINGAC: Date mismatch
TV-001-008truetruefalsetruetruetrueEXTRACTION_CONTROLS_MISSINGAC: Instrument mismatch
TV-001-009truetruetruefalsetruetrueEXTRACTION_CONTROLS_MISSINGAC: Batch mismatch
TV-001-010truetruetruenulltruetruenullAC: Batch null on both (matches)

Decision Table: PEC/NEC Presence

TVpec_presentnec_presentall_details_matcherror_codeCovers
TV-001-011truetruetruenullAC: Both controls present
TV-001-012truefalsetrueEXTRACTION_CONTROLS_MISSINGAC: NEC missing
TV-001-013falsetruetrueEXTRACTION_CONTROLS_MISSINGAC: PEC missing
TV-001-014falsefalsetrueEXTRACTION_CONTROLS_MISSINGAC: Both controls missing

Decision Table: Batch Number Handling

TVpatient.batchcontrol.batchbatch_matchCovers
TV-001-015"12""12"trueAC: Exact batch match
TV-001-016"12""13"falseAC: Batch mismatch

REQ-RULES-EXTCTRL-002: Fallback Disabled

Decision Table: Fallback Disabled Behavior

TVprimary_controls_foundfallback_enablederror_codeCovers
TV-002-001truefalsenullAC: Primary controls found, fallback irrelevant
TV-002-002falsefalseEXTRACTION_CONTROLS_MISSINGAC: Missing controls, fallback disabled = error
TV-002-003truetruenullAC: Primary controls found, fallback enabled (not used)
TV-002-004falsetrue(check backup)AC: Missing controls, fallback enabled = check backup

REQ-RULES-EXTCTRL-003: Fallback Enabled

TVprimary_controls_foundfallback_enabledbackup_controls_founderror_codeCovers
TV-003-001falsetruetruenullAC: Backup mix has matching controls
TV-003-002falsetruefalseEXTRACTION_CONTROLS_MISSINGAC: Backup mix also missing controls
TV-003-003truetrueN/AnullAC: Primary found, backup not searched
TV-003-004falsefalseN/AEXTRACTION_CONTROLS_MISSINGAC: Fallback disabled, backup not searched

REQ-RULES-EXTCTRL-004: Role Type Recognition

Decision Table: Positive Control Role Types

TVcontrol.role_typecontrol.has_extractionrecognized_as_pecCovers
TV-004-001PCtruetrueAC: Standard PC recognized
TV-004-002Quantification & PCtruetrueAC: Dual-purpose role recognized as PEC
TV-004-003NCtruefalseAC: NC not recognized as PEC
TV-004-004OthertruefalseAC: Other roles not PEC

Decision Table: Full PEC Matching with Role Types

TVpec_role_typenec_presentall_details_matcherror_codeCovers
TV-004-005PCtruetruenullAC: Standard PC satisfies PEC requirement
TV-004-006Quantification & PCtruetruenullAC: Quantification & PC satisfies PEC requirement

REQ-RULES-EXTCTRL-005: Label Error Exclusion (MINEXTRACT)

Decision Table: Control Validity Based on Error Type

TVcontrol.error_typecontrol_validCovers
TV-005-001nulltrueAC: No error, control valid
TV-005-002Non-Label ErrortrueAC: Non-label error, control still valid
TV-005-003Label ErrorfalseAC: Label error excludes control

Decision Table: MINEXTRACT with Label Error Controls

TVpec_error_typenec_error_typeother_valid_controlserror_codeCovers
TV-005-004Label ErrornullnoneEXTRACTION_CONTROLS_MISSINGAC: PEC excluded due to label error
TV-005-005nullLabel ErrornoneEXTRACTION_CONTROLS_MISSINGAC: NEC excluded due to label error
TV-005-006Non-Label ErrornullN/AnullAC: Non-label error PEC still valid
TV-005-007nullNon-Label ErrorN/AnullAC: Non-label error NEC still valid

REQ-RULES-EXTCTRL-006: Label Error Exclusion (MINCONTROL)

Decision Table: MINCONTROL Control Validity

TVcontrol.error_typecontrol_valid_for_mincontrolCovers
TV-006-001nulltrueAC: No error, control valid
TV-006-002Non-Label ErrortrueAC: Non-label error, control valid
TV-006-003Label ErrorfalseAC: Label error excludes control

Decision Table: MINCONTROL with Label Error Controls

TVpc_error_typenc_error_typeerror_codeCovers
TV-006-004Label ErrornullMIN_CONTROLS_MISSINGAC: PC excluded due to label error
TV-006-005nullLabel ErrorMIN_CONTROLS_MISSINGAC: NC excluded due to label error
TV-006-006Non-Label ErrornullnullAC: Non-label error PC valid
TV-006-007nullNon-Label ErrornullAC: Non-label error NC valid

Test File Locations

RequirementTest FileAutomation Status
REQ-RULES-EXTCTRL-001tests/Unit/Rules/MinextractRuleTest.phpAutomated
REQ-RULES-EXTCTRL-002tests/Unit/Rules/MinextractRuleTest.phpAutomated
REQ-RULES-EXTCTRL-003tests/Unit/Rules/MinextractRuleTest.phpAutomated
REQ-RULES-EXTCTRL-004tests/Unit/Rules/MinextractRuleTest.phpAutomated
REQ-RULES-EXTCTRL-005tests/Unit/Rules/MinextractRuleTest.phpAutomated
REQ-RULES-EXTCTRL-006tests/Unit/Rules/MincontrolRuleTest.phpAutomated

Traceability to Existing Tests

RequirementJira TestsStatus
REQ-RULES-EXTCTRL-001BT-5250, BT-3917Existing
REQ-RULES-EXTCTRL-002BT-5250, BT-3917Existing
REQ-RULES-EXTCTRL-003BT-5250, BT-3917Existing
REQ-RULES-EXTCTRL-004BT-5250, BT-4382 (manual)Partial
REQ-RULES-EXTCTRL-005BT-5250Partial
REQ-RULES-EXTCTRL-006BT-5252Partial

Supplementary Gap-Fill Tests

TCDescriptionCovers
TC-EXTCTRL-005-COMBINEDBoth PEC and NEC with label errors excluded causes extraction controls missingSupplementary: combined TV-005-004 + TV-005-005
TC-EXTCTRL-005-RECOVERYPEC with label error excluded but second valid PEC still satisfies requirementSupplementary: PEC fallback recovery path

Gap Analysis

Identified Gaps

GapRequirementDescriptionPriorityOwner
GAP-001REQ-RULES-EXTCTRL-001Non-MINEXTRACT resolution code handling (TV-001-004), null batch matching (TV-001-010)Medium-
GAP-002REQ-RULES-EXTCTRL-004Non-PEC role rejection (TV-004-004)Low-
GAP-003REQ-RULES-EXTCTRL-005Label error exclusion for MINEXTRACT (TV-005-003, TV-005-004, TV-005-005)High-
GAP-004REQ-RULES-EXTCTRL-006Label error exclusion for MINCONTROL (TV-006-003, TV-006-004, TV-006-005)High-

Notes

  • Corrected: Original traceability referenced BT-1216, BT-3883, BT-4376, BT-4719 which do not exist in the test catalogue
  • Primary automated coverage via BT-5250 (MINEXTRACT) with config Quest_EZ_PP_v30.xlsx
  • BT-5252 (MINCONTROLS) with config Quest_EZ_MINCONTROLS.xlsx covers REQ-006
  • Manual tests BT-3917, BT-3918 cover fallback scenarios; BT-4382 covers Quantification & PC role type
  • Label error exclusion logic (REQ-005, REQ-006) lacks corresponding automated tests - tests needed