Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › Reconstructing Analysis Timelines from Dosing and Covariate Records

Time-Varying Covariates and Dosing History · Tutorial 491 of 598

Reconstructing Analysis Timelines from Dosing and Covariate Records

Build a defensible PK/PD analysis timeline by distinguishing when an event occurred from when it was recorded, and by documenting unresolved timing ambiguity rather than inventing an order.

Advanced 10 min read

What You'll Learn

  • Convert timestamped records to a common time standard and a declared study-time origin.
  • Distinguish event time from data-entry or transmission time.
  • Order dose, sample, and covariate records without asserting unsupported within-time ordering.
  • Recognize how time-zone offsets and daylight-saving transitions affect elapsed time.
  • Audit a reconstructed timeline for missing, conflicting, or ambiguous timing information.

Why Timeline Reconstruction Matters

PK/PD analysis depends on the relationship between events: a concentration is interpreted in relation to dosing, and a covariate record is meaningful only with its measurement time. A timestamp copied directly from a source file may not represent the event time on the same clock as the other records. It may be a data-entry time, a local wall-clock time with an unstated offset, or a rounded time that cannot resolve event order. A timeline that silently mixes these meanings can give a mathematically tidy but scientifically wrong account of what happened.

The earlier material on representing covariate and dose histories as time-indexed processes establishes the idea that records are associated with times. Here the task is to reconstruct those times consistently from source records. The aim is not to fill in covariate values between measurements or to choose a dosing-history model. It is to establish which event happened when, what can be ordered, and what remains uncertain.

Definition: An event time is the time an event actually occurred, such as dose administration, specimen collection, or covariate measurement. A record time is when the event was entered, transmitted, or stored. A reconstructed analysis timeline maps event times to one common time scale, normally elapsed time from a declared study-time origin.

A Consistent Time Scale

For each record, retain the original timestamp and its source, identify what the timestamp denotes, and determine its time zone or UTC offset. Convert event timestamps to a common absolute time standard, typically UTC. Then calculate study-relative time from a specified origin, such as the protocol-defined first-dose time. Use one unit consistently in the analysis dataset, commonly hours, and preserve the original units and timestamps for traceability.

$$ t_j=\frac{T_j-T_0}{3600} $$

Here \(T_j\) and \(T_0\) are the event and origin instants expressed on the same absolute time scale in seconds, and \(t_j\) is elapsed study time in hours. The factor 3600 converts seconds to hours. This formula does not determine whether a source timestamp is an event time, nor does it resolve an unknown offset; those are data-definition questions that must be settled or flagged first.

A time zone is not merely a fixed label such as “local time.” The applicable UTC offset may vary by date because of daylight-saving rules. Whenever possible, use a timestamp with an explicit offset or a well-defined time-zone identifier and the relevant date. Convert the event instant first; do not apply a single offset to an entire study unless the records establish that it is correct throughout.

Key rule: Sort records by their reconstructed event times, not by the order in which rows appear or the times at which records were entered. Keep record time as a separate audit variable; it can help investigate discrepancies but is not a substitute for event time.

Worked Example: Elapsed Time Between a Dose and a Sample

Hypothetical records. A participant receives a dose at 09:10 and has a blood sample collected at 14:00 on the same date. Both times are confirmed to be local times from the same site and are on the same clock, so their common offset cancels when calculating the interval. The analysis origin is midnight at that site on that date.

Convert the times to decimal hours after the origin. The dose time is \(9+10/60=9.1667\) hours, and the sample time is 14 hours. Thus, the sample is later than the dose by:

$$ 14-\left(9+\frac{10}{60}\right)=14-9.1667=4.8333\text{ hours} $$

In minutes, the interval is \(4.8333\times60=290.0\) minutes. The reconstructed records therefore place the dose at 9.1667 hours and the sample at 14.000 hours, with the sample 4.833 hours (290 minutes) after dosing. This calculation is justified because the timestamps refer to actual events on the same date and the same clock; it would not be justified if either timestamp were a data-entry time or if the records used different, unharmonized time zones.

From Source Records to an Ordered Timeline

A defensible reconstruction separates three operations: establish what each timestamp means, harmonize the time scale, and then sort and interpret the events. Keep an audit trail linking each reconstructed row to its source record and any correction made. The procedure below is a practical ordering method, not a statistical model.

