STD: IC Qualitative Serum Rule (PICQUAL_SERUM)
Version: v1.0.0
Status: Draft
SRS Source: docusaurus/docs/srs/rules/rule-ic-qual-serum.md
Rule Name: PICQUAL_SERUM
Domain: RULES-ICQUALSERUM
Overview
This document specifies tests for the IC Qualitative Serum rule (PICQUAL_SERUM) using decision tables and test vectors. The rule evaluates Internal Control (IC) validity for qualitative patient samples with Serum specimen type using a two-stage evaluation approach.
Rule Characteristics:
- Pure business logic (no UI)
- Two-stage evaluation: IC CT threshold check, then non-IC observation check
- Fixed IC CT threshold of 35 cycles
- Error code generation for suspected inhibition
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 ID | Title | Conditions | Test Vectors | Coverage | Gaps |
|---|
| REQ-RULES-ICQUALSERUM-001 | Evaluate IC Validity for Qualitative Serum Samples | 8 | 12 | 100% | None |
Totals: 1 REQ, 8 Conditions, 12 Test Vectors, 100% Coverage
REQ-RULES-ICQUALSERUM-001: Evaluate IC Validity for Qualitative Serum Samples
| Variable | Type | Valid Values | Description |
|---|
well.specimen_type | string | Serum | Specimen type (rule only applies to Serum) |
well.sample_type | string | Qualitative | Sample type (rule only applies to Qualitative) |
obs_ic.ct | float | 0-50 | IC observation cycle threshold value |
obs_nonic[].ct | float | 0-50 | Non-IC observation CT values (array) |
config.cutoff | float | Assay-defined | CT value above which observation is negative |
config.ic_ct_threshold | float | 35 | Maximum acceptable IC CT for direct pass |
Output Variables
| Variable | Type | Description |
|---|
well.status | string | Pass or Fail |
well.error | string? | Error code (null if Pass, ICQUAL_INHN if Fail) |
Decision Table: IC CT Threshold Evaluation
Tests the primary IC CT check (Stage 1 of two-stage evaluation).
| TV | obs_ic.ct | expected_status | expected_error | Covers |
|---|
| TV-001-001 | 32 | Pass | null | AC: IC CT below threshold passes |
| TV-001-002 | 35 | Pass | null | AC: IC CT at threshold boundary passes (inclusive) |
| TV-001-003 | 34.99 | Pass | null | AC: IC CT just below threshold passes |
| TV-001-004 | 35.01 | (proceed to Stage 2) | (depends on non-IC) | AC: IC CT above threshold triggers non-IC check |
Decision Table: Non-IC Observation Evaluation (Stage 2)
Tests the secondary evaluation when IC CT > 35.
| TV | obs_ic.ct | obs_nonic[].ct | config.cutoff | nonic_status | expected_status | expected_error | Covers |
|---|
| TV-001-005 | 38 | [28] | 35 | [Pos] | Pass | null | AC: IC CT > 35, one non-IC positive, passes |
| TV-001-006 | 38 | [45, 42] | 35 | [Neg, Neg] | Fail | ICQUAL_INHN | AC: IC CT > 35, all non-IC negative, error |
| TV-001-007 | 38 | [28, 42] | 35 | [Pos, Neg] | Pass | null | AC: IC CT > 35, some non-IC positive, passes |
| TV-001-008 | 40 | [35] | 35 | [Pos] | Pass | null | AC: Non-IC at cutoff boundary is positive |
| TV-001-009 | 40 | [35.01] | 35 | [Neg] | Fail | ICQUAL_INHN | AC: Non-IC above cutoff is negative |
Decision Table: Non-IC Classification Logic
Tests the classification of non-IC observations against cutoff.
| TV | obs_nonic.ct | config.cutoff | classification | Covers |
|---|
| TV-001-010 | 28 | 35 | Positive | AC: CT <= cutoff is positive |
| TV-001-011 | 35 | 35 | Positive | AC: CT at cutoff boundary is positive (inclusive) |
| TV-001-012 | 36 | 35 | Negative | AC: CT > cutoff is negative |
Decision Table: Scope Validation
Tests that the rule only applies to qualitative serum samples.
| TV | specimen_type | sample_type | rule_applies | Covers |
|---|
| TV-001-013 | Serum | Qualitative | true | AC: Rule applies to qualitative serum |
| TV-001-014 | Plasma | Qualitative | false | AC: Rule does not apply to non-serum |
| TV-001-015 | Serum | Quantitative | false | AC: Rule does not apply to non-qualitative |
Decision Table: Complete Scenario Coverage
End-to-end test scenarios combining all conditions.
| TV | specimen_type | sample_type | obs_ic.ct | obs_nonic[].ct | cutoff | expected_status | expected_error | Covers |
|---|
| TV-001-016 | Serum | Qualitative | 32 | [28, 42] | 35 | Pass | null | AC: IC valid, rule terminates early |
| TV-001-017 | Serum | Qualitative | 35 | [42, 45] | 35 | Pass | null | AC: IC at boundary, passes regardless of non-IC |
| TV-001-018 | Serum | Qualitative | 38 | [28, 42] | 35 | Pass | null | AC: IC high, positive non-IC overrides |
| TV-001-019 | Serum | Qualitative | 38 | [42, 45] | 35 | Fail | ICQUAL_INHN | AC: IC high, all non-IC negative, inhibition error |
Test File Locations
| Requirement | Test File | Method | Automation Status |
|---|
| REQ-RULES-ICQUALSERUM-001 | tests/Unit/Rules/PicqualSerumRuleTest.php | TM-API | Automated |
Traceability to Existing Tests
| Requirement | Jira Tests | Status |
|---|
| REQ-RULES-ICQUALSERUM-001 | BT-5191 | Existing |
Gap Analysis
Identified Gaps
| Gap | Requirement | Description | Priority | Owner |
|---|
| None | - | All acceptance criteria covered by test vectors | - | - |
Boundary Value Coverage
| Boundary | Test Vector | Verified |
|---|
| IC CT = 35 (threshold) | TV-001-002 | Yes |
| IC CT = 35.01 (just above) | TV-001-004, TV-001-009 | Yes |
| Non-IC CT = cutoff (boundary) | TV-001-008, TV-001-011 | Yes |
| Non-IC CT = cutoff + 0.01 | TV-001-009, TV-001-012 | Yes |
Error Condition Coverage
| Error Condition | Test Vector | Verified |
|---|
| ICQUAL_INHN (suspected inhibition) | TV-001-006, TV-001-009, TV-001-019 | Yes |