14.4.1 Introduction to Partial Dates in OpenClinica

When creating an eCRF, you may want to create an item to capture a date: date of birth, date an event occurred, or date of informed consent. In OpenClinica, you can capture a date by defining an item using either the Date data type or the PDate data type.

If you define an item as a Date in the CRF Excel template, the OpenClinica user interface will accept a date in the format DD-MMM-YYYY during data entry. In this format, DD represents two integers for the day, MMM represents the three letter abbreviation for the month, and YYYY represents four integers for the year:

Full dates in OpenClinica

Another option is to define your item in the CRF Excel template as a PDate, or partial date. If an item is defined as a PDate, the OpenClininica user interface will accept any of the following date formats during data entry:

  • A Full Date (example: 03-Aug-2015)

A full date in OpenClinica

  • Month and Year Only (example: Aug-2015)

Month and Year Only

  • Year Only (example: 2015)

Year Only

 

If you are collecting a concrete date, such as the date that the patient provided informed consent, then you would likely want to define the item as a Date in the CRF Excel template.

Alternatively, you may want to provide the option to collect a full date or an incomplete date, such as the date that a patient began taking a particular medication. In this case, you could define the item as a Pdate because the date a patient began taking a medication may not be known in full. Instead, a patient may just recall that they began taking the medication sometime in June of 2010, which can be collected as a partial date. 

Example medication log

14.4.2 Extracting Partial Dates in Data Mart

Once data has been entered into the eCRFs, OpenClinica offers a variety of different extract types from Excel and HTML to CDISC ODM XML. In these extracts, OpenClinica uses the ISO 8601 standard date format to represent dates and partial dates. The ISO 8601 standard date format is a string with the year, month, and day, separated with a – (i.e. 2015-08-15).

One particular extract type, Data Mart, is available with an OpenClinica Enterprise subscription (or Community Data Mart, which is available here thanks to community user Lindsay Stevens!).

If you are new to Data Mart, there may be a few things that are unfamiliar to you. In particular, PDates extract in a different format in Data Mart than they do in other OpenClinica extract formats.

PDates in Data Mart extract as a range of dates. This range of dates is specified using a minimum and a maximum value. Therefore, for one PDate data field in Data Mart, two columns are generated:

{PDate Item Name}_min
{PDate Item Name}_max

Minimum and maximum columns in Data Mart

 

 

For example, lets say you have a PDate item in your CRF with an Item_Name of STARTDATE. When you run a Data Mart extract, the following columns will be generated in Data Mart to account for this item:

startdate_min
startdate _max

As mentioned above, if an item is defined as a PDate, the following would be accepted by the system during data entry:

 – A Full Date (example: 12-Jan-2015)
 – Month and Year Only (example: Jan-2015)
 – Year Only (example: 2015)

Each of the above options would extract in Data Mart as follows:

1. If a full date, such as 12-Jan-2015, is entered during data entry, then the following would be extracted in Data Mart:

 – in the {PDate Item Name}_min column the value would be the full date: “2015-01-12”
 – in the {PDate Item Name}_max column the value would be the full date: “2015-01-12”

In this case, the {PDate Item Name}_min and {PDate Item Name}_max values are the same because the full date was provided.

Full Date in Data Mart

 

2) If only the month and year, such as Jan-2015, is entered during data entry, then the following would be extracted in Data Mart:

 – in the {PDate Item Name}_min column the value would be the first day of the month: “2015-01-01”
 – in the {PDate Item Name}_max column the value would be the last day of the month: “2015-01-31”

The event could have occurred on any date within the provided month. This means that the date could fall between the first day of the month, 01-Jan-2015, and the last day of the month, 31-Jan-2015.

 Data Mart Month and Year Only

3) Lastly, if only the year, such as 2015, was provided during data entry, then the event could have occurred on any day in any month of the provided year. The values would therefore extract as follows:

 – in the {PDate Item Name}_min column the value would be the first day of the year: “2015-01-01”
 – in the {PDate Item Name}_max column the value would be the last day of the year: “2015-12-31”

The date could have occurred at any point between the first day of the year, 01-Jan-2015, and the last day of the year, 31-Dec-2015.

Data Mart Year Only

 

To learn more about PDates and/or Data Mart, please visit the following resources: 

OpenClinica Enterprise Data Mart Guide

Community Data Mart

Date Formats in OpenClinica