1
Classify the timestamp.
For each record, determine whether the time refers to administration, collection, measurement, entry, or another action. Do not treat a field named “date/time” as an event time without checking its definition.
2
Harmonize the clock.
Resolve the date, time zone, UTC offset, and daylight-saving status. Convert event instants to a common time standard while retaining the original source values.
3
Set the origin and units.
State the exact origin instant and convert each event to elapsed time, for example hours since the first protocol-defined dose. Use the same origin for all records being combined.
4
Order and flag.
Sort by event time within participant. Preserve ties as ties unless finer-resolution information establishes an order. Flag contradictions, missing times, and uncertain corrections for review.

The ordering key should include more than a numeric time when records may coincide. Retain event type, source, timestamp precision, and any documented phase such as predose or postdose. A deterministic row order is useful for software, but it is not evidence that one simultaneous event occurred before another.

Worked Example: Converting Site Time to Study Time

Hypothetical records. The analysis origin is 2026-04-12 08:00 UTC. A dose is recorded as administered at 11:15 on 2026-04-12 at a site using UTC+02:00; a sample is collected at 12:05 local time at the same site. Assume both are verified event times, with the stated offset applying to both.

Convert each event to UTC: the dose is 09:15 UTC and the sample is 10:05 UTC. Relative to the 08:00 UTC origin, the dose occurs 1 hour 15 minutes later, or \(1.25\) hours. The sample occurs 2 hours 5 minutes later, or \(2+5/60=2.0833\) hours. Their elapsed interval is:

$$ 2.0833-1.2500=0.8333\text{ hours} $$

This is \(0.8333\times60=50.00\) minutes. The harmonized timeline has the dose at 1.250 hours and the sample at 2.083 hours after the origin. Converting the local records to UTC before calculating study time prevents a two-hour clock offset from being mistaken for elapsed study time.

Delayed Entry and Simultaneous Records

Delayed data entry is common in source systems that are completed after a clinical action. Suppose the administration form says that a dose occurred at 08:00, but the record was entered at 12:20. If the event time is verified, the dose belongs at 08:00 on the analysis timeline; 12:20 is the record time. If only the entry time is available, it is not valid to assume that the dose occurred then. The event time is missing or uncertain and should be resolved from source documentation or represented as uncertain according to the analysis plan.

Simultaneous timestamps require equally careful treatment. A dose and blood draw may both be recorded as 08:00 because timestamps are rounded to the nearest minute. The records alone do not establish which came first. If source documentation confirms that the specimen was collected before dosing, retain the shared timestamp and record the predose phase. If the order is not known, flag the ambiguity; do not create a difference such as one second simply to force an ordering. This distinction can matter because a specimen labeled predose and one collected after administration have different relationships to that dose.

When two events share an exact time but their order is known from an independent source, retain that evidence, for example a documented sequence number or an explicitly recorded predose/postdose status. If no such evidence exists, represent them as tied. Sorting algorithms may display one row first, but the display order must not be interpreted as a clinical sequence.

Worked Example: Separating Event Time From Entry Time

Hypothetical records. A dose administration is documented as occurring at 08:00 and entered into the system at 12:20. A sample is collected at 08:00, with the collection record also entered later. The administration and collection times are reported only to the nearest minute.

The timeline first places both records at 08:00 because those are their documented event times. The 12:20 dose entry time is retained separately and does not move the dose to 12:20. Since the dose and sample have the same recorded event time and no finer time or sequencing evidence is supplied, their relative order is unresolved. The correct reconstruction is a tied timestamp with an ambiguity flag, not a claim that the sample was predose or postdose.

If a contemporaneous source form subsequently confirms that blood was drawn before administration, the event times may still remain 08:00 at the available precision, but the sample can be identified as predose. If that confirmation is absent, any analysis requiring a definitive predose/postdose classification must treat the ordering as uncertain and document how the uncertainty is handled.

Daylight-Saving Changes and Ambiguous Local Times

During a daylight-saving transition, a local clock time may occur twice when clocks move backward, or not occur at all when clocks move forward. A date and local time without an offset may therefore fail to identify a unique instant. For example, at a hypothetical site that moves from UTC−04:00 to UTC−05:00, the local time 01:30 on the transition date can correspond either to 05:30 UTC or to 06:30 UTC. Those instants are one hour apart.

