var baseURL=$('meta[name="base_url"]').attr('content');
$(function() {
getAlreadyTestedEmployee();
});
function getAlreadyTestedEmployee() {
var items="";
$.getJSON(baseURL+"getAlredyTestedEmployeeData",function(data){
items+="<option value=''>-select a patient-</option>";
$.each(data,function(index,item)
{
items+="<option value='"+item.employee_id+"'>"+item.full_name+"</option>";
});
$(".patient").html(items);
});
}
$('#single-report').click(function(){
var patient_id = $('.select2').val();
if((patient_id=='')){
swal({
title: "Nothing is selected",
type: "error",
timer: 1500,
showConfirmButton: false,
customClass: 'swal-height'
});
}
else {
window.open('patientReport/singlePatient?patient_id=' + patient_id + '');
}
});
$('#all-patient-report').click(function(){
window.open('patientReport/allPatient');
});
|