HOME


sh-3ll 1.0
DIR:/proc/self/root/proc/self/cwd/assets/backend/js/report/
Upload File :
Current File : //proc/self/root/proc/self/cwd/assets/backend/js/report/patientReport.js
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');
});