Tutorials › Optimal Design and Model-Informed Dosing › Aligning Doses, Samples, and Clinical Events in Time

Model-Informed Precision Dosing in Practice · Tutorial 361 of 497

Aligning Doses, Samples, and Clinical Events in Time

You will learn to construct model-ready timelines that preserve when clinical events occurred, not merely when they were recorded.

Advanced 10 min read

What You'll Learn

  • Distinguish event time, documentation time, and data-ingestion time.
  • Convert timestamps with explicit UTC offsets to a common time scale.
  • Calculate elapsed time from administrations to concentration samples.
  • Handle daylight-saving ambiguity, date-only values, and timestamp precision.
  • Decide which timestamp represents a dose, sample, or clinical covariate.
  • Identify alignment errors that can distort longitudinal model inputs.

Why a Clinical Timeline Must Represent Events

A dosing model uses the timing of events to interpret exposure and response. A concentration collected three hours after a dose is not equivalent to one collected ten hours after it, even if both results are entered into the record at the same time. Similarly, a laboratory result may be released after a dose was administered even though its specimen was collected before that dose. The important task is to reconstruct when the underlying clinical events occurred and express their timing consistently.

A timestamp can refer to several different things: the time a dose was administered, the time an order was placed, the time a specimen was collected, the time a result was verified, or the time a record was transmitted to another system. Treating these as interchangeable can reverse event order or change a calculated dose-to-sample interval. Time-zone conventions introduce another source of error: two systems can display different local clock times for the same instant, or identical clock readings for different instants.

Definition: Event time is the time at which a clinical event occurred, such as dose administration, specimen collection, or measurement of a covariate. Documentation time is when that event was recorded or entered. Ingestion time is when a receiving system obtained the record. They may coincide, but must not be assumed to do so. A time zone specifies how a local civil time relates to a shared time scale; an explicit UTC offset states that relation for a particular timestamp.

Representing Events on a Shared Time Scale

A model-ready timeline needs a consistent reference for comparing events. A common approach is to convert each timestamp that identifies a unique instant to UTC (Coordinated Universal Time), while retaining the original timestamp, its offset or time-zone identifier, and its source for traceability. UTC is a comparison scale, not a claim that the clinical event occurred at a location in the UTC time zone.

For arithmetic, represent a local timestamp as a number of minutes or seconds from an agreed origin. Let \(t_{\mathrm{local}}\) be the local clock time and let \(o\) be the UTC offset in minutes, signed as local time minus UTC. Then the UTC time is obtained by subtracting that signed offset. For example, an offset of \(-300\) minutes means local time is five hours behind UTC.

$$ t_{\mathrm{UTC}} = t_{\mathrm{local}} - o $$

Once the relevant event times are on the same scale, the elapsed time from an administration to a sample is the sample time minus the administration time. If both times are represented in minutes, the result is in minutes; dividing by 60 converts it to hours. This elapsed time is a model input when the model requires time since dose. For repeated administrations, the relevant dose history and the model’s dosing convention determine which intervals are needed.

Worked Example: Calculating Time Since a Dose Across Time Zones

In a hypothetical record, a dose was administered at 06:00 local time in a location using UTC−05:00. A concentration specimen was collected at 09:10 local time in the same location. The dose was documented at 06:18, and the specimen record was entered at 09:25. Calculate the time from administration to specimen collection.

Assumptions. The administration and collection timestamps refer to the actual events, both carry the correct UTC offset, and the clocks are sufficiently synchronized for the intended model. Documentation and entry times are not being used as event times.

The dose time converts to \(06{:}00 - (-05{:}00)=11{:}00\) UTC. The collection time converts to \(09{:}10 - (-05{:}00)=14{:}10\) UTC. Therefore:

$$ 14{:}10 - 11{:}00 = 3\text{ h }10\text{ min} $$

Equivalently, \(3 + 10/60 = 3.167\) hours. The specimen was collected about 3.17 hours after the dose. Using the documentation times instead would give \(09{:}25-06{:}18=3\) hours 7 minutes, which answers a different question and is not the event interval.

Use the Timestamp That Matches the Clinical Meaning

