Widget:VisitSchedulerRedux: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
   <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script src="/images/includes/ics.js"></script>
    <script src="/images/includes/FileSaver.js"></script>
<script>
<script>
$.noConflict();
$.noConflict();
Line 134: Line 136:
newWin.print();
newWin.print();
newWin.close();
newWin.close();
});
$("#save").click(function(){
var cal = ics();
$.each(timeConstraints, function(key, value){
if(!$("#visit-"+key).hasClass("invalid")){
var appointmentDateAndTime = new Date($("#visit-"+key).val());
if($("#visitTime-"+key).length){
appointmentDateAndTime.setHours($("#visitTime-"+key).val().split(":")[0]);
appointmentDateAndTime.setMinutes($("#visitTime-"+key).val().split(":")[1]);
}
var appointmentEndTime = appointmentDateAndTime;
appointmentEndTime.setMinutes(appointmentDateAndTime.getMinutes()+30);
cal.addEvent(value[5]+" for "+$("#patientID").val(),value[6],"Office of "+$("#assigned").val(),appointmentDateAndTime.toDateString(),appointmentEndTime.toDateString());
}
});
cal.download();
});
});
};
};
Line 149: Line 167:
If you have any specific questions about patient scheduling criteria according to the protocol, feel free to contact the AEGIS II Hotline <a href="https://aegis2.bidmc.org/index.php/Hotline_Contact">here</a><br /><br />
If you have any specific questions about patient scheduling criteria according to the protocol, feel free to contact the AEGIS II Hotline <a href="https://aegis2.bidmc.org/index.php/Hotline_Contact">here</a><br /><br />
<div style="position:relative; float:left; width:20%;">
<div style="position:relative; float:left; width:20%;">
<form action="http://www.wikidoc.org/calendar.php" method="post" id="visitForm">
<form id="visitForm">
<label for="patientID">Patient ID</label>
<label for="patientID">Patient ID</label>
<input type="text" name="patientID" id="patientID" /><br />
<input type="text" name="patientID" id="patientID" /><br />
Line 166: Line 184:
</table>
</table>


<input type="hidden" id="outlookJSON" />
<input type="button" id="print" value="Print" style="visibility:hidden"/>
<input type="button" id="print" value="Print" style="visibility:hidden"/>
<input type="submit" id="save" value="Save to Outlook" style="visibility:hidden" />
<input type="button" id="save" value="Save to Outlook" style="visibility:hidden" />
</form>
</form>
</div>
</div>
</div>
</div>
</includeonly>
</includeonly>

Revision as of 19:11, 22 January 2019