Documentation

41.4 Case 1: a repair plan and the clean re-run

Same 99 checks, two files, two verdicts

What you will learn

  • Turn a findings table into a repair plan with a disposition for every row.
  • Distinguish fixing at the source from excluding a record and from accepting a warning.
  • Read a READY verdict, including the comments and N/A rows that remain.
  • Keep the original, the repaired file and both summaries together.

Prerequisites: 41.3 A dirty file, line by line.

The question: what do we do about each finding?

The evidence: the findings table qc_findings.csv of the defective file, the flagged copy qc_flagged_data.csv it wrote, and the clean bundle, whose input clean_pk.csv has the same 16 columns.

Three dispositions

A finding can be answered in only three ways. Every row of a repair plan carries one.

Disposition Meaning When it is right
Fix at the source the value is wrong and the right value is known typing errors, wrong flags, wrong units
Exclude the record cannot be repaired and should not be analysed an unquantifiable observation; a record with no dose and no way to recover one
Accept the record is correct and unusual a genuinely extreme body weight; a rare category

Never fix by guessing: a value changed without a source is a new error with a clean appearance. If the right value is not in the source documents, the disposition is exclude or query the data manager, not edit.

A repair plan for the defective file

The dispositions below are the worked decisions of this case. They are the analyst's, not the program's: the data decide none of them.

Finding Line Disposition Reason
REC03: EVID 1, MDV 0 2 Fix at source A dose record is MDV 1 by definition; a data-management slip
TIM01: time goes backwards 5 Query, then fix Which of the two times (1 or 2) is wrong is not in the file; the DV of 99 on the same line is itself suspect (page 41.3)
TIM02: ID 1 reappears 13 Fix at source The record belongs to individual 1; move it to its block and sort by ID and TIME
REC14: ADDL 2, II 0 6 Query The interval of the additional doses is missing; it cannot be inferred
COV03: WT 500, AGE 132 6 Query Looks like a unit or a typing error; do not assume
COV05: SEX = 3 6 Query Not a code in the data specification
COV04: WT 70 vs 71 4 Accept or fix Baseline covariates should be constant; use the baseline value (70) if the source agrees
OBS02/03/04: negative, zero and sub-LLOQ values 7, 10, 11 Fix at source Define one BLQ rule (flag column plus one imputation) and apply it to all three
OBS05: 33 % BLQ — Accept, document The proportion is a property of this tiny file, not an error
DOS01, OBS09, SUB02: one record, no dose 12 Exclude Individual 4 has one observation and no dose; nothing to estimate from
REC18: two observations at time 1 7, 8 Fix at source Replicate or duplicate? The source decides; with DV −2 and 2 at the same time, at least one is wrong
OBS10: no quantifiable post-dose DV 10, 11 Exclude from PK analysis Individual 3's two observations are 0 and 0.05, below the 0.1 LLOQ

Of twelve rows, eight are queries or fixes at the source, two are exclusions, and two are acceptances. A repair plan with no queries is a sign the analyst edited what should have been asked.

Why the original is kept

qc-data never changes the input. It writes a flagged copy (qc_flagged_data.csv): the same records with one extra column, QC_FLAG, holding the check identifiers that concern each record (the first record of individual 1 carries REC03, the second TIM05, the third COV04), so an analyst sees every flag next to the line it describes. The file you repair is a new file derived from the source system, and the defective original stays beside it with its summary. Two reasons:

  1. If the repair is questioned, the record of what was received is intact.
  2. The two summaries together are the evidence that the repair worked: the first says why the original failed, the second says that the repaired file passes the same checks.

The re-run

The clean bundle shows what the second summary looks like. It is a file of the same layout (four individuals, 16 records, 4 dose records and 12 observations, three observations per individual at 0.5, 2 and 8 hours; doses of 100 and 200):

Content   16 records, 16 columns; 4 individuals; 4 dose records; 12 observations (12 used)
Verdict   READY — no failures or warnings
Checks    99 checks: 83 PASS, 7 COMMENT, 0 WARN, 0 FAIL, 9 N/A

(It is a separate clean file, not a literal repair of the defective one; its settings also differ a little, for example the minimum number of individuals per categorical level.) The same 99 questions get 83 passes, seven comments, no warnings and no failures.

Reading what remains

A clean run is not an empty one. The seven comments are descriptive: which compartments receive doses and which are observed (doses into CMT 1, observations in CMT 2), the dose levels (100 and 200, two individuals each), the sampling design (three samples per individual), the count of individuals, records and doses, the covariate types, and the control-stream statements ($DATA, $INPUT) that fit the file. They are there to be read, because they are the data as the program understands it. If the comment says "doses into CMT 1 (4)" and you thought the drug was infused into CMT 2, you found an error that no pass/fail rule could.

The nine N/A rows are likewise informative: no time-gap limit was set, no TAD or nominal-time column was named, fewer than five dose records, fewer than five individuals, and so on. A check that could not run reports that it could not, so a clean verdict never says more than the file and the settings allowed.

The decision

Question Evidence Decision Reversible?
Is the repaired file ready? qc_summary.txt: READY, 0 WARN, 0 FAIL Yes. Proceed, carrying the comments and N/A rows into the analysis plan yes

What this case does not show

A READY verdict does not mean the concentrations are right. It means that none of 99 stated checks found a problem. A mislabelled arm, a wrong units conversion applied consistently to every record, or a dose given on the wrong day all pass every structural check.

Review checklist

  • Does each finding have one of the three dispositions?
  • Is every "fix at the source" traceable to a source document, not a guess?
  • Are the original and the repaired file stored side by side with their summaries?
  • Have you read the comments and N/A rows of the clean run?

See the previous page, the next page and the complete case-study reference.