31 Dec 2018: Thank you to our knowledgeable and friendly forums users for another great year. We are aware of the uptick in spam accounts and are doing our best to ban these at first sight. Thank you for your patience!

Pharmacokinetics CRF with repeated group & 2 minutes time separation

I want to build a CRF just like the Pharmacokinetics CRF of the JUNO study in the demo but with the following things:
  1. I want it to be repeated group, so the user can add as much as the protocol says for samples number, but since it's a calculated CRF, and the calculations has to be written depending on the scheduled time just before it, I think it's impossible, if possible how ?
    I don't really want to build a new version for each change in number of samples.
  2. The original CRF separates between each scheduled time 2 hours, and I want it to be separated with 2 minutes, I don't know what to change in the RIGHT_ITEM_TEXT field regarding this.
This is the link of the CRF:
https://demo.eclinicalhosting.com/OpenClinica/ViewCRF?module=admin&crfId=15

This is the RIGHT_ITEM_TEXT of the second scheduled sample time:
<div ID="Pro2"></div>
<script src="includes/jmesa/jquery.min.js">// for OC versions before 3.1.4, use jquery-1.1.2.min.js !</script>
<script>
$.noConflict();
jQuery(document).ready(function($) { 
var fieldTime2 = $("#Initial1").parent().parent().find("input");
var fieldPro2 = $("#Pro2").parent().parent().find("input");

function calcProjected2(OCentry2)
{
 var dateParts2 = OCentry2.split(":");
 var hours2 = parseInt(dateParts2[0],10);
 //var minutes2 = parseInt(dateParts2[1],10);
 
 if(hours2<8)
 {
return ("0"+(hours2+2)+":"+dateParts2[1]);
 }
 else if(hours2<23)
 {
return ((hours2+2)+":"+dateParts2[1]);
 }
 else if(hours2==23)
 { return ("01:"+dateParts2[1]);
 }
 else if(dateParts2[1]=="NaN" || dateParts2[1]=="undefined")
 { return "";
 }
 else
return ("02:"+dateParts2[1]);
}

function calcProTime2(){
 var calculatedTime2 = calcProjected2(fieldTime2.val());
 if (fieldPro2.val() != calculatedTime2){
  fieldPro2.val(calculatedTime2);
  fieldPro2.change();
 }
};
fieldPro2.blur(function(){
 calcProTime2();
 })
fieldPro2.focus(function(){
 calcProTime2();
 })
$("#srl").focus(function(){
 calcProTime2();
 });
$("#srh").focus(function(){
 calcProTime2();
 });
})
</script>
Shams Waleed, Pharm.D.
Data Analyst | Data Management Unit
ACDIMA Center for Bioequivalence and Pharmaceutical Studies
E-mail: [email protected].com

Sign In or Register to comment.