Widget:MattTest: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
 
(41 intermediate revisions by 3 users not shown)
Line 50: Line 50:
$(document).ready(function () {
$(document).ready(function () {
//Update the Screening Visit Window
//Update the Screening Visit Window
$("#missedInfusion").dialog({
var $ = jQuery.noConflict();
autoOpen: false
});
$("#beforeWindow").dialog({
autoOpen: false
});
$("#afterWindow").dialog({
autoOpen: false
});
$("#missedInfusionWarning").dialog({
autoOpen: false
});
$("#delayedInfusion").dialog({
autoOpen: false
});


//Check Entered Screening Visit Date
//Check Entered Screening Visit Date
$("#screenDate").datepicker({
$("#screenDate").datepicker({
onSelect: function() {
onSelect: function() {
checkScreenDate();
$("#eventDate").datepicker();
checkScreenDate($(this).datepicker("getDate"),$("#eventDate").datepicker("getDate"));
}
}
});
});
Line 78: Line 62:
onSelect: function(curDate, instance) {
onSelect: function(curDate, instance) {
    if(curDate != instance.lastVal) {
    if(curDate != instance.lastVal) {
screenUpdate();
screenUpdate($(this).datepicker("getDate"));
    }
    }
  }
  }
Line 90: Line 74:
$("#nextApptHour").spinner({max: 24});
$("#nextApptHour").spinner({max: 24});
nextApptMinute = $( "#nextApptMinute" ).spinner();
nextApptMinute = $( "#nextApptMinute" ).spinner();
$("#nextApptMinute").spinner({min: 0});
$("#nextApptMinute").spinner({min: 00});
$("#nextApptMinute").spinner({max: 60});
$("#nextApptMinute").spinner({max: 60});
day1 = new Date();
day1 = new Date();
Line 162: Line 146:
});
});
});
 
