The operational problem
Quality control (QC) in statistical programming is expensive and often misallocated. Teams apply the same method to every output, whether it carries the primary endpoint or lists concomitant medications, and then run out of time for the outputs that matter most. Meanwhile, the same kinds of defect return study after study because they are fixed one at a time and never traced to a cause.
Three patterns are common:
- One QC method for everything. Full independent programming of every output, or the reverse: review-only checks under time pressure.
- Defects are fixed but not learned from. The defect log records what was wrong, not why.
- Rework is treated as a QC problem. Much rework is caused upstream, by late decisions, unclear specifications or unstable inputs, and no amount of checking prevents it.
Practical methodology
1. Choose a QC method per output by risk
Current good clinical practice asks for quality approaches that are proportionate to the risks to participants and to the reliability of results,[1] and quality should be designed into the study from the start.[2] Applied to programming:
| Method | What it involves | Typically proportionate for |
|---|---|---|
| Full independent programming | A second programmer produces the result separately and the two are compared | Primary and key secondary efficacy, key safety summaries, complex derivations |
| Targeted independent checks | Independent recalculation of selected values, populations and edge cases | Moderate-risk outputs and derivations |
| Review-based QC | Structured review of code, log and output against the specification | Low-risk listings and simple summaries |
Agree the method per output with the study statistician and record it in the QC plan.
2. Separate validating programs from validating outputs
Validating a program shows that it implements the specification. Validating an output shows that the result is right for this data. Both matter, and they leave different evidence: code review records and test results for programs; comparison results and reviewer sign-off for outputs.
3. Classify defects and look for causes
Record each defect with a class (specification, derivation, data handling, presentation, environment) and a root cause (unclear specification, late decision, unstable input, convention not followed, tool issue). Review the log at each milestone. A cause that appears repeatedly is a process to change. Variation that comes from the system will not be removed by asking individuals to try harder.[3]
4. Remove upstream drivers of rework
The usual drivers are late decisions, unclear specifications and unstable inputs. Each has a countermeasure elsewhere in this Handbook: latest acceptable dates for decisions (chapters 6 and 8), controlled specifications (chapter 5) and data cutoffs (chapter 6).
5. Allocate QC effort explicitly
Estimate QC effort separately from production effort and plan it as capacity (chapter 4). Schedule QC of priority outputs first, so they are never the ones squeezed at the end. Protect independence: the person who wrote a program should not be the one who checks it.
6. Keep evidence usable
QC evidence should show what was checked, by whom, against which version, with what result. Electronic records used for regulated activities need appropriate controls.[4] Evidence assembled after the fact is weaker and slower to produce in an inspection.
A realistic example
Synthetic and illustrative.
A team's defect log for two studies shows 64 defects. Classified by root cause, 23 trace to visit-window rules interpreted differently by different programmers, and 11 to a population flag derived before the protocol deviation list was final. The lead makes two process changes: a shared, documented visit-window macro with tests, and a rule that population flags are not finalized until the deviation list is signed off (with a latest acceptable date). On the next study, window-related defects drop to three. QC effort is also re-allocated: full independent programming for 18 priority outputs, targeted checks for 40, review-based QC for 70 listings, freeing time that had been spent on low-risk listings.
Decision framework
| Question | If yes | If no |
|---|---|---|
| Does the output support a primary or key secondary conclusion, or a key safety conclusion? | Full independent programming | Next question |
| Does it contain a complex or novel derivation? | Targeted checks at least | Next question |
| Is it a listing or simple summary from verified datasets? | Review-based QC | Targeted checks |
| Has this output type had repeat defects? | Raise the method one level and fix the cause | Keep the planned method |
Common failure modes
| Failure mode | How it shows up | Countermeasure |
|---|---|---|
| Uniform QC | Priority outputs squeezed at the end | QC method per output by risk |
| Fix without cause | The same defect class every study | Root-cause classification and milestone review |
| QC treated as free | Plans show production hours only | Estimate and schedule QC effort |
| Independence lost under pressure | Same person programs and checks | Protect independence in the plan |
| Evidence after the fact | Missing records in an inspection | Record QC evidence as you go |
Recommended actions
- Assign a QC method to every output in your current study with the template, and agree it with the statistician.
- Classify your last study's defects by root cause and pick the top two causes to remove.
- Schedule QC of priority outputs first in your plan.
- Estimate QC effort separately in the Capacity Estimator.
- Check that QC evidence shows what, who, which version and what result.
Limitations
- The QC method mapping is a common pattern, not a regulatory requirement; your procedures decide.
- The defect counts in the example are illustrative.
- This chapter is a draft prepared for the author's review and has not been independently reviewed.
Template
QC plan and defect log
One table that assigns a QC method to each output by risk, and records defects with class, root cause and fix.
| Record type | Output or defect ID | Description | Risk level | QC method |
|---|---|---|---|---|
| QC plan | T-14.2.1 | Primary efficacy analysis table | High | Full independent programming |
| QC plan | L-16.2.7 | Concomitant medication listing | Low | Review-based QC |
| Defect | D-031 | Visit window applied inclusive on one side only |
Preview of the first 5 of 11 columns and 3 synthetic example rows. The download has all 11 columns, blank rows with formulas, and no study data.
Apply it
Apply it in the Navigator
The Handbook explains why and how to decide. The Navigator turns the same logic into dated, owned actions for your milestone, in your browser, with no study data.
- Operational playbooksScenario response patterns
- Capacity EstimatorInclude QC effort in the estimate
Supporting references
References
- ICH. E6(R3) Guideline for Good Clinical Practice. International Council for Harmonisation; 2025. www.ich.org ↗
- ICH. E8(R1) General Considerations for Clinical Studies. International Council for Harmonisation; 2021. www.ich.org ↗
- Deming WE. Out of the Crisis. MIT Press; 1986.
- U.S. Code of Federal Regulations. 21 CFR Part 11: Electronic Records; Electronic Signatures. www.ecfr.gov ↗
Links go to the publisher's page. Standards and guidance change: confirm the version in force for your study, sponsor and region before relying on any reference. The worked examples are synthetic and illustrative; they are not benchmarks.
Review status
This chapter has not yet been independently reviewed
It is an author draft written from statistical programming leadership practice. No practitioner has reviewed it yet, and nothing here should be read as validated or endorsed by anyone else. If you work in this area, a 45-minute review using a synthetic scenario is the most useful thing you can do for it.
Suggested citation: Gogu, Shiva Kumar. 2026. “Quality, Validation and Rework Prevention”, chapter version 0.1, in Clinical Statistical Programming Operations: A Practical Leadership Handbook, working edition 0.1. Clinical Data Readiness Navigator. https://www.clinicaldatareadiness.org/handbook/07-quality-and-rework-prevention.html. Accessed [date].