Summary

This article explains how to create a partial date question.  

Table of Contents


There may be times during a clinical trial where the patient is asked to provide information about the date of a particular event, and they are unsure of the exact date. Medical history is a prime example. In these situations, a “Partial Date” question may be used. This allows the user to enter a date (or time) like normal, but gives them the option to list part or all of the date (or time) as unknown.

The primary benefit of Partial Dates is that they allow date/time comparisons to be run on the data, whereas simply storing the data as text fields would not allow this.

Concepts Covered

This tutorial covers the following topics:

  • Adding Partial Dates and Times
  • Configuring Date Formats
  • Specifying Invalid Format Alerts

Step 1: Create a Partial Date Question

You will change the Adverse Event Start and Stop dates from the previous tutorial into Partial Dates. Partial Dates are created just like any other question in eClinical, and have both a Data Type and Display Type of “PartialDate”.

To begin, go to the Question Types worksheet and find the “aestdtc” and “aeendtc” questionTypeIds. Change the Data Type and Display Type for each of these to “PartialDate”.

Step 2: Configure the Date Format

The Date Format for a Partial Date is very similar to a regular Date question, except that the code for the unknown value has to be specified in square brackets behind the date format code for the field. This will be what the user enters instead of the unknown day, month, and/or year. Note that you can choose to make only the day an unknown field, or both the day and month but not the year.

For this tutorial, you will use a Date Format of “dd[UNK]-MMM[UNK]-yyyy[UNK]“. All three fields will be allowed to be unknown.


Note: When an unknown value is allowed for a field, then all lower level fields need to allow an unknown value too. This means that if the month has an unknown format, then the day must as well. If the year has a specified unknown format, then all three fields must have one.

Valid entries include: 01-May-2009, UNK-May-2009, UNK-UNK-2009, UNK-UNK-UNK,
Invalid entries include: May-2009, UN-May-2009, UNK-2009, UNK

Step 3: Add an Invalid Format Alert

The system does not allow invalid partial dates to be entered. This requires that the format alert for the question is very descriptive in order for the user to know why a partial date is not accepted. If a user enters an invalid partial date format, they will receive the format alert and learn what the proper format should be.

Note: You may have some questions that only allow an unknown day, others that allow an unknown day and month, and others that allow the entire date to be unknown. It is a good idea to have a separate Invalid Format Alert for each of these types of questions, so the user understands what kind of input is required. Otherwise, they may be confused when entering an unknown month on a question that does not allow it, for example.

Still on the Question Types worksheet, change the Invalid Format Alert for the two questions from the previous entry to “Value entered must be a date (DD-MMM-YYYY or UNK-UNK-UNK). Please correct.” Now the user will know they can enter “UNK” for an unknown field.


Step 4: Create a “Time” Question

The only difference between a question capturing the date and a question capturing the time in DataArchitect is the Date Format and Invalid Format Alert used. Otherwise, these questions share the same Data Type (Date) and Display Type (Text). You will introduce a “Time” question in this tutorial, and then show how to create one allowing unknown times using the PartialDate Data Type.

Using the same Adverse Events form as the previous steps, create two new questionTypeIds: “aesttm” and “aeentm”. Place them directly below the “aeendtc” question (you will need to insert new rows in the Excel file). Name them “Start time (24-hour clock HH:MM):” and “Stop time (24-hour clock HH:MM):”, give them both a Data Type of “Date” and a Display Type of “Text”, and give them a Date Format of “HH:mm”. Finally, give them both an Invalid Format Alert of “Value entered must be a time (HH:MM). Please change.”

Note: Remember to update the Group Id listing on the Display worksheet as well. Since you are inserting these two time questions into the middle of the form, they will become Group Id 3, and the "aeout" question will be bumped to Group Id 4.

Once you have done that, add these two new questions to the Question Layout and Display worksheets, as you have done for the other questions in this tutorial series. However, instead of adding these questions to the bottom of the list, insert them in the list directly underneath the “aeendtc” question.

Step 5: Create “Time” Partial Date questions

Now that you have seen how to create a question to capture the time in Data Architect, you will change them into Partial Date questions to allow them to have unknown fields. The process will be very similar to way you created our Partial Date questions in the first three steps.

First, go to the Question Types worksheet and change the Data Type and Display Type to “PartialDate” for the “aesttm” and “aeentm” question types. That is all you need to do to technically change them to Partial Date questions, although to gain the benefits of a Partial Date you will need to configure the other parameters as well.

Step 6: Configure the Time Format

Creating the format for our time questions will be very similar to what you did for the date questions in step 2. Although these questions are capturing the time, they are stilled considered “dates” by eClinical and statistics programs like SAS. The only difference is that instead of having a date format like mm/dd/yyyy, they have a format appropriate for capturing the time.

For this tutorial, you will use a Date Format of “HH[UN]:mm[UN]“. Both the minutes and seconds will be allowed to be unknown.

Step 7: Add an Invalid Format Alert

As in the previous step, you will need to update our time questions in a similar fashion to how you updated the date questions in step 3. Remember, the format alert for the question should be very descriptive in order for the user to know why a partial date is not accepted.

Still on the Question Types worksheet, change the Invalid Format Alert for the two time questions to “Value entered must be a time (HH:MM or UN:UN). Please change.” Now the user will know they can enter “UN” for an unknown time field.

In Conclusion

After completing this tutorial, you should feel comfortable in the following topics:

  • Adding Partial Dates and Times
  • Configuring Date Formats
  • Specifying Invalid Format Alerts

Now that you’re armed with this information, we suggest you take the next tutorial: Reference Questions.


Need more help?

Please visit the Fountayn Contact Information page.