Tutorials › Population Pharmacokinetics › Preserve Raw Values and Document Corrections

Dataset Construction and Quality Control · Tutorial 43 of 599

Preserve Raw Values and Document Corrections

Learn to create an auditable PK dataset in which original values remain intact and every correction can be explained and reconstructed.

Intermediate 12 min read

What You'll Learn

  • Distinguish immutable source values from corrected or derived analysis values
  • Design a correction log that records old and new values, reasons, evidence, dates, and reviewers
  • Reconstruct a field’s history from an ordered sequence of correction events
  • Decide when evidence supports a correction and when a discrepancy must remain unresolved
  • Check that corrections propagate consistently to dependent analysis fields
  • Recognize the risks of overwriting data or changing values to improve model fit

Why Preserve the Source Value?

A value in a population pharmacokinetic dataset may pass through several hands: it is recorded at a site, transcribed into a system, exported, checked, and prepared for analysis. A value that looks implausible or inconsistent may be a transcription error, but it may also be an unusual yet genuine observation. Changing it without preserving what was received makes it difficult to distinguish those possibilities later.

The safe approach is to keep the source value unchanged and represent any proposed correction in a separate analysis field. A reviewer should be able to tell what arrived, what was used, why it changed, what evidence supported the change, and who made or approved it. This is not merely good record-keeping: it makes dataset construction reviewable and helps prevent an analyst’s expectations from silently shaping the data.

Definition: A raw source value is the value as received from its source, retained without alteration. An analysis value is the value selected for a specified analysis after documented corrections or transformations. A correction event is a recorded change from one value to another, with its reason, supporting evidence, date, and responsible reviewer. A value that has not been corrected may have the same raw and analysis value; the two fields remain conceptually distinct.

“Raw” should mean the original value at the relevant point of collection or transfer, not an analyst’s later reconstruction of what must have been intended. Preserve the original source file or a faithful, access-controlled copy as well as the recorded value. If importing the file requires parsing or formatting—for example, separating a number from its text representation—retain enough information to trace the parsed value back to the source record. Preserve identifiers and source context needed to locate that record, subject to appropriate privacy and access controls.

A Traceable Representation of Changes

A practical dataset separates source information, the value used in analysis, and the history that connects them. For each record, retain a stable record identifier and the field name, the raw value, the analysis value, and an indicator or status describing whether the value is unchanged, corrected, unresolved, or otherwise handled. The correction log should identify the affected record and field and include, at minimum:

  • the previous value and the proposed new value, in unambiguous formats;
  • the reason for the change, stated specifically rather than as “cleaning”;
  • the evidence supporting the change, such as a named source document, record identifier, or query response;
  • the date and time of the change, preferably with a consistent time convention;
  • the person who made the change and the responsible reviewer or approver, with their roles clear;
  • the dataset or processing version in which the change took effect.

If one person both enters and reviews a change, the record should make that clear rather than implying independent review. Where a regulated or study-specific procedure requires additional fields or approvals, follow that procedure. The core principle is that someone who did not make the change can understand and verify it.

A correction log can be represented as a sequence. Let \(x^{(0)}\) denote the original value for a field, and let \(e_k\) denote the \(k\)th approved correction event. Each event specifies a prior value and a replacement value. If \(x^{(k-1)}\) is the value before that event, then the event produces \(x^{(k)}\). For a simple replacement, the consistency condition is:

$$ \text{prior}(e_k)=x^{(k-1)}, \qquad x^{(k)}=\text{replacement}(e_k) $$

This condition provides a basic audit check: the recorded prior value in the next event should agree with the value produced by the preceding event. The final analysis value is \(x^{(m)}\) after \(m\) approved events. If there are no correction events, it is \(x^{(0)}\). Keeping the ordered events makes it possible to reconstruct the sequence rather than seeing only a final value with no explanation.

Key principle: Never make a correction by overwriting the only copy of the source value. Store the analysis value separately and retain a traceable event that connects the two.

Worked Examples

Worked Example: Correcting a Sample Time With Source Evidence

In a hypothetical PK dataset, a sample record shows a raw collection time of 10:45. The original signed collection form for the same participant and sample identifier clearly records 10:15. A reviewer confirms that the identifiers match and approves a correction. The dose time is 08:00 on the same date. Show what should be preserved and calculate the elapsed time used for analysis.

Preserve the source. The raw collection-time field remains 10:45. The analysis collection-time field becomes 10:15. The correction event records the old value (10:45), the new value (10:15), the reason (“transcription differs from signed collection form”), the form identifier as evidence, the change date, and the responsible editor and reviewer.

Recalculate dependent fields. Since both times are on the same date, elapsed time in hours is the sample time minus the dose time. Using the corrected time:

$$ t_{\text{analysis}} = \frac{10{:}15-08{:}00}{60\text{ minutes per hour}} = \frac{135\text{ minutes}}{60\text{ minutes per hour}} = 2.25\text{ hours} $$

Using the raw time would instead give \((10{:}45-08{:}00)/60=165/60=2.75\) hours. The derived analysis time must therefore be generated from the corrected analysis collection time, not left at 2.75 hours. The raw time and original derived result may be retained for traceability, but they must not be confused with the current analysis fields.

Worked Example: Recording a Concentration Correction

In a hypothetical dataset, a concentration field contains a raw value of 3.6 mg/L. The laboratory report linked by the sample accession number gives 0.36 mg/L. The report is legible, its accession number matches the PK record, and an authorized reviewer confirms that the export differs from the report. Decide what belongs in the dataset and log.

