URS & FS — User Requirements and Functional Specification
This document describes the controlled interface and behaviour of PopulationScreeningBatchSummaryBuilder for Population Screening Batch Summary Builder.
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.
- Generates batch-level quality summary per FDA SaMD screening guidance, EU IVDR Annex I, WHO Screening Principles and MCED consortium standards: QC pass rate (≥90%) with spatial failure clustering detection, positivity rate vs expected prevalence (≤3× deviation; excess = systematic FP → BLOCK release), classifier score distribution drift (Z-score ≤2.0 vs historical baseline), triple control verification (positive/negative/NTC all must pass), index hopping rate (≤0.5%), plate position and temporal
- ⚠️ Critical: In population screening, PPV is prevalence-dependent. At 1% prevalence and 99% specificity, PPV = 50%. Every 1% specificity loss doubles FPs. Positivity >3× expected = IMMEDIATE RELEASE BLOCK. Failure clustering indicates technical, not biological, issue. Batch-level QC MUST precede individual result release. Historical baseline requires regular updating. Tool assesses COHORT-LEVEL QUALITY only; does not replace individual sample QC. Both levels required for safe screening result re
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|
| URS-001 | The utility shall accept an input.csv file for Population Screening Batch Summary Builder 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 | BATCH-MCED-2026-0142 | Batch or lot identifier used for traceability. |
| 2 | ScreeningProgram | string / controlled vocabulary | MCED | Controlled input parameter for deterministic QC rules. |
| 3 | AssayName | string / controlled vocabulary | OncoDetect_MC_v3 | Controlled input parameter for deterministic QC rules. |
| 4 | RunDate | string / controlled vocabulary | 2026-06-08 | Controlled input parameter for deterministic QC rules. |
| 5 | TotalSamples | string / controlled vocabulary | 96 | Sample or laboratory specimen identifier. |
| 6 | SamplesPassedQC | string / controlled vocabulary | 94 | Sample or laboratory specimen identifier. |
| 7 | SamplesFailedQC | string / controlled vocabulary | 2 | Sample or laboratory specimen identifier. |
| 8 | SamplesWithIndeterminate | string / controlled vocabulary | 1 | Sample or laboratory specimen identifier. |
| 9 | QCPassRate_Percent | decimal | 97.9 | Controlled input parameter for deterministic QC rules. |
| 10 | MinQCPassRate_Percent | decimal | 90 | Controlled input parameter for deterministic QC rules. |
| 11 | ScoreDistribution_Mean | integer / decimal | 0.14 | Controlled input parameter for deterministic QC rules. |
| 12 | ScoreDistribution_Median | integer / decimal | 0.11 | Controlled input parameter for deterministic QC rules. |
| 13 | ScoreDistribution_SD | decimal | 0.06 | Controlled input parameter for deterministic QC rules. |
| 14 | HistoricalMean_Score | decimal | 0.15 | Controlled input parameter for deterministic QC rules. |
| 15 | HistoricalSD_Score | decimal | 0.05 | Controlled input parameter for deterministic QC rules. |
| 16 | MaxZScore_Allowed | decimal | 2.0 | Controlled input parameter for deterministic QC rules. |
| 17 | PositiveResults_Count | integer / decimal | 2 | Count parameter used for microbiological, particulate or cellular control. |
| 18 | PositivityRate_Percent | decimal | 2.1 | Controlled input parameter for deterministic QC rules. |
| 19 | ExpectedPrevalence_Percent | decimal | 1.5 | Controlled input parameter for deterministic QC rules. |
| 20 | MaxPositivityDeviation_Fold | decimal | 3.0 | Controlled input parameter for deterministic QC rules. |
| 21 | PositivityRate_UpperCI95 | decimal | 7.4 | Controlled input parameter for deterministic QC rules. |
| 22 | TopPredictedTissue | string / controlled vocabulary | Lung | Controlled input parameter for deterministic QC rules. |
| 23 | TopTissue_Fraction_Percent | decimal | 50.0 | Controlled input parameter for deterministic QC rules. |
| 24 | UniqueTissues_Predicted | decimal | 2 | Controlled input parameter for deterministic QC rules. |
| 25 | TissueDistribution_Anomalous | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 26 | MeanCfDNA_Yield_ng | decimal | 22.5 | Biological/molecular component controlled as a CQA. |
| 27 | MinCfDNA_Yield_InBatch_ng | decimal | 8.0 | Batch or lot identifier used for traceability. |
| 28 | MeanCoverage_X | decimal | 18500 | Controlled input parameter for deterministic QC rules. |
| 29 | MeanUniformity_Percent | decimal | 91.0 | Controlled input parameter for deterministic QC rules. |
| 30 | FailedAmplicons_Mean_Percent | decimal | 1.2 | Controlled input parameter for deterministic QC rules. |
| 31 | PositiveControls_Total | string / controlled vocabulary | 4 | Control point/control sample for assay run validity. |
| 32 | PositiveControls_Passed | string / controlled vocabulary | 4 | Control point/control sample for assay run validity. |
| 33 | NegativeControls_Total | string / controlled vocabulary | 4 | Control point/control sample for assay run validity. |
| 34 | NegativeControls_Passed | string / controlled vocabulary | 4 | Control point/control sample for assay run validity. |
| 35 | NTCs_Total | decimal | 4 | Controlled input parameter for deterministic QC rules. |
| 36 | NTCs_Clean | integer / decimal | 4 | Controlled input parameter for deterministic QC rules. |
| 37 | AllControlsPass | string / controlled vocabulary | true | Control point/control sample for assay run validity. |
| 38 | IndexHopping_Rate_Percent | decimal | 0.03 | Controlled input parameter for deterministic QC rules. |
| 39 | MaxIndexHopping_Percent | decimal | 0.5 | Controlled input parameter for deterministic QC rules. |
| 40 | PlatePositionEffect_Detected | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 41 | TemporalDrift_Detected | string / controlled vocabulary | false | Temperature profile/MKT; storage, shipping and stability parameter. |
| 42 | ReagentLot | string / controlled vocabulary | LOT-2026-0451 | Batch or lot identifier used for traceability. |
| 43 | InstrumentID_Used | string / controlled vocabulary | SEQ-NOVA-03 | Controlled input parameter for deterministic QC rules. |
| 44 | FailuresInSinglePlateRegion | integer / decimal | 0 | Controlled input parameter for deterministic QC rules. |
| 45 | FailureCluster_Location | string / controlled vocabulary | | Controlled input parameter for deterministic QC rules. |
| 46 | FailureClustering_Detected | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
BatchID,ScreeningProgram,AssayName,RunDate,TotalSamples,SamplesPassedQC,SamplesFailedQC,SamplesWithIndeterminate,QCPassRate_Percent,MinQCPassRate_Percent,ScoreDistribution_Mean,ScoreDistribution_Median,ScoreDistribution_SD,HistoricalMean_Score,HistoricalSD_Score,MaxZScore_Allowed,PositiveResults_Count,PositivityRate_Percent,ExpectedPrevalence_Percent,MaxPositivityDeviation_Fold,PositivityRate_UpperCI95,TopPredictedTissue,TopTissue_Fraction_Percent,UniqueTissues_Predicted,TissueDistribution_Anomalous,MeanCfDNA_Yield_ng,MinCfDNA_Yield_InBatch_ng,MeanCoverage_X,MeanUniformity_Percent,FailedAmplicons_Mean_Percent,PositiveControls_Total,PositiveControls_Passed,NegativeControls_Total,NegativeControls_Passed,NTCs_Total,NTCs_Clean,AllControlsPass,IndexHopping_Rate_Percent,MaxIndexHopping_Percent,PlatePositionEffect_Detected,TemporalDrift_Detected,ReagentLot,InstrumentID_Used,FailuresInSinglePlateRegion,FailureCluster_Location,FailureClustering_Detected
BATCH-MCED-2026-0142,MCED,OncoDetect_MC_v3,2026-06-08,96,94,2,1,97.9,90,0.14,0.11,0.06,0.15,0.05,2.0,2,2.1,1.5,3.0,7.4,Lung,50.0,2,false,22.5,8.0,18500,91.0,1.2,4,4,4,4,4,4,true,0.03,0.5,false,false,LOT-2026-0451,SEQ-NOVA-03,0,,false
BATCH-MCED-2026-0143,MCED,OncoDetect_MC_v3,2026-06-09,96,78,18,5,81.3,90,0.32,0.28,0.12,0.15,0.05,2.0,12,15.4,1.5,3.0,27.8,Liver,75.0,2,true,18.0,3.5,12000,78.0,8.5,4,3,4,2,4,3,false,1.8,0.5,true,true,LOT-2026-0467,SEQ-NOVA-03,14,Rows G-H Cols 9-12,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 | ScreeningProgram | 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 | RunDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-005 | TotalSamples | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-006 | SamplesPassedQC | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-007 | SamplesFailedQC | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-008 | SamplesWithIndeterminate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-009 | QCPassRate_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-010 | MinQCPassRate_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-011 | ScoreDistribution_Mean | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-012 | ScoreDistribution_Median | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-013 | ScoreDistribution_SD | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-014 | HistoricalMean_Score | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-015 | HistoricalSD_Score | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-016 | MaxZScore_Allowed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-017 | PositiveResults_Count | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-018 | PositivityRate_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-019 | ExpectedPrevalence_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-020 | MaxPositivityDeviation_Fold | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-021 | PositivityRate_UpperCI95 | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-022 | TopPredictedTissue | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-023 | TopTissue_Fraction_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-024 | UniqueTissues_Predicted | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-025 | TissueDistribution_Anomalous | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-026 | MeanCfDNA_Yield_ng | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-027 | MinCfDNA_Yield_InBatch_ng | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-028 | MeanCoverage_X | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-029 | MeanUniformity_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-030 | FailedAmplicons_Mean_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-031 | PositiveControls_Total | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-032 | PositiveControls_Passed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-033 | NegativeControls_Total | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-034 | NegativeControls_Passed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-035 | NTCs_Total | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-036 | NTCs_Clean | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-037 | AllControlsPass | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-038 | IndexHopping_Rate_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-039 | MaxIndexHopping_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-040 | PlatePositionEffect_Detected | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-041 | TemporalDrift_Detected | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-042 | ReagentLot | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-043 | InstrumentID_Used | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-044 | FailuresInSinglePlateRegion | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-045 | FailureCluster_Location | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-046 | FailureClustering_Detected | 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 Population Screening Batch Summary Builder, 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": "populationscreeningbatchsummarybuilder",
"utilityFolder": "PopulationScreeningBatchSummaryBuilder",
"package": "LiquidBiopsy",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"processedAtUtc": "2026-06-10T00:00:00Z",
"checks": [
{
"parameter": "BatchID",
"value": "BATCH-MCED-2026-0142",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-001"
},
{
"parameter": "ScreeningProgram",
"value": "MCED",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-002"
},
{
"parameter": "AssayName",
"value": "OncoDetect_MC_v3",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-003"
},
{
"parameter": "RunDate",
"value": "2026-06-08",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-004"
},
{
"parameter": "TotalSamples",
"value": "96",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-005"
},
{
"parameter": "SamplesPassedQC",
"value": "94",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-006"
},
{
"parameter": "SamplesFailedQC",
"value": "2",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-007"
},
{
"parameter": "SamplesWithIndeterminate",
"value": "1",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-008"
},
{
"parameter": "QCPassRate_Percent",
"value": "97.9",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-009"
},
{
"parameter": "MinQCPassRate_Percent",
"value": "90",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-010"
},
{
"parameter": "ScoreDistribution_Mean",
"value": "0.14",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-011"
},
{
"parameter": "ScoreDistribution_Median",
"value": "0.11",
"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": "PopulationScreeningBatchSummaryBuilder.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.