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

Rule does not run on first save

Hi,

I have a cross form rule that with expression DateA gt (DateB +42)
The rules test OK.

The issue is that the rule does not fire the first time I save the section.

1) Enter a DateB that will evaluate "true"
2) Save the section 
3) It allows the section to be saved.
4) Move back to first section and save again.
5) This time the rule first pass rule fires.


It appears to be evaluating the existing value prior to saving, rather than the value that has just been entered.
Can anyone help explain what I am doing wrong here?

I am using 3.1.4.1
Tagged:

Comments

  • tkhajatkhaja Posts: 62 ✭✭
    edited April 2014
    Hi Richard,

    Can you please attach a copy of the rule, mainly I need to look at the target and the expression of your rule.

    I have seen this behavior in the past when the target is not relative to the expression which means you have the full path specified in your target as well as in your expression even though your dateA and dateB items belong to the same group within the CRF.

    Best,
    Thasbiha
  • richard.brookesrichard.brookes Posts: 54
    Here is the rule

    <RuleImport>
    <RuleAssignment>
    <Target Context="OC_RULES_V1">SE_FOLLOWUP26WEEK.F_05FOLLOWUPVI.IG_05FOL_UNGROUPED.I_05FOL_FUDATE</Target>
    <RuleRef OID="R_VISDATE6">
    <DiscrepancyNoteAction IfExpressionEvaluates="true">
                    <Run AdministrativeDataEntry="true" InitialDataEntry="true" DoubleDataEntry="true" ImportDataEntry="false" Batch="true" />
    <Message>Visit date is greater than 6 weeks since procedure, please check</Message>
    </DiscrepancyNoteAction>
    </RuleRef>
    </RuleAssignment>
    <RuleDef OID="R_VISDATE6" Name="Check if visit date is gt 6 weeks since procedure">
    <Description>Check if visit date is gt 6 weeks since procedure</Description>
    <Expression>SE_FOLLOWUP26WEEK.F_05FOLLOWUPVI.IG_05FOL_UNGROUPED.I_05FOL_FUDATE gt (SE_SURGICALVISIT.F_03SURGICALVI.IG_03SUR_UNGROUPED.I_03SUR_SURGDATE + 42)</Expression>
    </RuleDef>
    </RuleImport>
  • richard.brookesrichard.brookes Posts: 54
    Hi,

    Based upon your reply I changed the changed expression to

    <Expression>I_05FOL_FUDATE gt (SE_SURGICALVISIT.F_03SURGICALVI.IG_03SUR_UNGROUPED.I_03SUR_SURGDATE + 42)</Expression>

    i.e. I removed the full path to the item that is referenced in the "Target"

    It works as expected now.

    PS. is this behavior noted in the documentation anywhere. I couldn't find it...

    Thanks

    Richard
  • tkhajatkhaja Posts: 62 ✭✭
    Hi Richard,

    This is a known bug and here is the link to the bug ticket

    http://jira.openclinica.com/browse/OC-2047

    Please feel free to add yourself as a watcher to monitor the progress of this ticket. Let me know if you need additional information.

    Best,
    Thasbiha
This discussion has been closed.