The appropriate event time depends on what the record describes. For an administered dose, use the time the dose was actually given, not the order time, scheduled time, or time the administration record was signed. For a concentration, use specimen collection time, not laboratory receipt, analysis, verification, or result-release time. For a covariate, use the time the underlying measurement pertains to: for example, the time blood was drawn for a laboratory value or the time a weight was measured.

Some events have a duration rather than a single instant. An infusion is naturally represented by a start and stop time, together with the delivered amount and rate information available to the model. A dose entry that records only a date or a scheduled time may not establish when administration occurred. Do not silently substitute another timestamp; preserve what is known and make the limitation explicit.

A covariate also needs a clinically meaningful temporal interpretation. A creatinine value belongs to its specimen-collection time, not automatically to the time it became visible in the record. A covariate may be treated as constant over a period only if that modeling convention is appropriate for the use case; timestamp alignment alone does not establish that a value remains valid indefinitely.

Worked Example: A Result Posted After a Dose

In a hypothetical inpatient record, a blood specimen for a covariate is collected at 08:00 UTC. A dose is administered at 08:30 UTC. The laboratory result is verified and released at 11:00 UTC. Determine the event order relevant to a model that uses the measured covariate and dose time.

Assumptions. All timestamps are already expressed in UTC, the collection time is the time the covariate was measured, and the dose time is the actual administration time. The result is the value from that specimen.

The specimen precedes the dose by \(08{:}30-08{:}00=30\) minutes. The result-release timestamp follows the dose by \(11{:}00-08{:}30=2\) hours 30 minutes. For event alignment, the measured covariate is associated with 08:00, so it was measured before the dose. Using 11:00 as if it were the measurement time would incorrectly place the covariate after the dose. The release time can still be useful operationally, but it does not replace the event time in the clinical timeline.

Daylight-Saving Changes and Imprecise Times

A local clock reading is not always enough to identify an instant. When clocks move backward at the end of daylight-saving time, a local time such as 01:30 can occur twice, with different UTC offsets. When clocks move forward, some local times do not occur at all. A time-zone name and event date can help determine the applicable offset, but only if the location and time-zone rules are known and correctly applied. If the record gives neither an offset nor enough information to resolve an ambiguous time, the instant may not be recoverable from that timestamp alone.

For an ambiguous time, preserve both plausible interpretations until another source resolves the event—for example, an explicit offset, a device timestamp, or a reliable sequence of surrounding events. Do not choose whichever interpretation makes the timeline appear more convenient. A nonexistent local time may indicate a transcription error, an incorrect zone, or a system conversion issue and requires clarification rather than an invented UTC time.

Worked Example: An Ambiguous Clock Reading at the DST Change

In a hypothetical location, clocks move from UTC−04:00 to UTC−05:00 on the same date. A dose is recorded at 00:45 while UTC−04:00 applies. A sample is recorded as 01:30 without an offset, and that local clock reading occurs both before and after the clock change. Find the possible dose-to-sample intervals.

Assumptions. The dose offset is known to be UTC−04:00, both interpretations of the sample’s local time are possible, and the recorded clock times refer to the actual events.

The dose time is \(00{:}45-(-04{:}00)=04{:}45\) UTC. If the sample’s 01:30 reading is the first occurrence, its offset is UTC−04:00, giving \(05{:}30\) UTC. The interval is \(05{:}30-04{:}45=45\) minutes. If it is the second occurrence, the offset is UTC−05:00, giving \(06{:}30\) UTC. The interval is \(06{:}30-04{:}45=105\) minutes, or 1 hour 45 minutes. The timestamp alone therefore does not determine a unique interval. A system must retain this ambiguity or obtain information that resolves it.

Timestamp precision also limits what can be concluded. If an administration is recorded only to the nearest hour, reporting a dose-to-sample interval to the nearest minute suggests more certainty than the data support. A date-only value identifies a calendar date, not a unique time of day. Where an exact time cannot be established, represent the uncertainty or coarseness explicitly; do not fill in midnight or another conventional time as though it were observed.

Deriving and Checking Elapsed Time

The subtraction used for elapsed time is valid when both event times identify instants on a common, consistently interpreted time scale. To see why a shared offset matters, suppose local times \(L_1\) and \(L_2\) are recorded with the same UTC offset \(o\). Their UTC representations are \(L_1-o\) and \(L_2-o\). Subtracting gives:

