Why Represent Doses as Events?
A dosing instruction describes what is intended; a dosing history describes what was recorded as administered. Those are different kinds of information. If a dose planned for 08:00 is instead given at 09:30, replacing the recorded time with 08:00 changes the history. Repeatedly using nominal times can therefore misrepresent the timing of drug input, especially when administrations are delayed or unevenly spaced.
For pharmacometric data, the basic unit is an individual administration event. An event record keeps the time, amount, route, and—when applicable—the duration together. This makes the observed history explicit before it is used with a pharmacokinetic model. The record itself does not determine how a model updates its internal drug amounts; it supplies the dosing information needed for that later step.
Fields in an Event-Based Record
A useful event table has one row per administration, rather than one row per planned dosing occasion. At minimum, retain an individual identifier, a drug or treatment identifier when needed, the administration timestamp, the amount, and the route. Record duration when it describes how long that administration was delivered, as with an infusion. Use consistent units and make the meaning of each time field explicit.
- Actual time: Record the administration time supported by the source data, not the intended time. Retain date and time, and document the time zone or other time convention when relevant.
- Amount: Store the amount administered with a clear unit, such as milligrams. Do not substitute a prescribed amount when the administered amount is known to differ.
- Route: Identify how the drug was administered, such as oral or intravenous. Route is not safely inferred from amount or timing alone.
- Duration: Record delivery duration when meaningful for the administration, especially for an infusion. An oral dose may have no administration duration recorded; that is different from claiming its duration was zero.
- Provenance: Preserve enough source or status information to distinguish an administration record from an order or planned schedule. If the actual time or amount is uncertain, do not make it appear exact by silently replacing or rounding it.
For a constant-rate infusion, amount and duration together determine an average delivery rate. If \(A\) is the administered amount and \(T\) is the infusion duration, then \(R=A/T\), with units such as mg/h when \(A\) is in mg and \(T\) is in hours. This calculation applies only when the amount and duration refer to that infusion and the rate is intended to be constant. It does not turn an oral dose into an infusion or describe drug absorption.
Worked Example: A Delayed Dose Compared With Its Schedule
Suppose a hypothetical patient is prescribed 100 mg orally every 12 hours, starting January 3 at 08:00. The event source records oral administrations at January 3, 08:00; January 3, 21:30; and January 4, 09:00. Use January 3 at 08:00 as the time origin. Represent the administrations and compare them with the nominal schedule.
The elapsed time is the recorded timestamp minus the time origin. The nominal times are 08:00, 20:00, and 08:00 on the following day, corresponding to 0, 12, and 24 hours after the origin. The event table is:
| Event | Recorded administration time | Elapsed time | Amount | Route | Duration |
|---|---|---|---|---|---|
| 1 | Jan 3, 08:00 | 0 h | 100 mg | Oral | Not recorded |
| 2 | Jan 3, 21:30 | 13.5 h | 100 mg | Oral | Not recorded |
| 3 | Jan 4, 09:00 | 25 h | 100 mg | Oral | Not recorded |
For event 2, the recorded time is 13.5 h after the origin, whereas its nominal time is 12 h. Its delay relative to that planned time is \(13.5-12=1.5\) h. For event 3, the recorded time is 25 h and the nominal time is 24 h, so its delay is \(25-24=1\) h. The elapsed intervals between recorded events are \(13.5-0=13.5\) h and \(25-13.5=11.5\) h. Thus, the administrations are not exactly 12 hours apart. The event table preserves those recorded times rather than replacing them with the nominal times.
The schedule states an intended amount and interval; the event records state the observed administrations. The example does not establish whether any unrecorded scheduled dose was missed. That conclusion requires information beyond the three administration records.
Time Origins and a Short Justification
Models commonly use elapsed time rather than a calendar timestamp. Choose and document a reference time \(t_0\), then convert each administration timestamp \(T_{ij}\) for individual \(i\), event \(j\), into elapsed time \(t_{ij}\). The same origin convention must be used for the records that will be aligned with that individual's dosing history.
This conversion is a change of time coordinate, not a change to the dose history. For any two events for the same individual, subtracting the same origin preserves their separation:
Therefore, a consistent origin changes the numerical labels on the time axis but does not change the interval between administrations. A wrong or inconsistent origin can still misalign records with observations, so the reference must be stated and applied consistently. When an infusion has a recorded start time \(T_{ij}\) and duration \(D_{ij}\), its recorded end time can be represented as \(T_{ij}+D_{ij}\); that arithmetic is only meaningful when the duration unit and timestamp convention agree.
Worked Example: Encoding Unevenly Spaced Infusions
In a hypothetical record, an individual receives two intravenous infusions. The first begins at 06:00 on May 10 and delivers 600 mg over 2 hours. The second begins at 18:00 on May 11 and delivers 450 mg over 1.5 hours. Let May 10 at 06:00 be the time origin. Find the elapsed start times, the end times, and the average rates if delivery is constant.
The first infusion begins at the origin, so its elapsed start time is \(0\) h. Its end time is 08:00 on May 10, and its average rate is \(600\text{ mg}/2\text{ h}=300\text{ mg/h}\).
From May 10 at 06:00 to May 11 at 06:00 is 24 hours, and from 06:00 to 18:00 is another 12 hours. Therefore, the second infusion starts \(24+12=36\) h after the origin. Its end time is 19:30 on May 11, and its average rate is \(450\text{ mg}/1.5\text{ h}=300\text{ mg/h}\).
| Event | Elapsed start time | Amount | Route | Duration | End time | Average rate |
|---|---|---|---|---|---|---|
| 1 | 0 h | 600 mg | Intravenous | 2 h | May 10, 08:00 | 300 mg/h |
| 2 | 36 h | 450 mg | Intravenous | 1.5 h | May 11, 19:30 | 300 mg/h |
The starts are 36 hours apart, not 12 or 24 hours apart. Both recorded rates happen to equal 300 mg/h, but that does not make the events interchangeable: their amounts, durations, and times remain distinct. The rate calculations rely on the stated infusion durations and constant-delivery assumption.
From Source Records to Model-Ready Events
Event encoding is a data-structuring task: preserve the administration facts in a form that can be checked and linked to the correct individual. A reliable transformation does not create events merely to fill gaps in a nominal schedule, and it does not overwrite recorded values with a protocol target. If a source includes both an order time and an administration time, label them as different fields rather than treating them as equivalent.
Determine which source entries document an administration and which describe an order, plan, or other status. Do not treat a planned dose as an administered event.
For each administration, link its actual time, amount, route, and applicable duration to the individual. Keep units explicit.
Convert timestamps to elapsed time using the documented reference. Check date changes, time zones, and units before using the converted values.
Review event counts, timestamps, amounts, routes, and durations against the source. Investigate inconsistencies rather than repairing them by assumption.
Diagnostics begin with simple comparisons. Check that amounts have plausible units and are not accidentally entered in a different unit; verify that infusion durations are positive and have units compatible with the timestamps; and inspect elapsed times for unexpected negative values or implausible gaps. Compare a sample of transformed rows with the source records. Where a schedule is available, differences between planned and recorded times can reveal delays or data-entry issues, but they do not by themselves identify why a difference occurred.
Repeated identical timestamps may be genuine, or may reflect rounding or loss of time precision. Conversely, a timestamp that appears out of sequence may indicate an error, a different time zone, or a legitimate record that needs investigation. Do not silently sort away evidence of a data problem or force event times onto a regular interval. A record's precision should not exceed the precision supported by its source.
Alternative Representations and Their Limits
| Representation | What it preserves | Main limitation |
|---|---|---|
| Event-level records | Each administration's time, amount, route, and relevant duration | Requires accurate source records and careful event-level data management |
| Nominal schedule | The intended regimen, such as amount and planned interval | Cannot establish when or whether each administration actually occurred |
| Cumulative amount over a period | A summary of total recorded amount within a specified window | Does not preserve the timing, spacing, route, or duration of individual events |
A schedule can be useful as a reference for comparing intent with records, but it should not replace event history when actual timing matters. A cumulative total can answer a question about total amount within a defined period, but different event patterns can have the same total. Event-level encoding retains more detail, at the cost of requiring well-documented source data and additional data checks.
No representation can recover information that was never collected. If the source does not establish an actual administration time or amount, event encoding cannot make that value known. Preserve uncertainty or missing information transparently; do not manufacture an exact event from the nominal schedule alone.
Common Mistakes
- Replacing actual times with planned times. A regimen may specify regular intervals, but an administration recorded later should retain its recorded time.
- Treating every planned dose as an event. A schedule is not proof of administration. Event records should be supported by administration information.
- Dropping route or duration. Amount and time alone may not describe how a dose was delivered. Retain route and relevant administration duration.
- Using a duration of zero to mean “not recorded.” Zero and unavailable are different data values. Use a documented missing-value convention when duration does not apply or is unknown.
- Assuming a regular interval from the first dose. Compute intervals from the recorded timestamps; do not impose the nominal spacing on an irregular history.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A dose is planned for 14:00 but the administration record gives 15:20. Which time belongs in the event record, and what additional time information could be retained for comparison?
- An intravenous infusion delivers 240 mg over 0.8 hours at a constant rate. What is its average rate?
- Two oral administrations are recorded at elapsed times 0 h and 17 h. A nominal schedule says every 12 hours. What interval is represented by the event records?
- Why can a cumulative total of 500 mg fail to represent a dosing history completely?
- A dose order lists 100 mg, but no administration record is available. Is this sufficient to create a confirmed 100 mg administration event? Explain.
Solutions. (1) Record 15:20 as the administration time. The planned time, 14:00, may be retained separately as schedule information; the recorded administration was 1 hour 20 minutes later. (2) \(240\text{ mg}/0.8\text{ h}=300\text{ mg/h}\). (3) The recorded interval is \(17-0=17\) h; the 12-hour schedule does not change that observed interval. (4) A total does not show when amounts were given, how they were spaced, or the route and duration of each event; different event histories can have the same total. (5) No. The order describes an intended dose, not confirmed administration. An administration event requires supporting information that it was given.