URS & FS — User Requirements and Functional Specification
This document describes the controlled interface and behaviour of TreatmentResponseMonitoringChecker for Treatment Response Monitoring 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 molecular response evaluation per ESMO Precision Medicine Guidelines, NCCN Therapy Monitoring, CAP/CLIA §GEN.48800 and consensus molecular monitoring recommendations: molecular response classification (mCR: sustained clearance ≥2 timepoints; mPR: ≥50% VAF decrease from baseline; mSD: neither mPR nor mPD; mPD: ≥25% VAF increase from nadir OR new confirmed resistance variant; INDETERMINATE: technical limitations), VAF dynamics (baseline→nadir→current percent change, molecular clearance as
- ⚠️ Critical: Molecular response ≠ radiological response; integration of both mandatory. New resistance mutation = mPD EVEN IF target VAF decreasing. VAF comparison across different matrices (tissue vs plasma) INVALID. Single-timepoint clearance ≠ mCR; sustained confirmation required. ≥25% increase from nadir = mPD threshold (analogous to RECIST PD). Discordance requires clinical correlation, not automatic decision. Technical issues at any timepoint = INDETERMINATE assessment. Tool provides STRUC
- 5. Clearance Confirmation: Require ≥2 consecutive below-LOD timepoints for mCR declaration.
URS — User Requirements Specification
| ID | Requirement | Criticality | Acceptance criterion |
|---|
| URS-001 | The utility shall accept an input.csv file for Treatment Response Monitoring 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 | PatientID | string / controlled vocabulary | PAT-LUNG-042 | Controlled input parameter for deterministic QC rules. |
| 2 | PrimaryTumorType | string / controlled vocabulary | NSCLC | Controlled input parameter for deterministic QC rules. |
| 3 | CurrentTherapy | string / controlled vocabulary | Osimertinib | Controlled input parameter for deterministic QC rules. |
| 4 | TherapyLine | string / controlled vocabulary | First_Line | Controlled input parameter for deterministic QC rules. |
| 5 | TherapyStartDate | string / controlled vocabulary | 2026-03-15 | Controlled input parameter for deterministic QC rules. |
| 6 | DaysOnTherapy | integer / decimal | 85 | Time parameter for process, incubation, storage or analytical workflow. |
| 7 | BaselineVariant | string / controlled vocabulary | EGFR:L858R | Controlled input parameter for deterministic QC rules. |
| 8 | BaselineVAF_Percent | decimal | 18.5 | Controlled input parameter for deterministic QC rules. |
| 9 | BaselineDate | string / controlled vocabulary | 2026-03-10 | Controlled input parameter for deterministic QC rules. |
| 10 | BaselineQC_Passed | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 11 | NadirVAF_Percent | decimal | 0.8 | Controlled input parameter for deterministic QC rules. |
| 12 | NadirDate | string / controlled vocabulary | 2026-05-20 | Controlled input parameter for deterministic QC rules. |
| 13 | SampleID_Current | string / controlled vocabulary | TX-2026-001 | Sample or laboratory specimen identifier. |
| 14 | CurrentVAF_Percent | decimal | 1.2 | Controlled input parameter for deterministic QC rules. |
| 15 | CurrentDate | string / controlled vocabulary | 2026-06-08 | Controlled input parameter for deterministic QC rules. |
| 16 | CurrentQC_Passed | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 17 | CurrentDepth_X | decimal | 15000 | Controlled input parameter for deterministic QC rules. |
| 18 | AssayLOD_Percent | decimal | 0.01 | Controlled input parameter for deterministic QC rules. |
| 19 | CurrentAboveLOD | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 20 | DaysSinceBaseline | integer / decimal | 90 | Time parameter for process, incubation, storage or analytical workflow. |
| 21 | DaysSinceNadir | integer / decimal | 19 | Time parameter for process, incubation, storage or analytical workflow. |
| 22 | NewResistanceVariant_Detected | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 23 | NewResistanceVariant | string / controlled vocabulary | | Controlled input parameter for deterministic QC rules. |
| 24 | NewVariantVAF_Percent | decimal | 0 | Controlled input parameter for deterministic QC rules. |
| 25 | NewVariant_Confirmed | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 26 | ResistanceMechanism | string / controlled vocabulary | | Controlled input parameter for deterministic QC rules. |
| 27 | RECIST_Response | string / controlled vocabulary | PR | Controlled input parameter for deterministic QC rules. |
| 28 | LastImaging_Date | string / controlled vocabulary | 2026-06-01 | Controlled input parameter for deterministic QC rules. |
| 29 | DaysBetween_MolecularAndImaging | integer / decimal | 7 | Time parameter for process, incubation, storage or analytical workflow. |
| 30 | MolecularRadiological_Concordant | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 31 | DiscordanceType | string / controlled vocabulary | | Controlled input parameter for deterministic QC rules. |
| 32 | BothTimepoints_TechnicallyReliable | string / controlled vocabulary | true | Time parameter for process, incubation, storage or analytical workflow. |
| 33 | SampleType_Consistent | string / controlled vocabulary | true | Sample or laboratory specimen identifier. |
| 34 | AssayPlatform_Consistent | string / controlled vocabulary | true | Controlled input parameter for deterministic QC rules. |
| 35 | ReliabilityConcern | string / controlled vocabulary | | Controlled input parameter for deterministic QC rules. |
| 36 | Symptoms_Progressing | string / controlled vocabulary | false | Controlled input parameter for deterministic QC rules. |
| 37 | ECOG_Status | string / controlled vocabulary | 0 | Result/status used in final classification. |
| 38 | ActionableAlternative_Available | string / controlled vocabulary | false | Biological/molecular component controlled as a CQA. |
| 39 | AlternativeTherapyOptions | string / controlled vocabulary | | Biological/molecular component controlled as a CQA. |
PatientID,PrimaryTumorType,CurrentTherapy,TherapyLine,TherapyStartDate,DaysOnTherapy,BaselineVariant,BaselineVAF_Percent,BaselineDate,BaselineQC_Passed,NadirVAF_Percent,NadirDate,SampleID_Current,CurrentVAF_Percent,CurrentDate,CurrentQC_Passed,CurrentDepth_X,AssayLOD_Percent,CurrentAboveLOD,DaysSinceBaseline,DaysSinceNadir,NewResistanceVariant_Detected,NewResistanceVariant,NewVariantVAF_Percent,NewVariant_Confirmed,ResistanceMechanism,RECIST_Response,LastImaging_Date,DaysBetween_MolecularAndImaging,MolecularRadiological_Concordant,DiscordanceType,BothTimepoints_TechnicallyReliable,SampleType_Consistent,AssayPlatform_Consistent,ReliabilityConcern,Symptoms_Progressing,ECOG_Status,ActionableAlternative_Available,AlternativeTherapyOptions
PAT-LUNG-042,NSCLC,Osimertinib,First_Line,2026-03-15,85,EGFR:L858R,18.5,2026-03-10,true,0.8,2026-05-20,TX-2026-001,1.2,2026-06-08,true,15000,0.01,true,90,19,false,,0,false,,PR,2026-06-01,7,true,,true,true,true,,false,0,false,
PAT-CRC-055,CRC,Cetuximab+FOLFIRI,Second_Line,2026-01-10,150,KRAS_WT,0,2026-01-05,true,0,2026-01-05,TX-2026-002,8.5,2026-06-09,true,12000,0.01,true,155,155,true,KRAS:G12C,8.5,true,Off_Target_Bypass,PD,2026-06-05,4,true,,true,true,true,,true,1,true,Sotorasib;Adagrasib;Clinical_Trial
PAT-BRCA-061,Breast,Palbociclib+Letrozole,First_Line,2026-02-01,128,PIK3CA:H1047R,12.0,2026-01-28,true,0.3,2026-04-15,TX-2026-003,0.5,2026-06-08,true,18000,0.01,true,131,54,false,,0,false,,PD,2026-06-05,3,false,Molecular_PR_Radiological_PD,true,true,true,,false,0,true,Fulvestrant;Alpelisib
Input validation rules
| ID | Field | Rule | Criticality |
|---|
| VR-001 | PatientID | The field shall match an approved dictionary or accepted string representation. | High |
| VR-002 | PrimaryTumorType | The field shall match an approved dictionary or accepted string representation. | High |
| VR-003 | CurrentTherapy | The field shall match an approved dictionary or accepted string representation. | High |
| VR-004 | TherapyLine | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-005 | TherapyStartDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-006 | DaysOnTherapy | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-007 | BaselineVariant | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-008 | BaselineVAF_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-009 | BaselineDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-010 | BaselineQC_Passed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-011 | NadirVAF_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-012 | NadirDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-013 | SampleID_Current | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-014 | CurrentVAF_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-015 | CurrentDate | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-016 | CurrentQC_Passed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-017 | CurrentDepth_X | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-018 | AssayLOD_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-019 | CurrentAboveLOD | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-020 | DaysSinceBaseline | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-021 | DaysSinceNadir | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-022 | NewResistanceVariant_Detected | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-023 | NewResistanceVariant | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-024 | NewVariantVAF_Percent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-025 | NewVariant_Confirmed | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-026 | ResistanceMechanism | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-027 | RECIST_Response | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-028 | LastImaging_Date | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-029 | DaysBetween_MolecularAndImaging | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-030 | MolecularRadiological_Concordant | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-031 | DiscordanceType | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-032 | BothTimepoints_TechnicallyReliable | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-033 | SampleType_Consistent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-034 | AssayPlatform_Consistent | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-035 | ReliabilityConcern | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-036 | Symptoms_Progressing | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-037 | ECOG_Status | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-038 | ActionableAlternative_Available | The field shall match an approved dictionary or accepted string representation. | Medium |
| VR-039 | AlternativeTherapyOptions | 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 Treatment Response Monitoring 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": "treatmentresponsemonitoringchecker",
"utilityFolder": "TreatmentResponseMonitoringChecker",
"package": "LiquidBiopsy",
"overallStatus": "PASS|WARNING|FAIL",
"sourceFile": "input.csv",
"processedAtUtc": "2026-06-10T00:00:00Z",
"checks": [
{
"parameter": "PatientID",
"value": "PAT-LUNG-042",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-001"
},
{
"parameter": "PrimaryTumorType",
"value": "NSCLC",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-002"
},
{
"parameter": "CurrentTherapy",
"value": "Osimertinib",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-003"
},
{
"parameter": "TherapyLine",
"value": "First_Line",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-004"
},
{
"parameter": "TherapyStartDate",
"value": "2026-03-15",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-005"
},
{
"parameter": "DaysOnTherapy",
"value": "85",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-006"
},
{
"parameter": "BaselineVariant",
"value": "EGFR:L858R",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-007"
},
{
"parameter": "BaselineVAF_Percent",
"value": "18.5",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-008"
},
{
"parameter": "BaselineDate",
"value": "2026-03-10",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-009"
},
{
"parameter": "BaselineQC_Passed",
"value": "true",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-010"
},
{
"parameter": "NadirVAF_Percent",
"value": "0.8",
"status": "PASS|WARNING|FAIL",
"message": "Deterministic rule-based check result",
"ruleReference": "FS-RULE-011"
},
{
"parameter": "NadirDate",
"value": "2026-05-20",
"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": "TreatmentResponseMonitoringChecker.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.