$$ (L_2-o)-(L_1-o)=L_2-L_1 $$

Thus, for two events in the same correctly identified offset period, their local clock difference equals their elapsed time. But across a time-zone or daylight-saving offset change, the offsets can differ. If event 1 has offset \(o_1\) and event 2 has offset \(o_2\), then:

$$ (L_2-o_2)-(L_1-o_1)=(L_2-L_1)+(o_1-o_2) $$

The extra offset term explains why naive subtraction of local clock readings can be wrong across a clock change. Converting each event using its own applicable offset handles this change, provided those offsets are known and correctly assigned.

A practical alignment process is:

1
Identify the event represented.
Distinguish administration, specimen collection, covariate measurement, documentation, and ingestion times.
2
Establish the timestamp convention.
Determine whether the value is UTC, includes an explicit offset, or is a local civil time tied to a known location and date.
3
Convert and retain provenance.
Convert resolvable instants to a common scale while retaining original values, offsets, and source information.
4
Calculate the model-relevant interval.
Subtract event times on the common scale and express the result in the units expected by the model.
5
Inspect chronology and precision.
Check for implausible ordering, unresolved ambiguity, and output precision finer than the recorded event times support.

Diagnostics, Alternatives, and Limitations

Useful diagnostics include checking whether samples appear before or after the administrations that are supposed to inform them, whether repeated event intervals are plausible, and whether timestamp patterns cluster around timezone or daylight-saving boundaries. Compare event time with documentation and ingestion times to identify systematic delays, but do not use those delays as a correction unless their meaning and reliability have been established. Check that conversions preserve event ordering where expected and that the same instant from two systems maps to the same common time.

The main alternative is to sort or calculate intervals directly from raw local timestamps. This can be acceptable when values are known to share the same offset and unambiguous event semantics; the derivation above shows why a common offset cancels. It is unsafe as a general strategy across locations, offset changes, or records with unspecified zones. Converting each known instant to UTC is more robust for comparisons, though it cannot recover information absent from the source.

For uncertain or coarse timestamps, a single point estimate can imply false precision. A more faithful representation may be a time interval, such as “sometime on this date,” or one of multiple possible instants. Whether a particular model can use interval-valued timing is a modeling question; ordinary dose-to-sample calculations require a resolved event time. If it is not resolvable, flag the limitation rather than quietly choosing an assumed instant.

Common failure modes include treating an order as an administered dose, using result-release time for specimen collection, assuming every timestamp is UTC, ignoring duplicated local times during a clock change, and assigning midnight to date-only records. These mistakes can alter the apparent time since dose and thus change the interpretation of a concentration or covariate. Timestamp alignment supports correct model inputs; it does not by itself establish that a dose was correctly documented, that a covariate is clinically appropriate, or that the model is suitable for a patient.

Key takeaway: Align clinical records by the time the underlying event occurred. Convert uniquely identified instants to a shared time scale, retain the source and original time-zone information, and preserve ambiguity or limited precision when the data do not identify an exact instant.

Check Your Understanding

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

  1. A sample is collected at 10:00 local time and its result is released at 13:00. Which timestamp represents the sample event for dose-to-sample timing, and why?
  2. A dose is given at 15:00 UTC−04:00 and a sample is collected at 19:30 UTC−04:00. Calculate the elapsed time.
  3. A local time occurs twice during a daylight-saving clock change, and no offset is recorded. Can one exact elapsed time be calculated from that time alone?
  4. Explain why a date-only administration record should not automatically be converted to midnight.
  5. Two local timestamps use the same known UTC offset. Show why subtracting their local clock times gives the same interval as converting both to UTC first.

Solutions. (1) Use 10:00, the collection time; 13:00 is result-release time and does not identify when the specimen was collected. (2) Both timestamps have the same offset, so it cancels: \(19{:}30-15{:}00=4\) hours 30 minutes. (3) No. The duplicated local time can map to two UTC instants, so the event needs an offset or other resolving information. (4) A date does not specify a time of day; midnight would add an assumption that was not observed. (5) If the local times are \(L_1,L_2\) and their shared offset is \(o\), then \((L_2-o)-(L_1-o)=L_2-L_1\).

Clinical Biostats