Sample data-entry rules that use functions
The _GetDateDifference function uses twenty-four hour periods, not calendar days, to compute the differences in days. If the DOV item contained date and time information, there are two possible solutions. The first solution uses the complete DOV date/time and the _GetDateDifference function and therefore evaluates days as twenty-four hour periods. The alternate solution evaluates the differences between DOVs using calendar days by creating new DateTime objects that contain no Time information from the DOVs and passing those new DateTime objects to the _GetDateDifference function. Each of the solutions uses the predefined constant DateTimeParts.Days.
Example 1
Characteristic | Description |
---|---|
Description |
Create a rule named rulWeekSeqCk that checks that there are 7 days between Week 1B and Week 2B visits. Issue a query on the Week 2B DOV item (in Treatment Arm B), if the DOV on the Week 2B study event is less than 7 days after the DOV on the Week 1B study event. |
Scope |
Treatment Arm B study element |
Study structure |
|
Rule summary |
|
Alternate rule summary |
|
Characteristic | Description |
---|---|
Description |
Create a rule named rulDateCompareWithRange that checks that the DOV in Week 2A is within 6-8 days after the DOV in Week 1A (in Treatment Arm A). |
Scope |
Treatment Arm A study element |
Structure |
|
Rule summary |
|
Alternate rule summary |
|
Parent topic: Sample expressions for data-entry rules