The raw field remains 3.6 mg/L. The analysis field is set to 0.36 mg/L only after the evidence and review are documented. The correction event records the change from 3.6 mg/L to 0.36 mg/L, the reason (“export value does not match the linked laboratory report”), the report identifier and relevant result as evidence, the date, and the responsible editor and reviewer. The values have the same units, so no unit conversion is part of this correction.

The numerical difference is \(3.6-0.36=3.24\) mg/L, but that arithmetic does not establish which value is correct. The linked report and matching accession number support the replacement; the difference alone does not. If the evidence were ambiguous, the analyst should not select whichever value seems more plausible.

Worked Example: Leaving an Unresolved Discrepancy Unchanged

In a hypothetical record, the source export gives a collection time of 09:20, while a handwritten note that cannot be confidently linked to the sample appears to say 09:50. No other evidence resolves the conflict. What should be done?

Retain 09:20 in the raw field and do not replace it with 09:50 on the basis of an uncertain note. Record the discrepancy as an issue, including the two candidate times, the note’s uncertain linkage, the date it was reviewed, and the reviewer. Set the analysis status to indicate that the discrepancy is unresolved, following the project’s defined handling rule. If a valid analysis value cannot be established, do not silently choose one; keep the value unavailable for analyses that require a resolved time, as required by the prespecified data-handling procedure.

The key distinction is between preserving what the source export says and asserting what actually happened. The first is possible here; the second is not established by the available evidence. A clear unresolved status is more informative than an unsupported correction.

Correction Workflow and Checks

A correction should be evidence-led, reproducible, and limited to the fields that the evidence justifies. The following sequence helps make those properties explicit.

1
Identify and preserve.
Locate the record and field, retain the source value and its provenance, and flag the discrepancy without editing the source.
2
Assess the evidence.
Check that the supporting document or response refers to the same participant, event, sample, and field. If the evidence is incomplete or conflicting, leave the correction unresolved.
3
Record and review.
Document old and new values, the specific reason, evidence, date, editor, reviewer, and applicable dataset version. Obtain any required independent review before using the change.
4
Rebuild and verify.
Regenerate affected analysis fields from the approved value, then check that the correction log, analysis dataset, and dependent fields agree.

A useful quality-control check is to replay the events for each changed field in order. The first event must identify the preserved source value as its prior value; each later event must identify the value produced by the preceding event. The replayed final value must equal the analysis value in the released dataset. This simple check catches common problems such as a missing event, an event applied to the wrong record, or a final field that does not reflect the approved history.

Also check the scope of change. A correction to a sample time may affect elapsed time and any other analysis field derived from that time. A concentration correction may affect summaries or flags calculated from concentration. Recompute affected fields from their documented inputs instead of editing them independently. Then confirm that unaffected fields did not change unexpectedly. Record the dataset version and, where applicable, the program or process used to produce the released analysis data.

Comparison, Diagnostics, and Limitations

Keeping only an overwritten “clean” value is quick to implement, but it loses the source observation and prevents reliable reconstruction. Keeping both raw and analysis values without a correction log preserves the original but leaves the reason and authority for the difference unclear. A structured correction log provides both the source-to-analysis connection and the context needed to review it. For large datasets, a change-control system or versioned processing pipeline can help enforce this structure; tools do not replace the need for clear evidence and review.

Warning signs that the process may be failing include analysis values that differ from raw values without a corresponding event; log entries with no record or field identifier; corrections justified only by “looks wrong”; missing reviewer or date information; prior values in a sequence that do not match the preceding event; and derived fields inconsistent with the corrected inputs. Checks should also detect duplicate correction events, changes made after a dataset release without a new version, and values that were edited outside the controlled process.

A complete audit trail does not guarantee that a correction is factually right. It makes the evidence and decision visible so they can be assessed. Source documents may be wrong, incomplete, or contradictory; reviewers can make mistakes; and a change log can faithfully record a poor decision. When uncertainty remains, document it rather than allowing a plausible-looking value to imply certainty. Corrections should not be selected because they improve a model fit, remove an extreme observation, or produce a preferred result. Those outcomes are not evidence of what was recorded or what occurred.

The policy should also distinguish a correction from a transformation. A correction addresses a source or transcription discrepancy with supporting evidence. A transformation is a defined operation used to create an analysis variable; it should be reproducible and described in the processing specification, while the input source remains preserved. Do not present a transformation as though it were a correction to the original record. This distinction keeps the meaning of the source value clear and makes each analysis step easier to review.

Key takeaway: Preserve what was received, make corrections in separate analysis fields, and record enough evidence and history for another reviewer to reconstruct and evaluate every change. When evidence does not support a unique correction, keep the issue unresolved rather than guessing.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A raw sample time is 14:10. A linked source form confirms 14:00. Name the fields and correction details that should be retained.
  2. Two correction events affect one field. What value should the second event identify as its prior value?
  3. A reviewer thinks an extreme concentration is probably a transcription error, but finds no supporting source evidence. Should the analysis value be changed?
  4. A corrected sample time changes elapsed time. What should happen to the derived elapsed-time field?

Solutions. (1) Keep 14:10 in the raw field and use 14:00 in the analysis field after approval. Log the prior and replacement values, specific reason, linked form as evidence, date, editor, reviewer, and dataset version. (2) The second event’s prior value must equal the replacement value produced by the first event; otherwise the sequence cannot be replayed consistently. (3) No. Preserve the raw value, document the concern, and seek evidence or apply the defined unresolved-data procedure. Plausibility alone does not establish the correct replacement. (4) Recompute elapsed time from the corrected analysis sample time and the appropriate dose time, then verify that the released derived field matches that calculation. Retain traceability to the inputs and processing version.

Clinical Biostats