How to best visualize or capture time interval between lab measurements? I have a table like as shown below
subject_id   lab_test_id    lab_test_date       value    difference

&quot;10005606&quot;  &quot;20364112&quot;  &quot;2143-12-06 02:32:00&quot;   &quot;1.3&quot;   &quot;13:10:00&quot;
&quot;10005606&quot;  &quot;20364112&quot;  &quot;2143-12-06 15:42:00&quot;   &quot;1.3&quot;   &quot;02:02:00&quot;
&quot;10005606&quot;  &quot;20364112&quot;  &quot;2143-12-06 17:44:00&quot;   &quot;1.3&quot;   &quot;10:11:00&quot;
&quot;10005606&quot;  &quot;20364112&quot;  &quot;2143-12-07 03:55:00&quot;   &quot;1.3&quot;      NULL
&quot;10005866&quot;  &quot;20364112&quot;  &quot;2149-10-01 19:30:00&quot;   &quot;2.1&quot;   &quot;07:42:00&quot;
&quot;10005866&quot;  &quot;20364112&quot;  &quot;2149-10-02 03:12:00&quot;   &quot;2.2&quot;   &quot;08:51:00&quot;
&quot;10005866&quot;  &quot;20364112&quot;  &quot;2149-10-02 12:03:00&quot;   &quot;2.1&quot;   &quot;04:59:00&quot;
&quot;10005866&quot;  &quot;20364112&quot;  &quot;2149-10-02 17:02:00&quot;   &quot;1.6&quot;     NULL

the difference column indicates the time difference between each of the lab tests
Now, the doctor likes to know how often these measurements are done for each patient?
How can I best convey this information? Should I capture the average difference between lab tests?
For example, for patient = 10005606, it is 8 hours. Meaning adding all different values and divide by total number of records. 25 hours, 30 mins (approx)/3 records = 8 hours approx
Is there any other better way to represent this using median or any other measure etc?
Can guide me with this?
The average or median seem reasonable here. A boxplot might be a good choice of visualistion:

The y-axis could be your time dimension, and boxplot shows the normal distributions of differences, including the median value and outliers. You could then compare certain measurements against this. But it would of course depend on if you have enough data in your sample to represent the total population.
Or simply calculate the standard deviation of differences, and report this with your median (the mean value may be warped by outliers).