Entering and managing partial dates in Castor CDMS
Table of Contents
With the 2022.5 release Castor CDMS allows to include partial dates when configuring a date field in the CDMS form builder. Therefore, you can determine whether a missing day or day and month are permitted when entering a date datapoint. Once set, this action will be recorded in the study audit trail. This will be reflected in configured web surveys, visit forms and repeating data forms (Castor Connect will be updated in an upcoming release to also allow this) and their printables. The study admins can also configure how those partial dates will be handled by dependencies and validations.
Configuring partial dates
Follow the steps below to enable partial dates when creating or editing a date field:
1. When creating a date field, in the ‘Allow partial dates’ dropdown, select one of the following options:
- Not permitted - partial dates will not be allowed for this date field
- Missing day only - the date field will accept month and year
- Missing month and day - the field will accept year, day and month can be entered optionally
2. If a date field allows partial dates to be entered, you can determine how those dates will be handled by dependencies and validations using the ‘Handling partial dates’ option:
- Ignore - partial values will be ignored by said validations and dependencies
- Trigger on matching month or year - a partial match will be used for the purposes of validations and dependencies
- Round up - partial dates will be rounded up to the latest calendar day for the purposes of validations and dependencies (e.g. March 2023 is treated as 31-03-2023)
-
Round down - partial dates will be rounded down to the earliest calendar day for the purposes of validations and dependencies (e.g. March 2023 is treated as 01-03-2023)
For studies which already have data collected in the date fields, it is possible to edit the date field to enable the partial dates option. This will not lead to any data loss in those date fields. For more information about how mid-study changes might affect the study forms, please refer to the article Can I still change the forms when my study is live in EDC/CDMS?
The migration of changes to whether a date field allows partial dates is permitted using the Form Sync feature.
Entering partial dates
Once the partial dates have been configured, an additional dropdown will appear in the data entry window where data entry users can select whether to enter a full date or a partial date:
The exact options in the dropdown menu will depend on whether the options ‘Missing day only’ or ‘Missing day and month’ are enabled for the field.
The validation messages will also be triggered depending on how the option ‘Handling partial dates’ has been configured. In the example below, the option ‘Trigger on matching month or year’ is enabled and if the entered month and year are in the future, a validation message is triggered:
The importing and exporting of partial date values is permitted, as long as the relevant date field(s) in the form(s) are configured to allow partial dates - this includes all standard export formats offered by Castor.
To import the partial dates, the data should conform to the following formats:
- Partial-date, missing day - UK-MM-YYYY
- Partial date, missing month and day - UK-UK-YYYY
When exporting, date data configured to allow partial entries will also be exported in the formats above.
Partial Dates in Calculation Fields
It is possible to use partial dates in calculation fields. The missing parts of the date are filled by adding zeros. For example, 00-12-2022 when only day is unknown or 00-00-2022 if both day and month are not known.
Using partial dates in surveys intended for Castor Connect (mobile surveys)
Partial date fields are not currently supported in the Castor Connect app, so will be displayed as standard date fields. The app will be updated to allow for partial dates in a future release.
To learn more about calculating with date and time, navigate to the section Calculations with date and time