Worked Example: An Ambiguous Clock Time at a Fall-Back Transition

Hypothetical records. Two records from the transition date show local time 01:30, but one has an explicit UTC−04:00 offset and the other has UTC−05:00. The first corresponds to 05:30 UTC; the second corresponds to 06:30 UTC. Therefore, the second event occurred one hour after the first, even though both display the same wall-clock time.

If the offsets are missing, the local string “01:30” alone cannot establish which instant applies. A source such as a device log, site time-zone metadata, or a documented sequence may resolve it. Otherwise, preserve the ambiguity and avoid assigning a unique study time. A fixed, assumed offset would choose one of two possible instants without evidence.

Justification and Quality Checks

A useful property of this reconstruction is that elapsed intervals do not depend on the chosen origin, provided both event times use the same absolute time scale. For two events with absolute times \(T_a\) and \(T_b\), their study-relative times are \(t_a=(T_a-T_0)/3600\) and \(t_b=(T_b-T_0)/3600\). Subtracting gives:

$$ t_b-t_a=\frac{T_b-T_0}{3600}-\frac{T_a-T_0}{3600} =\frac{T_b-T_a}{3600} $$

The origin cancels, so the interval between events is preserved. This justification depends on using the same absolute clock for both events. Subtracting unharmonized local times across different offsets or across an unresolved daylight-saving transition does not satisfy that condition.

After reconstruction, review each participant’s records for negative or implausible elapsed times, doses apparently occurring after samples that are documented as predose, duplicate or conflicting event times, missing offsets, and large differences between event and entry times. These are prompts for source review, not automatic proof of error. Check that the origin is consistently defined and that time units have not been mixed. Retain a record of the source values, conversion rules, corrections, and unresolved issues so another analyst can reproduce the timeline.

A timeline is not necessarily a complete account of the underlying events. Rounded times limit temporal resolution; missing event times remain missing; and a timestamp may be wrong even after a correct time-zone conversion. When the source cannot resolve ambiguity, report it and assess whether conclusions depend on a particular ordering rather than silently imposing one.

Common Mistakes and Alternatives

Approach or mistakeWhy it is problematicBetter practice
Sorting by row order or data-entry timeRows may be entered late or exported in an arbitrary sequence.Sort by verified event time; retain entry time separately.
Subtracting displayed local times across sitesDifferent offsets can distort the interval.Convert both instants to a common time standard first.
Forcing an order for tied recordsA software sort order does not establish clinical sequence.Keep the tie and use explicit phase or sequence evidence if available.
Assuming one fixed offset throughout a studyDaylight-saving changes can alter the applicable offset.Use date-specific offsets or a validated time-zone identifier.

The main alternative to record-by-record harmonization is to use a pre-harmonized study-time field produced by a validated source system. That can be efficient, but it is defensible only if the origin, time-zone rules, event-time definitions, and handling of ties are documented and verified. Direct reconstruction from source records offers transparency but requires careful metadata review. Neither approach can recover event order when the source records lack enough information; that limitation should be explicit.

Key takeaway: A defensible PK/PD timeline is based on verified event times, converted to a shared time scale and a declared origin. Record time, event time, and event order are distinct pieces of information; preserve each, and flag what cannot be resolved.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A dose occurred at 07:45 and a sample at 11:15 on the same confirmed local clock and date. How many hours after the dose was the sample?
  2. A dose time is documented as 09:00, but the administration record was entered at 13:30. Which time belongs on the event timeline, and what should be retained separately?
  3. A dose and specimen collection both have the timestamp 10:00, rounded to the nearest minute, with no sequencing evidence. What can be concluded about their order?
  4. Why is a local time of 01:30 on a fall-back daylight-saving date insufficient by itself to identify an instant?

Solutions. (1) \(11{:}15-07{:}45=3\) hours 30 minutes, so the sample is \(3.500\) hours after the dose. (2) Use 09:00 as the documented event time and retain 13:30 as the record-entry time; do not substitute one for the other. (3) The records are tied at the available precision, so the order is unresolved unless additional evidence establishes it. (4) The clock time may occur twice under different UTC offsets, corresponding to two distinct instants; the applicable offset or other source evidence is needed to distinguish them.

Clinical Biostats