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

[Users] dates -- rules

Hi Reggie,

I do have “” before “” tag.

I tested more, that I found the pattern that does not work.

When I have the “wrong date” or “ wrong range”, I “save”. The rule fires and gives me error message. But if I still have the “wrong date” or “ wrong range” and “save” the second time,
It does not give the error messages and saves the ““wrong date” or “ wrong value”.
Does anyone run into the same problem? Or this is a “bug”?

I am using OC3.1.2.

Best Regards

May
Sent: Wednesday, July 18, 2012 12:35 PM
To: [email protected]; [email protected]
Subject: Re: [Developers] [Users] dates

Hi May,

Cross-form rules will not fire unless data entry has begun on each form in each event referenced in the rule expression. This may be why the rule works sometimes, and doesn't work sometimes.

Reggie

Reggie Kelley
Database Analyst

CCS Associates
1923 Landings Dr.
Mountain View, CA 94043
Voice: 650-963-8152
Fax: 650-691-4410
www.ccsainc.com
------------------------------------------------------------------------------------
This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy, or disclose to anyone the message or any information contained in the message. If you have received this message in error, please advise the sender by reply e-mail and delete the message.
Sent: Wednesday, July 18, 2012 5:42 AM
To: [email protected]; [email protected]
Subject: Re: [Developers] [Users] dates


Does rule for cross form Date field have some “bug”? I experience that it works sometimes, it does not work sometimes. Does anyone have the same issue?
Below is what I am using:



Initial 24hr Vital Signs Date cannot be earlier than Admission Date




Initial 24hr Vital Signs Date cannot be earlier than Admission Date
F_F5. IG_F5_F5SCREEN.I_F5_DATEVS gte F_F1.IG_F1_F1SCREEN.I_F1_EDDATE

Thanks
May
Sent: Wednesday, July 18, 2012 6:28 AM
To: [email protected]; [email protected]
Subject: Re: [Users] [Developers] dates

Dear Ricardo,

There’s an example in the docs of this:

https://docs.openclinica.com/3.1/rules/examples-rule-expressions

Example 3

The following example uses DATEs with the equal and not equal operators. The same principle applies where the system can only compare items of the same DataType.


Visit Date is the same as today's date
ITEM_OID_1 eq _CURRENT_DATE


_CURRENT_DATE is a system level property that will pull the "today's date" from the server OpenClinica is installed on.


The date is not December 31, 2012r
ITEM_OID_1 ne 2012-12-31


Yours,

Michael
Sent: 18 July 2012 10:38
To: [email protected]; [email protected]
Subject: [Developers] dates

Hi all,
I was wondering if there was a command for the actual date, something like:
Field_data gt DateNow
Thanks
Ricardo Simões
The University of Dundee is a registered Scottish Charity, No: SC015096

Comments

  • rkelley2rkelley2 Posts: 38
    Hi again May,

    What you are describing sounds like the proper flow for OpenClinica rules. There is what is known as the "Dry run", where the rules are run, and any discrepancies that are found (by way of the rules) are displayed as error messages to alert the user that clicking the save button again will result in the saving of the form data, and the logging of the discrepancies. This gives the user the opportunity to correct any problems with data entry to reduce the number of discrepancies to be managed. So, if no discrepancies are detected in the data, then the data are saved on the first click of the save button. If discrepancies are detected, then the data are not saved until the user confirms the data by clicking on the save button a second time. I apologize if I've misunderstood your description, and told you what you already know.

    Reggie

    Reggie Kelley
    Database Analyst

    CCS Associates
    1923 Landings Dr.
    Mountain View, CA 94043
    Voice: 650-963-8152
    Fax: 650-691-4410
    www.ccsainc.com
    ------------------------------------------------------------------------------------
    This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy, or disclose to anyone the message or any information contained in the message. If you have received this message in error, please advise the sender by reply e-mail and delete the message.
    Sent: Thursday, July 19, 2012 9:10 AM
    To: [email protected]; [email protected]
    Subject: Re: [Developers] [Users] dates -- rules

    Hi Reggie,

    I do have “” before “” tag.

    I tested more, that I found the pattern that does not work.

    When I have the “wrong date” or “ wrong range”, I “save”. The rule fires and gives me error message. But if I still have the “wrong date” or “ wrong range” and “save” the second time,
    It does not give the error messages and saves the ““wrong date” or “ wrong value”.
    Does anyone run into the same problem? Or this is a “bug”?

    I am using OC3.1.2.

    Best Regards

    May
    Sent: Wednesday, July 18, 2012 12:35 PM
    To: [email protected]; [email protected]
    Subject: Re: [Developers] [Users] dates

    Hi May,

    Cross-form rules will not fire unless data entry has begun on each form in each event referenced in the rule expression. This may be why the rule works sometimes, and doesn't work sometimes.

    Reggie

    Reggie Kelley
    Database Analyst

    CCS Associates
    1923 Landings Dr.
    Mountain View, CA 94043
    Voice: 650-963-8152
    Fax: 650-691-4410
    www.ccsainc.com
    ------------------------------------------------------------------------------------
    This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy, or disclose to anyone the message or any information contained in the message. If you have received this message in error, please advise the sender by reply e-mail and delete the message.
    Sent: Wednesday, July 18, 2012 5:42 AM
    To: [email protected]; [email protected]
    Subject: Re: [Developers] [Users] dates


    Does rule for cross form Date field have some “bug”? I experience that it works sometimes, it does not work sometimes. Does anyone have the same issue?
    Below is what I am using:



    Initial 24hr Vital Signs Date cannot be earlier than Admission Date




    Initial 24hr Vital Signs Date cannot be earlier than Admission Date
    F_F5. IG_F5_F5SCREEN.I_F5_DATEVS gte F_F1.IG_F1_F1SCREEN.I_F1_EDDATE

    Thanks
    May
    Sent: Wednesday, July 18, 2012 6:28 AM
    To: [email protected]; [email protected]
    Subject: Re: [Users] [Developers] dates

    Dear Ricardo,

    There’s an example in the docs of this:

    https://docs.openclinica.com/3.1/rules/examples-rule-expressions

    Example 3

    The following example uses DATEs with the equal and not equal operators. The same principle applies where the system can only compare items of the same DataType.


    Visit Date is the same as today's date
    ITEM_OID_1 eq _CURRENT_DATE


    _CURRENT_DATE is a system level property that will pull the "today's date" from the server OpenClinica is installed on.


    The date is not December 31, 2012r
    ITEM_OID_1 ne 2012-12-31


    Yours,

    Michael
    Sent: 18 July 2012 10:38
    To: [email protected]; [email protected]
    Subject: [Developers] dates

    Hi all,
    I was wondering if there was a command for the actual date, something like:
    Field_data gt DateNow
    Thanks
    Ricardo Simões
    The University of Dundee is a registered Scottish Charity, No: SC015096
This discussion has been closed.