Solutions Company Statit Training Home
 



Use of Time Data

There are many instances in healthcare where the data collected for a performance indicator is date, time or date/time. For the sake of simplicity in this discussion, the three possibilities will be referred to collectively as date/time. Analyzing date/time values or plotting dates and time on a control chart must be done with careful planning. Date/time values cannot be treated the same as any number. The main issue is that dates and time are not decimal numbers. Attempting to perform any type of mathematics on date/time values produces erroneous results unless they are used in a way that is consistent with other numeric values.

Statit has features that simplify the handling of date/time. For example, if the variable is defined as a time variable, then the data is stored and plotted correctly. The following data set is an example of this. This data is the time that hospice workers checked in at the start of the day. The first column of data is the actual time stamp of the check-in. The second column is the value that the computer uses for time calculations. For a time stamp, the computer translates it to the number of seconds elapsed from a standard value, which is midnight. The first row shows 36060 seconds since midnight. This is the number of seconds that have elapsed between midnight and 10:01 am. It is not necessary to display the seconds in Statit. It is done automatically for the user by defining the Check_In_Time column as a time variable.

Check-in Time Seconds
10:01:00 36060
09:42:00 34920
07:15:00 26100
07:35:00 27300
08:11:00 29460
07:59:00 28740
08:45:00 31500
10:34:00 38040
08:24:00 30240
08:19:00 29940
09:02:00 32520
08:01:00 28860
08:50:00 31800
07:55:00 28500
08:28:00 30480
09:02:00 32520
10:14:00 36840
09:21:00 33660
08:12:00 29520

Producing an i-chart on this data is very straight forward. Since the data are time stamps, it is appropriate to use variable charts. The measurement of time is a continuous or parametric value. Time is typically rounded to minutes or seconds for convenience. For our purposes, it is not necessary to work with a more precise measurement of time, but it is possible.

Selecting the Check_in_Time or Seconds columns will produce identical charts. The format in the Check_in_Time column is only for improving readability. The computer stores it as seconds. Therefore, it is plotted with the secondsí values. Notice that the data tips, however, can be controlled by changing the print format from the workspace so they display in a familiar format. (To view data tips, mouse over data points, summaries, or other hotlinks in the image.)

Java is not enabled in browser, data tips cannot work for this graph.

If dates and times are entered as character or string values, Statit will not recognize them as valid variables for numerical calculations. They can certainly be used along the X-axis, however. When selecting a data variable for the Y-axis, Statit will not include any text variables in the list of variables from which to choose. If this happens, it provides a clue that the data values are not of the proper type. Verify that the data is what you expect by right-clicking on the column header, choose print format from the menu, and check the Output Print Format Category Type. If the type that is highlighted by default is not what you expect, then the data must be converted. It is not sufficient to merely change the print format from this menu from text to date or text to numeric.

Another strategy for working with time is to use the difference of 2 times as the data variable. Frequently, this is a natural progression as in the examples of wait time and turn-around time. The resultant values for wait time or turn-around time can be expressed in whatever time units make sense, such as seconds, minutes, days etc. As long as the beginning and ending variables are valid dates, dates and times, or just times, the difference can be calculated within Statit. Once the time difference has been calculated and used in a chart, it is important to include the date/time units in the chart. This can easily be done by specifying the units in the appropriate axis label or putting it in the chart title or tag.

The following data illustrates how time differences can be charted. The first column is the date and time stamp of the receipt of the test by the lab. The second column is the date and time stamp at the completion of the analysis. These date values were read into the workspace as date variables. The compute/transform feature under the Edit menu, Edit>Compute>Compute/Transform, was invoked to subtract Received date values from the Completed date values. The results were put into a new variable, TotalTime.

Received Completed TotalTime
01-May-2005 06:01:00 01-May-2005 11:10:00 0.214583
01-May-2005 06:10:00 01-May-2005 10:50:00 0.194444
01-May-2005 07:14:00 01-May-2005 12:15:00 0.209028
01-May-2005 08:30:00 01-May-2005 13:42:00 0.216667
01-May-2005 10:13:00 03-May-2005 01:15:00 1.626389
01-May-2005 11:11:00 02-May-2005 08:00:00 0.867361
01-May-2005 12:14:00 01-May-2005 16:50:00 0.191667
01-May-2005 13:30:00 01-May-2005 20:20:00 0.284722
01-May-2005 14:40:00 02-May-2005 07:20:00 0.694444
01-May-2005 15:10:00 03-May-2005 10:30:00 1.805556
01-May-2005 16:35:00 02-May-2005 07:15:00 0.611111
01-May-2005 16:51:00 04-May-2005 09:30:00 2.69375
02-May-2005 07:05:00 02-May-2005 11:45:00 0.194444
02-May-2005 07:25:00 02-May-2005 13:12:00 0.240972
02-May-2005 07:51:00 03-May-2005 08:00:00 1.00625
02-May-2005 08:01:00 02-May-2005 21:15:00 0.551389
02-May-2005 08:25:00 02-May-2005 14:03:00 0.234722
02-May-2005 08:45:00 02-May-2005 12:01:00 0.136111
02-May-2005 09:20:00 02-May-2005 16:05:00 0.28125
02-May-2005 10:10:00 03-May-2005 16:30:00 1.263889
02-May-2005 11:01:00 04-May-2005 07:45:00 1.863889
02-May-2005 11:37:00 03-May-2005 09:00:00 0.890972
02-May-2005 13:27:00 02-May-2005 22:20:00 0.370139
02-May-2005 14:24:00 03-May-2005 10:17:00 0.828472
02-May-2005 16:10:00 03-May-2005 08:03:00 0.661806

An i-chart of TotalTime data produces the following chart:

Java is not enabled in browser, data tips cannot work for this graph.
To view data tips, mouse over data points, summaries, or other hotlinks in the image.

Hopefully, these examples will help provide guidance when working with dates and times. Since clock times, as we commonly use them, are not decimal numbers, it is important to allow the software to convert them to a form that can be accurately used for calculating the values necessary for reliable charts. Even though the results of date/time conversions may not be the same as the conventional formats to which we are accustomed, be aware of the importance of using them in this fashion.