335 lines
11 KiB
PHP
335 lines
11 KiB
PHP
<?php include('techsyn_header.php'); ?>
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try {
|
|
ace.settings.loadState('main-container')
|
|
} catch (e) {}
|
|
</script>
|
|
<?php include('techsyn_sidebar.php'); ?>
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
<li class="#">Data Setup</li>
|
|
<li class="#">Screening Data</li>
|
|
<!-- <li class="active">Village </li> -->
|
|
</ul>
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="pdf_Districts_Master_list.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_village_Master_list.php" />
|
|
</form>
|
|
|
|
<form name="f1" method="post" action="" id="flex_form_Districts_Master">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_Districts_Master_id" id="flex_village_Master_id" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var w = screen.width * .90;
|
|
var h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .75;
|
|
|
|
$("#flex1").flexigrid({
|
|
url: 'screening_list_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: 'Actions',
|
|
name: '',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'center'
|
|
},
|
|
{
|
|
display: 'Sr no.',
|
|
name: 'count',
|
|
width: w * .04,
|
|
sortable: false,
|
|
align: 'center'
|
|
},
|
|
{
|
|
display: 'Date Of Screening',
|
|
name: 'participation_date',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Name',
|
|
name: 'name',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
{
|
|
display: 'Number',
|
|
name: 'number',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'History Book No',
|
|
name: 'history_book_no',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Findings',
|
|
name: 'number',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Village',
|
|
name: 'village',
|
|
width: w * .15,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
|
|
|
|
],
|
|
buttons: [{
|
|
name: 'Add',
|
|
bclass: 'add',
|
|
onpress: add
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'PDF',
|
|
bclass: 'print',
|
|
onpress: pdf
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'Excel',
|
|
bclass: 'print_excel',
|
|
onpress: excel
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
|
|
{
|
|
name: 'Download Template',
|
|
bclass: 'print_excel',
|
|
onpress: download_template
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
name: 'Upload Excel',
|
|
bclass: 'print_excel',
|
|
onpress: upload_excel
|
|
},
|
|
{
|
|
separator: true
|
|
}
|
|
],
|
|
searchitems: [{
|
|
display: 'Village Name',
|
|
name: 'village',
|
|
isdefault: true
|
|
},
|
|
|
|
{
|
|
display: 'Date of Screening',
|
|
name: 'date_of_screening'
|
|
},
|
|
{
|
|
display: 'Patient Name',
|
|
name: 'patient_name'
|
|
},
|
|
{
|
|
display: 'Mobile No',
|
|
name: 'mobile_no'
|
|
}
|
|
|
|
|
|
|
|
],
|
|
sortname: "date_of_screening",
|
|
sortorder: "DESC",
|
|
usepager: true, //pagination
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
function excel() {
|
|
window.open('excel_screening_list.php', 'Village Subject List');
|
|
}
|
|
|
|
function pdf() {
|
|
window.open('pdf_screening_list.php', 'Village Subject List');
|
|
}
|
|
|
|
function add() {
|
|
$(".save_button").show();
|
|
$("#village_id").val("");
|
|
$("#village_name").val("");
|
|
$("#tehsil_id").val("");
|
|
$("#tehsil_id").select2();
|
|
$('#modal-add-village').modal("show");
|
|
}
|
|
function download_template() {
|
|
window.open('cancers_screening_temp.php', 'cancers_screening_temp');
|
|
// window.location = 'templates/Cancers Screening.xlsx';
|
|
}
|
|
|
|
function upload_excel() {
|
|
window.location = 'upload_excel_cancers_screening.php';
|
|
}
|
|
|
|
function delete_section(village_id) {
|
|
$("#village_id").val(village_id);
|
|
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete Cancers Screening?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_screening_data.php',
|
|
type: "POST",
|
|
data: $("#flex_form_village").serialize(),
|
|
success: function(data) {
|
|
if (data.indexOf("SUCCESS") != -1) {
|
|
BootstrapDialog.alert('Cancers Screening Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
} else {
|
|
BootstrapDialog.alert('Error Deleting Cancers Screening');
|
|
}
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Deleting Cancers Screening');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function save_section() {
|
|
$.ajax({
|
|
url: 'save_cancers_screening.php',
|
|
type: "POST",
|
|
data: $("#flex_form_village").serialize(),
|
|
success: function(data) {
|
|
BootstrapDialog.alert('Cancers Screening Saved Successfully.');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Saving Cancers Screening');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
}
|
|
|
|
function open_section(village_id, action) {
|
|
// alert(village_id);
|
|
|
|
|
|
if (action == "V") {
|
|
$(".save_button").hide();
|
|
|
|
} else {
|
|
$(".save_button").show();
|
|
|
|
}
|
|
$.ajax({
|
|
url: 'select_screening.php',
|
|
type: 'POST',
|
|
data: {
|
|
village_id: village_id
|
|
},
|
|
dataType: 'json',
|
|
success: function(data) {
|
|
console.log(data);
|
|
|
|
$("#village_id").val(data.id);
|
|
$("#date_of_screening").val(data.date_of_screening);
|
|
$("#patient_name").val(data.patient_name);
|
|
$("#mobile_no").val(data.mobile_no);
|
|
$("#dob").val(data.dob);
|
|
$("#history_book_no").val(data.history_book_no);
|
|
$("#test_result").val(data.test_result);
|
|
$("#test_result").select2();
|
|
|
|
$("#findings").val(data.findings);
|
|
$("#findings").select2();
|
|
$("#name_of_technician").val(data.name_of_technician);
|
|
$("#remark").val(data.remark);
|
|
$("#street_location").val(data.street_location);
|
|
|
|
$("#village").val(data.village);
|
|
$("#village").select2();
|
|
|
|
if (data.complaint != null) {
|
|
var complaint = data.complaint;
|
|
var dataarray = complaint.split(",");
|
|
$("#complaint").val(dataarray);
|
|
$('#complaint').select2();
|
|
}
|
|
if (data.diagnosis != null) {
|
|
var diagnosis = data.diagnosis;
|
|
var dataarray = diagnosis.split(",");
|
|
$("#diagnosis").val(dataarray);
|
|
$('#diagnosis').select2();
|
|
}
|
|
if (data.body_part != null) {
|
|
var body_part = data.body_part;
|
|
var dataarray = body_part.split(",");
|
|
$("#body_part").val(dataarray);
|
|
$('#body_part').select2();
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#modal-add-village').modal("show");
|
|
|
|
},
|
|
error: function(jqXHR, textStatus, errorThrown) {
|
|
// Log the error details for debugging
|
|
console.error('AJAX Error: ', textStatus, errorThrown);
|
|
BootstrapDialog.alert('Error populating village details. Please try again later.');
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|
|
|
|
<?php include('add_cancers_screening.php'); ?>
|