URS & FS — User Requirements and Functional Specification
This document describes the controlled interface and behaviour of ReferenceLabBatchReviewChecker for Reference Lab Batch Review Checker.
Domain limits and critical parameters
Key fragments from the source description are shown below. Before production use, limits must be verified against the approved specification, registration dossier and local SOPs.
- Performs end-to-end pre-release verification per CAP/CLIA §GEN.48800, ISO 15189 §7.4, CLSI GP44 and accreditation standards: pre-analytical verification (accessioning, order match, demographics, sample type, rejection criteria), analytical QC (run QC, controls, calibration, reagent lot, maintenance), post-analytical verification (results completeness, interpretation review, variant classification, critical values, reflex testing, discrepancy resolution), report compliance (format, required eleme
- ⚠️ Critical: Reference lab bears responsibility for ALL stages including client pre-analytics. Order mismatch = potential patient misidentification; immediate investigation required. Missing e-signature or director review = legally invalid result. SLA breach without notification = service agreement and regulatory violation. PT must be current FOR EACH test performed; gap = testing suspension. Accreditation scope must cover test; out-of-scope = cannot be released as clinical. Dual sign-out mandat
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|
| URS-001 | The utility shall accept an input.csv file for Reference Lab Batch Review Checker with headers defined in the data contract. | High | The file is processed without manual header editing. |
| URS-002 | The utility shall perform deterministic QC evaluation without machine learning and without probabilistic conformance decisions. | High | Identical input data, rule version and configuration produce reproducible results. |
| URS-003 | The utility shall validate mandatory fields, data types, ranges, units and domain plausibility. | High | Schema, conversion and range errors are explicitly reported. |
| URS-004 | The utility shall apply domain limits and rules from the description, approved specification, registration dossier and local SOPs. | High | Each check has PASS/WARNING/FAIL and a clear message. |
| URS-005 | The utility shall generate output.json with machine-readable results, source values, warnings, failures and critical findings. | High | JSON is suitable for LIMS/ELN/MES integration and QA/QC review. |
| URS-006 | The utility shall preserve traceability between batch/sample, input file, applied rules and final status. | High | Output contains identifiers, checked parameters and audit metadata. |
| URS-007 | The documentation shall support IQ/OQ/PQ, CSV/CSA and review by internal QA or inspectors. | Medium | URS, FS, input/output contract and test scenarios are supplied with the utility. |
| URS-008 | The utility shall be used as a QC decision-support tool and not as a substitute for approved specifications and QA/QP release decision. | Medium | Documentation states change control and limit-verification expectations. |
input.csv contract
| # | Field | Type | Sample | Purpose |
|---|
| 1 | BatchID | string / controlled vocabulary | REF-BATCH-2026-0142 | Batch or lot identifier used for traceability. |
| 2 | OrderingFacility | string / controlled vocabulary | City Hospital Oncology | Controlled input parameter for deterministic QC rules. |
| 3 | AssayName | string / controlled vocabulary | NSCLC_CGP_Panel | Controlled input parameter for deterministic QC rules. |
| 4 | ReceivedDate | string / controlled vocabulary | 2026-06-01 | Controlled input parameter for deterministic QC rules. |
| 5 | CompletedDate | string / controlled vocabulary | 2026-06-07 | Controlled input parameter for deterministic QC rules. |
| 6 | TotalSamples | string / controlled vocabulary | 24 | Sample or laboratory specimen identifier. |
| 7 | SampleAccessioning_Verified | string / controlled vocabulary | true | Sample or laboratory specimen identifier. |
| 8 | OrderMatch_Verified | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 9 | PatientDemographics_Matched | string / controlled vocabulary | true | pH; parameter relevant to stability, compatibility and batch suitability. |
| 10 | SampleType_Appropriate | string / controlled vocabulary | true | Sample or laboratory specimen identifier. |
| 11 | RejectionCriteria_Checked | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 12 | SamplesRejected_PreAnalytical | decimal | 1 | Sample or laboratory specimen identifier. |
| 13 | RunQC_Passed | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 14 | Controls_AllPassed | string / controlled vocabulary | true | Control point/control sample for assay run validity. |
| 15 | Calibration_Current | string / controlled vocabulary | true | Component ratio; structural or formulation CQA. |
| 16 | ReagentLot_Verified | string / controlled vocabulary | true | Batch or lot identifier used for traceability. |
| 17 | InstrumentMaintenance_Current | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 18 | SamplesFailed_Analytical | string / controlled vocabulary | 0 | Sample or laboratory specimen identifier. |
| 19 | SamplesRetested | string / controlled vocabulary | 1 | Sample or laboratory specimen identifier. |
| 20 | ResultsEntered_Complete | string / controlled vocabulary | true | Result/status used in final classification. |
| 21 | Interpretation_Reviewed | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 22 | VariantClassification_Verified | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 23 | CriticalValues_Flagged | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 24 | ReflexTesting_Triggered_Correctly | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 25 | AddendumRequired_Flagged | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 26 | ResultsWithDiscrepancies | string / controlled vocabulary | 0 | Result/status used in final classification. |
| 27 | ReportFormat_Compliant | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 28 | RequiredElements_Present | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 29 | UnitsAndRefRanges_Correct | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 30 | Disclaimer_Included | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 31 | Language_Appropriate | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 32 | DirectorReview_Completed | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 33 | AuthorizedSigner_ID_Verified | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 34 | ElectronicSignature_Applied | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 35 | SignerCredentials | string / controlled vocabulary | MD, PhD | Controlled input parameter for deterministic QC rules. |
| 36 | DualSignout_Required | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 37 | DualSignout_Completed | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 38 | TargetTAT_Hours | string / controlled vocabulary | 168 | Time parameter for process, incubation, storage or analytical workflow. |
| 39 | ActualTAT_Hours | integer / decimal | 144 | Time parameter for process, incubation, storage or analytical workflow. |
| 40 | SLA_Met | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 41 | Priority | string / controlled vocabulary | Routine | Controlled input parameter for deterministic QC rules. |
| 42 | SLABreach_Notified | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 43 | AuditTrail_Complete | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 44 | Amendments_Documented | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 45 | ProficiencyTesting_Current | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 46 | AccreditationScope_Covers_Assay | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 47 | ClientSpecificRequirements_Met | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
BatchID,OrderingFacility,AssayName,ReceivedDate,CompletedDate,TotalSamples,SampleAccessioning_Verified,OrderMatch_Verified,PatientDemographics_Matched,SampleType_Appropriate,RejectionCriteria_Checked,SamplesRejected_PreAnalytical,RunQC_Passed,Controls_AllPassed,Calibration_Current,ReagentLot_Verified,InstrumentMaintenance_Current,SamplesFailed_Analytical,SamplesRetested,ResultsEntered_Complete,Interpretation_Reviewed,VariantClassification_Verified,CriticalValues_Flagged,ReflexTesting_Triggered_Correctly,AddendumRequired_Flagged,ResultsWithDiscrepancies,ReportFormat_Compliant,RequiredElements_Present,UnitsAndRefRanges_Correct,Disclaimer_Included,Language_Appropriate,DirectorReview_Completed,AuthorizedSigner_ID_Verified,ElectronicSignature_Applied,SignerCredentials,DualSignout_Required,DualSignout_Completed,TargetTAT_Hours,ActualTAT_Hours,SLA_Met,Priority,SLABreach_Notified,AuditTrail_Complete,Amendments_Documented,ProficiencyTesting_Current,AccreditationScope_Covers_Assay,ClientSpecificRequirements_Met
REF-BATCH-2026-0142,City Hospital Oncology,NSCLC_CGP_Panel,2026-06-01,2026-06-07,24,true,true,true,true,true,1,true,true,true,true,true,0,1,true,true,true,true,true,false,0,true,true,true,true,true,true,true,true,MD, PhD,false,false,168,144,true,Routine,false,true,true,true,true,true
REF-BATCH-2026-0143,Regional Cancer Center,BRCA1_2_Germline,2026-05-25,2026-06-09,16,true,true,true,true,true,0,true,true,true,true,true,2,2,true,true,false,true,true,true,3,true,true,true,true,true,false,false,false,,true,false,168,360,false,Routine,true,true,false,true,true,true
Input validation rules
| ID | Field | Rule | Criticality |
|---|
| VR-001 | BatchID | The field shall match an approved dictionary or accepted string representation. | High |
| VR-002 | OrderingFacility | The field shall match an approved dictionary or accepted string representation. | High |
| VR-003 | AssayName | The field shall match an approved dictionary or accepted string representation. | High |
| VR-004 | ReceivedDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-005 | CompletedDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-006 | TotalSamples | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-007 | SampleAccessioning_Verified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-008 | OrderMatch_Verified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-009 | PatientDemographics_Matched | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-010 | SampleType_Appropriate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-011 | RejectionCriteria_Checked | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-012 | SamplesRejected_PreAnalytical | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-013 | RunQC_Passed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-014 | Controls_AllPassed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-015 | Calibration_Current | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-016 | ReagentLot_Verified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-017 | InstrumentMaintenance_Current | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-018 | SamplesFailed_Analytical | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-019 | SamplesRetested | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-020 | ResultsEntered_Complete | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-021 | Interpretation_Reviewed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-022 | VariantClassification_Verified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-023 | CriticalValues_Flagged | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-024 | ReflexTesting_Triggered_Correctly | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-025 | AddendumRequired_Flagged | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-026 | ResultsWithDiscrepancies | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-027 | ReportFormat_Compliant | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-028 | RequiredElements_Present | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-029 | UnitsAndRefRanges_Correct | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-030 | Disclaimer_Included | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-031 | Language_Appropriate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-032 | DirectorReview_Completed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-033 | AuthorizedSigner_ID_Verified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-034 | ElectronicSignature_Applied | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-035 | SignerCredentials | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-036 | DualSignout_Required | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-037 | DualSignout_Completed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-038 | TargetTAT_Hours | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-039 | ActualTAT_Hours | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-040 | SLA_Met | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-041 | Priority | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-042 | SLABreach_Notified | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-043 | AuditTrail_Complete | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-044 | Amendments_Documented | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-045 | ProficiencyTesting_Current | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-046 | AccreditationScope_Covers_Assay | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-047 | ClientSpecificRequirements_Met | The field shall match an approved dictionary or accepted string representation. | Medium |
FS — Functional Specification
| ID | Function | Implementation |
|---|
| FS-001 | CLI execution | Support execution modes: demo mode without arguments and production mode input.csv output.json. |
| FS-002 | CSV import | Read input.csv in UTF-8/CSV-compatible format and validate header and expected columns. |
| FS-003 | Schema validation | Check mandatory fields, column count, unknown key fields and empty mandatory values. |
| FS-004 | Type conversion | Convert numeric, flag and text values; invalid format is recorded as a row-level error. |
| FS-005 | Domain rule engine | Apply rules for Reference Lab Batch Review Checker, including critical limits from the description and approved specification. |
| FS-006 | Status aggregation | Produce final status: FAIL for critical failure, WARNING for non-critical deviation, PASS for conformance. |
| FS-007 | JSON export | Write output.json with detailed checks, source values, warnings, failures and critical findings. |
| FS-008 | Audit support | Keep result structure suitable for review, deviation investigation and calculation reproduction. |
| FS-009 | Integration contract | Support the scenario LIMS/ELN/MES → input.csv → utility → output.json → portal/admin review. |
| FS-010 | Error handling | Return explicit messages for missing file, empty CSV, invalid schema, output write failure and invalid format. |
Example output.json
{
"utilityId": "referencelabbatchreviewchecker",
"utilityFolder": "ReferenceLabBatchReviewChecker",
"package": "LiquidBiopsy",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"processedAtUtc": "2026-06-10T00:00:00Z",
"checks": [
{
"parameter": "BatchID",
"value": "REF-BATCH-2026-0142",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-001"
},
{
"parameter": "OrderingFacility",
"value": "City Hospital Oncology",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-002"
},
{
"parameter": "AssayName",
"value": "NSCLC_CGP_Panel",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-003"
},
{
"parameter": "ReceivedDate",
"value": "2026-06-01",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-004"
},
{
"parameter": "CompletedDate",
"value": "2026-06-07",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-005"
},
{
"parameter": "TotalSamples",
"value": "24",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-006"
},
{
"parameter": "SampleAccessioning_Verified",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-007"
},
{
"parameter": "OrderMatch_Verified",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-008"
},
{
"parameter": "PatientDemographics_Matched",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-009"
},
{
"parameter": "SampleType_Appropriate",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-010"
},
{
"parameter": "RejectionCriteria_Checked",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-011"
},
{
"parameter": "SamplesRejected_PreAnalytical",
"value": "1",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-012"
}
],
"criticalFindings": [],
"warnings": [],
"audit": {
"inputHash": "sha256:<calculated at runtime>",
"rulesVersion": "<utility executable version>",
"documentation": "ReferenceLabBatchReviewChecker.documentation.html"
}
}
Traceability matrix
| URS | FS | Test | Evidence |
|---|
| URS-001 | FS-001, FS-002 | OQ-001 | Verify execution and import of valid input.csv. |
| URS-002 | FS-005, FS-006 | OQ-004 | Repeat the same dataset and compare output.json. |
| URS-003 | FS-003, FS-004, FS-010 | OQ-002, OQ-003 | Verify missing columns and invalid types. |
| URS-004 | FS-005, FS-006 | OQ-004, PQ-001 | Verify critical deviations on real/boundary data. |
| URS-005 | FS-007, FS-009 | OQ-005 | Verify JSON schema and downstream-system suitability. |
| URS-006 | FS-008 | OQ-006 | Verify identifiers and audit metadata. |
| URS-007 | FS-008, FS-010 | IQ-001, OQ-007 | Verify documentation completeness and control evidence. |
| URS-008 | FS-005, FS-008 | PQ-002 | Verify review workflow and no replacement of QA decision. |
IQ/OQ/PQ test scenarios
| ID | Scenario | Expected result |
|---|
| IQ-001 | Verify executable, input.csv, documentation and checksum availability. | Delivery set is complete; version is recorded. |
| OQ-001 | Valid sample row from input.csv. | PASS or acceptable WARNING according to rules. |
| OQ-002 | Remove a mandatory CSV column. | Schema error or FAIL with missing-column reference. |
| OQ-003 | Place a non-numeric value into a numeric field. | Type-conversion error with row/field reference. |
| OQ-004 | Set a critical parameter outside the limit. | FAIL and critical finding. |
| OQ-005 | Verify output.json structure. | All mandatory sections are present and JSON is valid. |
| OQ-006 | Verify batch/sample traceability. | Input and result identifiers match. |
| PQ-001 | Verify 3–5 real user batches/samples. | Result is confirmed by QC/QA review. |
| PQ-002 | Verify deviation workflow and manual QA decision. | Utility supports review but does not replace approved decision. |
QA/QC and change control
- Do not rename columns without updating validator, documentation and test set.
- Retain
input.csv, output.json, executable version and checksum. - Before production use, perform IQ/OQ/PQ or equivalent CSV/CSA verification.
- Critical limits shall be verified against the approved specification, registration dossier and local SOPs.
- The utility provides structured QC decision support; final release decision remains with QA/QP and approved procedures.