I'm having trouble uploading a simple date comparison rule. Within the CRF the two variables are both dates and within the rule I am using this I_DATE_MSDIAGNOSIS lt I_DATE_MSSYMPTOMS.
However, upon uploading this rule I see the error OID is not Valid, The OID can only be made of A-Z_0-9 and The Rule you are trying to reference does not exist or is Invalid. The OID is correct.
Please refer to the attached screenshot for more detail.
Thank you for any help.
Jay
0
Comments
I’m trying to create a rule that checks that the date in an item (ITEM_OID_1) is at least 5 days greater than that in another item (ITEM_OID_2).
The expressions I’ve tried are:
ITEM_OID_1 gt (ITEM_OID_2 + 5)
ITEM_OID_1 gt (ITEM_OID_2 + 432000)
ITEM_OID_1 gt (ITEM_OID_2 + 0000-00-05)
But they all fail (the rule will not load for the third attempt – which is fair enough); attempt 2 is using seconds instead of days.
(ITEM_OID_1 gt ITEM_OID_2) works, so I know I have the correct syntax etc., but obviously doesn’t contain the +5 days additional condition I require.
Any suggestions?
Thanks
Dave
I don’t think you can perform date arithmetic (i.e. date + 5), only compare dates together (date1 gt date2). I’ve not managed to get it to work either!
More information about dates in rules is given in the OpenClinica Rules Documentation on the Wiki (https://www.openclinica.org/dokuwiki/doku.php?id=ocfeatures:openclinica2.5&s=rules documentation)
Regards,
Ian
Sent: 15-Nov-2010 12:35
To: [email protected]
Subject: [Users] Rules with Dates
Hello,
I’m trying to create a rule that checks that the date in an item (ITEM_OID_1) is at least 5 days greater than that in another item (ITEM_OID_2).
The expressions I’ve tried are:
ITEM_OID_1 gt (ITEM_OID_2 + 5)
ITEM_OID_1 gt (ITEM_OID_2 + 432000)
ITEM_OID_1 gt (ITEM_OID_2 + 0000-00-05)
But they all fail (the rule will not load for the third attempt – which is fair enough); attempt 2 is using seconds instead of days.
(ITEM_OID_1 gt ITEM_OID_2) works, so I know I have the correct syntax etc., but obviously doesn’t contain the +5 days additional condition I require.
Any suggestions?
Thanks
Dave
Yes, you can do that (starting from 3.0)
The thing is that you must leave out the parentheses, so
ITEM_OID_1 – ITEM_OID_2 gt 5
should do the trick, if IfExpressionEvaluates=“true”
Hope this helps,
Gerben Rienk Visser
http://www.trialdatasolutions.com
Van: [email protected] [mailto:[email protected]] Namens David Judge
Verzonden: maandag 15 november 2010 12:35
Aan: [email protected]
Onderwerp: [Users] Rules with Dates
Hello,
I’m trying to create a rule that checks that the date in an item (ITEM_OID_1) is at least 5 days greater than that in another item (ITEM_OID_2).
The expressions I’ve tried are:
ITEM_OID_1 gt (ITEM_OID_2 + 5)
ITEM_OID_1 gt (ITEM_OID_2 + 432000)
ITEM_OID_1 gt (ITEM_OID_2 + 0000-00-05)
But they all fail (the rule will not load for the third attempt – which is fair enough); attempt 2 is using seconds instead of days.
(ITEM_OID_1 gt ITEM_OID_2) works, so I know I have the correct syntax etc., but obviously doesn’t contain the +5 days additional condition I require.
Any suggestions?
Thanks
Dave
Yes that works! A clever rearrangement.
Cheers,
Dave
Sent: 15 November 2010 17:41
To: [email protected]
Subject: RE: [Users] Rules with Dates
Hi David,
Yes, you can do that (starting from 3.0)
The thing is that you must leave out the parentheses, so
ITEM_OID_1 – ITEM_OID_2 gt 5
should do the trick, if IfExpressionEvaluates=“true”
Hope this helps,
Gerben Rienk Visser
http://www.trialdatasolutions.com
Van: [email protected] [mailto:[email protected]] Namens David Judge
Verzonden: maandag 15 november 2010 12:35
Aan: [email protected]
Onderwerp: [Users] Rules with Dates
Hello,
I’m trying to create a rule that checks that the date in an item (ITEM_OID_1) is at least 5 days greater than that in another item (ITEM_OID_2).
The expressions I’ve tried are:
ITEM_OID_1 gt (ITEM_OID_2 + 5)
ITEM_OID_1 gt (ITEM_OID_2 + 432000)
ITEM_OID_1 gt (ITEM_OID_2 + 0000-00-05)
But they all fail (the rule will not load for the third attempt – which is fair enough); attempt 2 is using seconds instead of days.
(ITEM_OID_1 gt ITEM_OID_2) works, so I know I have the correct syntax etc., but obviously doesn’t contain the +5 days additional condition I require.
Any suggestions?
Thanks
Dave
I made one rule to compare two dates between two different visit (events) in my study.
SE_VISIT3DAY141.F_PATIENTQUEST_506_V11.IG_PATIE_UNGROUPED_398.I_PATIE_SV3_QUEST_DT_2262
This date must be greater then the date last visit
Difference date
SE_VISIT3DAY141.F_PATIENTQUEST_506_V11.IG_PATIE_UNGROUPED_398.I_PATIE_SV3_QUEST_DT_2262 gt SE_VISIT2DAY71.F_PATIENTQUEST_968_V11.IG_PATIE_UNGROUPED_398.I_PATIE_SV2_QUEST_DT_6253
I_PATIE_SV2_QUEST_DT_6253 = Date
I_PATIE_SV3_QUEST_DT_2262 = Date
No invalid remarks, BUT it does not work!!
Can anyone help me to compare two dates,
Thanks in advance.
Christian
PS: sorry for last send David