/////////////
/////////////
//
//
Line 336: Line 320:
}
}
}
}
else if ($.inArray($.trim(visitNum),["Visit 2", "Visit 4", "Visit 5", "Visit 6", "Visit 7", "Visit 8"]) > -1){
else if ($.inArray($.trim(visitNum),["Visit 2", "Visit 4", "Visit 5", "Visit 6", "Visit 7", "Visit 8", "Visit 9", "Visit 10", "Visit 11"]) > -1){
//Check visit based on number of days only.  Need to create temp variables to drop the time from the dates.
//Check visit based on number of days only.  Need to create temp variables to drop the time from the dates.
var maxDay = new Date(tdmax.getFullYear(), tdmax.getMonth(), tdmax.getDate() );
var maxDay = new Date(tdmax.getFullYear(), tdmax.getMonth(), tdmax.getDate() );
Line 384: Line 368:
}
}
}
}
else if ($.inArray($.trim(visitNum),["Visit 9"]) > -1 ) {
else if ($.inArray($.trim(visitNum),["Visit 12"]) > -1 ) {
//Check visit based on number of days, but allow for delayed or missed infusions.
//Check visit based on number of days, but allow for delayed or missed infusions.
var daysNeeded = 14 - 7*($.inArray($.trim(visitNum),["Visit 4", "Visit 5", "Visit 6"]));
var daysNeeded = 14 - 7*($.inArray($.trim(visitNum),["Visit 4", "Visit 5", "Visit 6"]));
Line 621: Line 605:
var timeConstraints = {}
var timeConstraints = {}
if (subStudy == 0){
if (subStudy == 0){
var timeConstraints = {
var timeConstraints = {
// VisitNum : [Days from Infusion 1, Window + Days, Window - Days, Window + Hours, Window - Hours, Visit, Visit Description, Short Visit Description]
// VisitNum : [Days from Infusion 1, Window + Days, Window - Days, Window + Hours, Window - Hours, Visit, Visit Description, Short Visit Description]
1 : [0, 5, 0, 0, 0, "Visit 2", "Infusion 1 of investigational product should occur no earlier than 12 h after IV contrast.  Subjects who are to undergo angiography and, therefore, receive IV contrast agent must have stable renal function.", "Infusion 1"],
1 : [0, 5, 0, 12, 0, "Visit 2", "Infusion 1 of investigational product should occur no earlier than 12 h after IV contrast and be dosed within 5 days of First Medical Contact.  Subjects who are to undergo angiography and, therefore, receive IV contrast agent must have stable renal function.", "Infusion 1"],
2 : [1, 1, 0, 6, 6, "Visit 3", "This follow-up visit should occur 24-48 h (± 6 h) following Infusion 1", "Follow-up after Infusion 1"],
2 : [7, 1, 2, 0, 0, "Visit 3", "Infusion 2 should occur approximately 7 (-2/+1) days  after the 1st infusion (Visit 2) with a minimum window between infusions of at least 5 days.", "Infusion 2"],
3 : [7, 3, 0, 0, 0, "Visit 4", "Infusion 2 should occur 7 days (+3) after the 1st infusion (Visit 2), with at least 7 days elapsing between the end of the 1st infusion and the beginning of the 2nd infusion.", "Infusion 2"],
3 : [14, 1, 2, 0, 0, "Visit 4", "Infusion 3 should occur approximately 7 (-2/+1) days after the 2nd infusion (Visit 3) with a minimum window between infusions of at least 5 days.", "Infusion 3"],
4 : [14, 3, 0, 0, 0, "Visit 5", "Infusion 3 should occur 7 days (+3) after the 2nd infusion, with at least 7 days elapsing between the end of the 2nd infusion and the beginning of the 3rd infusion.", "Infusion 3"],
4 : [21, 1, 2, 0, 0, "Visit 5", "Infusion 4 should occur approximately 7 (-2/+1) days after the 3rd infusion (Visit 4) with a minimum window between infusions of at least 5 days. This infusion must be given within 30 days of the 1st infusion.", "Infusion 4"],
5 : [21, 3, 0, 0, 0, "Visit 6", "Infusion 4 should occur 7 days (+3) after the 3rd infusion, with at least 7 days elapsing between the end of the 3rd infusion and the beginning of the 4th infusion.", "Infusion 4"],
5 : [28, 2, 2, 0, 0, "Visit 6", "This follow-up visit should occur approximately on day 29 (±2) after the 1st infusion (Visit 5).", "1st Follow-Up After Infusion 4"],
6 : [28, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
6 : [59, 10, 10, 0, 0, "Visit 7", "This follow-up visit should occur approximately on day 60 (±10) after the 1st infusion (Visit 2).", "2nd Follow-Up After Infusion 4"],
7 : [60, 7, 0, 0, 0, "Visit 8", "Final Safety Visit. Visit 8 should occur approximately 60 days [+ 7 days] after Infusion 1. The visit should not occur less that 25 days after the last infusion (Infusion 4)", "Final Safety Visit"]
7 : [89, 10, 10, 0, 0, "Visit 8", "This follow-up visit should occur approximately on day 90 (±10) after the 1st infusion (Visit 2).", "3rd Follow-Up After Infusion 4"],
8 : [179, 10, 10, 0, 0, "Visit 9", "This follow-up visit should occur approximately on day 180 (±10) after the 1st infusion (Visit 2).", "4th Follow-Up After Infusion 4"],
9 : [269, 10, 10, 0, 0, "Visit 10", "This follow-up visit should occur approximately on day 270 (±10) after the 1st infusion (Visit 2).", "5th Follow-Up After Infusion 4"],
10 : [364, 14, 14, 0, 0, "Visit 11", "This follow-up visit should occur approximately on day 365 (±14) after the 1st infusion (Visit 2).", "End Of Study Visit"],
};
};
return timeConstraints;
return timeConstraints;
Line 652: Line 638:
4 : [14, 3, 0, 0, 0, "Visit 5", "Infusion 3 should occur 7 days (+3) after the 2nd infusion, with at least 7 days elapsing between the end of the 2nd infusion and the beginning of the 3rd infusion.", "Infusion 3"],
4 : [14, 3, 0, 0, 0, "Visit 5", "Infusion 3 should occur 7 days (+3) after the 2nd infusion, with at least 7 days elapsing between the end of the 2nd infusion and the beginning of the 3rd infusion.", "Infusion 3"],
5 : [21, 3, 0, 0, 0, "Visit 6", "Infusion 4 should occur 7 days (+3) after the 3rd infusion, with at least 7 days elapsing between the end of the 3rd infusion and the beginning of the 4th infusion.", "Infusion 4"],
5 : [21, 3, 0, 0, 0, "Visit 6", "Infusion 4 should occur 7 days (+3) after the 3rd infusion, with at least 7 days elapsing between the end of the 3rd infusion and the beginning of the 4th infusion.", "Infusion 4"],
6 : [28, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4,", "Follow-up after Infusion 4"],
6 : [28, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
7 : [60, 7, 0, 0, 0, "Visit 8", "Final Safety Visit. Visit 8 should occur approximately 60 days [+ 7 days] after Infusion 1. The visit should not occur less that 25 days after the last infusion (Infusion 4)", "Final Safety Visit"]
7 : [32, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
8 : [36, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
9 : [40, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
10 : [44, 3, 0, 0, 0, "Visit 7", "This follow-up visit is the last visit of the active treatment period. It should occur 7 days (+3) following Infusion 4", "Follow-up after Infusion 4"],
};
};
return timeConstraints;
return timeConstraints;
Line 813: Line 802:
}
}


function screenUpdate(){
function screenUpdate(date){
var event = $("#eventDate").datepicker("getDate");
var event = date;
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
Line 824: Line 813:
}
}


function checkScreenDate(){
function checkScreenDate(screen, event){
var screen = $("#screenDate").datepicker("getDate");
var event = $("#eventDate").datepicker("getDate");
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
Line 974: Line 961:
console.log(visitName+" occurs Study Day"+studyDays);
console.log(visitName+" occurs Study Day"+studyDays);
}
}
$("#formBuilder-container").ready(function(){
var div = $("#formBuilder-container");
if (div.css("padding-left").slice(0,-2) > 5) {div.css("padding-left","5px")}
if (div.css("padding-right").slice(0,-2) > 5) {div.css("padding-right","5px")}
if (div.css("padding-top").slice(0,-2) > 5) {div.css("padding-top","5px")}
if (div.css("padding-bottom").slice(0,-2) > 5) {div.css("padding-bottom","5px")}
});
$("#output-container").ready(function(){
var div = $("#output-container");
if (div.css("padding-left").slice(0,-2) > 5) {div.css("padding-left","5px")}
if (div.css("padding-right").slice(0,-2) > 5) {div.css("padding-right","5px")}
if (div.css("padding-top").slice(0,-2) > 5) {div.css("padding-top","5px")}
if (div.css("padding-bottom").slice(0,-2) > 5) {div.css("padding-bottom","5px")}
});
});


</script>
</script>
Line 1,167: Line 1,171:
     </table>
     </table>
<center>
<center>
<form action="http://cslbehringwiki.bidmc.org/calendar.php" method="post">
<form action="http://www.wikidoc.org/calendar.php" method="post">
         <input type="hidden" name="str" id="strInput">
         <input type="hidden" name="str" id="strInput">
         <input type="hidden" name="ptID" id="ptIDInput">
         <input type="hidden" name="ptID" id="ptIDInput">
Line 1,190: Line 1,194:
</div>
</div>
</div>
</div>
<script type="text/javascript">
$("#formBuilder-container").ready(function(){
var div = $("#formBuilder-container");
if (div.css("padding-left").slice(0,-2) > 5) {div.css("padding-left","5px")}
if (div.css("padding-right").slice(0,-2) > 5) {div.css("padding-right","5px")}
if (div.css("padding-top").slice(0,-2) > 5) {div.css("padding-top","5px")}
if (div.css("padding-bottom").slice(0,-2) > 5) {div.css("padding-bottom","5px")}
});
$("#output-container").ready(function(){
var div = $("#output-container");
if (div.css("padding-left").slice(0,-2) > 5) {div.css("padding-left","5px")}
if (div.css("padding-right").slice(0,-2) > 5) {div.css("padding-right","5px")}
if (div.css("padding-top").slice(0,-2) > 5) {div.css("padding-top","5px")}
if (div.css("padding-bottom").slice(0,-2) > 5) {div.css("padding-bottom","5px")}
});
</script>


</includeonly>
</includeonly>

Latest revision as of 15:00, 2 July 2018