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

function list in OC

Hi all
I have been trying to establish the functions / operators available within OC rules, and either I can’t find it or the documentation is thin and fragmented.
Basic arithmetic and logical operators for numbers and dates are included in the user documentation, but I can only find reference to others within replies to queries in the users or developer forums. Found so far:
a) some date arithmetic (dates +/- integers for adding, subtracting days),
b) _current_date function,
c) some aggregate functions (sum(), avg(), min(), max(), median(), stdev())
d) a pow(er) function, and
e) a decode function,
The usage and possible limitations of these functions is sometimes hinted at, but it would be good to have a definitive listing.
So, does anyone have a definitive list of what’s possible, or know where one can be found? If so, can they share it please?
Your help would be much appreciated
Steve Canham
[email protected]

Comments

  • Hi Steve,
    Some of the below is addressed at the new OpenClinica Reference Guide page: https://docs.openclinica.com/3.1/rules/creating-rules, but I don't see _current_date or all of the functions listed there, for example. We'll try to add those soon.
    Thanks for your input, Tom
    Tom Hickerson | Senior Tier-2 Engineer
    [email protected]
    www.openclinica.com
    Open Source Platform for Clinical Research
    -----Original Message-----
    Sent: Wed 7/27/2011 15:07
    To: [email protected]
    Subject: [Developers] function list in OC

    Hi all
    I have been trying to establish the functions / operators available within OC rules, and either I can't find it or the documentation is thin and fragmented.
    Basic arithmetic and logical operators for numbers and dates are included in the user documentation, but I can only find reference to others within replies to queries in the users or developer forums. Found so far:
    a) some date arithmetic (dates ± integers for adding, subtracting days),
    b) _current_date function,
    c) some aggregate functions (sum(), avg(), min(), max(), median(), stdev())
    d) a pow(er) function, and
    e) a decode function,
    The usage and possible limitations of these functions is sometimes hinted at, but it would be good to have a definitive listing.
    So, does anyone have a definitive list of what's possible, or know where one can be found? If so, can they share it please?
    Your help would be much appreciated
    Steve Canham
    [email protected]
    Attachments:
    winmail.dat 3.3 KB
  • Dear Steve,
    Are you sure you aren't referring to functions available in calculations (rather than rules)?
    https://wiki.openclinica.com/doku.php?id=ocfunctionality:crf_calculations
    If the same functions are available in rules as calculations, then there should be some note of the commonalities.
    Yours,
    Michael
    -----Original Message-----
    Sent: 27 July 2011 17:23
    To: [email protected]
    Subject: Re: [Developers] function list in OC
    Hi Steve,
    Some of the below is addressed at the new OpenClinica Reference Guide page: https://docs.openclinica.com/3.1/rules/creating-rules, but I don't see _current_date or all of the functions listed there, for example. We'll try to add those soon.
    Thanks for your input, Tom
    Tom Hickerson | Senior Tier-2 Engineer
    [email protected]
    www.openclinica.com
    Open Source Platform for Clinical Research
    -----Original Message-----
    Sent: Wed 7/27/2011 15:07
    To: [email protected]
    Subject: [Developers] function list in OC

    Hi all
    I have been trying to establish the functions / operators available within OC rules, and either I can't find it or the documentation is thin and fragmented.
    Basic arithmetic and logical operators for numbers and dates are included in the user documentation, but I can only find reference to others within replies to queries in the users or developer forums. Found so far:
    a) some date arithmetic (dates ± integers for adding, subtracting days),
    b) _current_date function,
    c) some aggregate functions (sum(), avg(), min(), max(), median(), stdev())
    d) a pow(er) function, and
    e) a decode function,
    The usage and possible limitations of these functions is sometimes hinted at, but it would be good to have a definitive listing.
    So, does anyone have a definitive list of what's possible, or know where one can be found? If so, can they share it please?
    Your help would be much appreciated
    Steve Canham
    [email protected]
  • scanhammanscanhamman Posts: 39
    Hi Michael
    To be honest I'm not at all sure, which is why I have been looking for but not finding some definitive lists.
    I had assumed that calculations and rules would be the same or similar (i.e. share some central parsing and calculation engine) but that's maybe because I have seen that in other systems.
    I would also normally expect to see, in the user help documentation, something along the lines of:
    The functions available within calculations are...(complete with defined parameters, examples, etc)
    The functions available within rule expressions are...(complete with defined parameters, examples, etc)
    or one list for both if they are the same or overlap.
    but the material I have been able to find appears quite limited, and at the same time there are references to other apparent functions within replies to posts. As a newcomer to OC I'm just seeking some clarification, trying to better understand the capabilities of the system.
    best wishes
    Steve
    On 28 July 2011 11:19, Michael Bluett wrote:
    Dear Steve,
    Are you sure you aren't referring to functions available in calculations (rather than rules)?
    https://wiki.openclinica.com/doku.php?id=ocfunctionality:crf_calculations
    If the same functions are available in rules as calculations, then there should be some note of the commonalities.
    Yours,
    Michael
    -----Original Message-----
    Sent: 27 July 2011 17:23
    To: [email protected]
    Subject: Re: [Developers] function list in OC
    Hi Steve,
    Some of the below is addressed at the new OpenClinica Reference Guide page: https://docs.openclinica.com/3.1/rules/creating-rules, but I don't see _current_date or all of the functions listed there, for example. We'll try to add those soon.
    Thanks for your input, Tom
    Tom Hickerson | Senior Tier-2 Engineer
    [email protected]
    www.openclinica.com
    Open Source Platform for Clinical Research
    -----Original Message-----
    Sent: Wed 7/27/2011 15:07
    To: [email protected]
    Subject: [Developers] function list in OC
    Hi all
    I have been trying to establish the functions / operators available within OC rules, and either I can't find it or the documentation is thin and fragmented.
    Basic arithmetic and logical operators for numbers and dates are included in the user documentation, but I can only find reference to others within replies to queries in the users or developer forums. Found so far:
    a) some date arithmetic (dates +/- integers for adding, subtracting days),
    b) _current_date function,
    c) some aggregate functions (sum(), avg(), min(), max(), median(), stdev())
    d) a pow(er) function, and
    e) a decode function,
    The usage and possible limitations of these functions is sometimes hinted at, but it would be good to have a definitive listing.
    So, does anyone have a definitive list of what's possible, or know where one can be found? If so, can they share it please?
    Your help would be much appreciated
    Steve Canham
    [email protected]
This discussion has been closed.