We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Help with setting date range

I am trying to set up a rule that will set up the date ranges for a date entry on my CRF and I was advised to use a rule. I have written the rule but when I try to submit it, I get the following error message: OCRERR_0005 : Syntax Error in Expression. Can someone tell me what is wrong with my expression? Thanks a lot.

Here is my syntax:

<RuleImport>
<!--date of visit check in baseline CRF-->
    <RuleAssignment>
        <Target Context="OC_RULES_V1">SE_ENROLMENT.F_ROTAVIRUSBAS.IG_ROTAV_UNGROUPED_3434.I_ROTAV_VIS_7602</Target>
<RuleRef OID="I_ROTAV_VIS_7602">
<DiscrepancyNoteAction IfExpressionEvaluates="true">
<Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" Batch="true" ImportDataEntry="true"/> 
<Message>Date of Visit should be between 17th April 2013 and 1st January 2015.</Message>
</DiscrepancyNoteAction>
</RuleRef>
</RuleAssignment>

 
<RuleDef OID="I_ROTAV_VIS_7602" Name="Check if date of visit is correct">

        <Description>Date of Visit should be between 17th April 2013 and 1st January 2015</Description>

   <Expression>2013-04-17 lte I_ROTAV_VIS_7602 AND I_ROTAV_VIS_7602 lte 2015-01-01</Expression>
   

    </RuleDef>

</RuleImport>


Comments

  • haenselhaensel Posts: 602 ✭✭✭
    edited April 2014
    Do you have a newline at the end of the expression?
    e.q.

    <Expression>
    2013-04-17 lte I_ROTAV_VIS_7602 AND I_ROTAV_VIS_7602 lte 2015-01-01
    </Expression>
  • ifeomaozoifeomaozo Posts: 6
    No I don't.
  • haenselhaensel Posts: 602 ✭✭✭
    edited April 2014
    Comment was of no use.



  • GerbenRienkGerbenRienk Posts: 838 ✭✭✭
    Hi, 
    Could you try the same expression but with "AND" in lowercase, "and"? I guess that's the problem.
    Kind regards,
    Gerben Rienk
  • ifeomaozoifeomaozo Posts: 6
    Hello haensel, 

    But 17th of April 2013 is not greater than 18th of April 2013, for instance. I do not want them to be able to chose 16th of April 2013. I want them to only choose dates between the 17th of April 2013 to the 1st of January 2015.
  • ifeomaozoifeomaozo Posts: 6
    Wow! thanks Gerben. It worked !!!! So OpenClinica does not allows expressions that contain caps?
  • haenselhaensel Posts: 602 ✭✭✭
    ifeomaozo said:
    Hello haensel, 

    But 17th of April 2013 is not greater than 18th of April 2013, for instance. I do not want them to be able to chose 16th of April 2013. I want them to only choose dates between the 17th of April 2013 to the 1st of January 2015.
    You're right. I've overseen the reordering.
This discussion has been closed.