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

java rule

Dear all,

It is my first rule with java. I want to calculate difference between "Date of birth" and "Date of signing informed consent", but it doesn't work.
You can find my script below.

Also, Would you explain to me what means the string <script src="includes/jmesa/jquery.min.js"></script> at the beginning?



  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Dear Viktoriya,

    The <script src="includes/jmesa/jquery.min.js"></script> tag is for including the jQuery source file. After it was included you can use the jQuery fuctions (such as $(#CalculatedAge) etc.)

    Let me check your script and will come back with a few suggestions later. ;)
  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Dear Viktoriya,

    After checking your script I found some errors.
    Javascript is case sensitive, you had some wrong references. By the way TDS has got a good script for this task and it will tell you the difference between two dates in days. Customised that script for you and now it will return the difference in years. :)

    Hope this will work for you.



  • Thanks a lot! It work)
  • Csaba.HalmagyiCsaba.Halmagyi Posts: 54 ✭✭
    Great ;)
This discussion has been closed.