2024-10-16 19:18:52 +05:30
< ? php include ( 'techsyn_header.php' ); ?>
<!-- Main Content Container for side bar and body -->
< style >
. overlay {
position : fixed ;
top : 0 ;
left : 0 ;
width : 100 % ;
height : 100 % ;
background - color : rgba ( 0 , 0 , 0 , 0.5 );
/* Semi-transparent black background */
z - index : 9999 ;
/* Set a high z-index to ensure it's displayed on top */
}
</ style >
< 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' );
error_reporting ( E_ERROR | E_PARSE );
?>
<!-- breadcrumb -->
< div class = " main-content " >
< div class = " main-content-inner " >
< div class = " breadcrumbs ace-save-state " id = " breadcrumbs " >
< ul class = " breadcrumb " >
< li >
< i class = " ace-icon fa fa-home home-icon " ></ i >
< a href = " # " > Home </ a >
</ li >
< li class = " " > Patient Visit </ li >
< li class = " active " > Pending Medical Examination </ li >
</ ul >
</ div >
<!-- End of breadcrumb -->
< div class = " page-content " >
< form name = " f1 " method = " post " action = " " id = " flex_form_checkup " >
< div id = " flex1 " style = " width:100% " >
</ div >
< input type = " hidden " name = " flex_checkup_id " id = " flex_checkup_id " />
< input type = " hidden " name = " emp_id_history " id = " emp_id_history " />
< input type = " hidden " name = " checkup_type_id_db " id = " checkup_type_id_db " />
< input type = " hidden " name = " toPage " id = " toPage " />
< input type = " hidden " name = " returnPage " id = " returnPage " >
</ form >
< form name = " flex_medical_form " method = " post " action = " " id = " flex_medical_form " >
< input type = " hidden " name = " medical_exam_id " id = " medical_exam_id " />
</ form >
< form name = " export_form " method = " post " id = " export_form " action = " " >
< input type = " hidden " name = " flex_medical_form " id = " flex_medical_form " />
< input type = " hidden " name = " pdf_action " id = " pdf_action " value = " pdf_pending_medical_examination.php " />
< input type = " hidden " name = " excel_action " id = " excel_action " value = " excel_pending_medical_examination.php " />
</ form >
< div id = " flex1 " style = " width:100% " >
</ div >
</ div >
</ div ><!-- /. page - content -->
</ div >
</ div ><!-- /. main - content -->
< script type = " text/javascript " >
$ ( function () {
var w = screen . width * . 90 ;
var h = 0 ;
h = ( window . innerHeight - ( $ ( " #navbar " ) . height () + $ ( " .breadcrumbs " ) . height ())) * . 75 ;
$ ( " #flex1 " ) . flexigrid ({
url : 'medical_examination_list_script.php' ,
dataType : 'json' ,
colModel : [{
display : 'Select' ,
name : 'checkbox' ,
width : w * . 07 ,
sortable : false ,
align : 'left'
}, {
display : 'Sr' ,
name : 'count' ,
width : w * . 04 ,
sortable : false ,
align : 'center'
},
{
display : 'Actions' ,
name : '' ,
width : w * . 09 ,
sortable : false ,
align : 'center'
},
{
display : 'Examination Date' ,
name : 'medical_entry_date' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
// {display: 'Examination Type', name: 'task', width: w*.2, sortable: true, align: 'center'},
{
display : 'Ticket No' ,
name : 'ticket_no' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
{
display : 'Patient Name' ,
name : 'patient_name' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
{
display : 'EMP Code' ,
name : 'emp_code' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
{
display : 'Checkup Name' ,
name : 'checkup_type_id' ,
width : 300 ,
sortable : true ,
align : 'center'
},
{
display : 'Reporting OHC' ,
name : 'ohc_type_id' ,
width : w * . 08 ,
sortable : true ,
align : 'center'
},
{
display : 'Patient Category' ,
name : 'patient_cat_id' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
{
display : 'Created By' ,
name : 'medical_attend' ,
width : w * . 1 ,
sortable : true ,
align : 'center'
},
// {
// display: 'Aadhar No. ',
// name: 'aadhar_no',
// width: 150,
// sortable: true,
// align: 'center'
// },
// {
// display: 'Primary No.',
// name: 'primary_phone',
// width: 150,
// sortable: true,
// align: 'center'
// },
// {
// display: 'Test Status',
// name: 'test_status',
// width: w * .07,
// sortable: true,
// align: 'center'
// },
// {
// display: 'Medical examination',
// name: 'current_status',
// width: w * .1,
// sortable: true,
// align: 'center'
// },
],
buttons : [
// {
// 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
// },
// {
// name: 'Download Excel',
// bclass: 'print_excel',
// onpress: download_excel
// },
// {
// separator: true
// },
{
name : 'Bulk Approve' ,
bclass : 'print_excel' ,
onpress : bulk_approve
},
{
separator : true
},
2024-11-19 09:59:09 +05:30
< ? php if ( $_SESSION [ 'RoleCode' ] == 'DOC' ) { ?>
{
name : 'Bulk Approve Checkup Type Wise' ,
bclass : 'print_excel' ,
onpress : bulk_approve_checkup_type_wise
},
< ? php } ?>
2024-10-16 19:18:52 +05:30
],
searchitems : [{
display : 'EMP code' ,
name : 'emp_code' ,
isdefault : true
},
{
display : 'Patient Name' ,
name : 'patient_name' ,
isdefault : true
},
{
display : 'Examination Date(DD/MM/YYYY)' ,
name : 'medical_entry_date' ,
isdefault : true
},
{
display : 'Examination Date Range(DD/MM/YYYY)-(DD/MM/YYYY)' ,
name : 'medical_entry_date_between' ,
isdefault : true
},
// {
// display: 'Examination Type(annual/pre_employment)',
// name: 'task',
// isdefault: true
// },
{
display : 'Patient Category' ,
name : 'patient_cat_name'
}
],
sortname : " a.last_modified " ,
sortorder : " desc " ,
usepager : true , //pagination
useRp : true ,
rp : 50 , //records per page
showTableToggleBtn : false , //toggle button for the whole table
resizable : true ,
//width: w,
height : h ,
singleSelect : true
});
});
function showOverlay () {
var overlay = document . createElement ( 'div' );
overlay . className = 'overlay' ;
document . body . appendChild ( overlay );
}
function hideOverlay () {
var overlay = document . querySelector ( '.overlay' );
if ( overlay ) {
overlay . parentNode . removeChild ( overlay );
}
}
let checkArr = {};
let checkboxArr = [];
function generateForm ( checkArr ) {
return new Promise (( resolve , reject ) => {
console . log ( checkArr );
Object . entries ( checkArr ) . forEach (([ key , value ]) => {
if ( value == " PRE_EMP_MEDICAL_EXAMINATIONS_HAZARDOUS " ) {
open_form_generation ( key , " form_33 " );
} else if ( value == " MINE_WORKER_MEDICAL_EXAMINATIONS " ) {
open_form_generation ( key , " form_O " );
} else if ( value == " ANNUAL_MEDICAL_EXAMINATION_HAZARDOUS " || value == " PERIODIC_MEDICAL_EXAMINATIONS_HAZARDOUS " ) {
open_form_generation ( key , " form_32 " );
}
// console.log("running");
// console.log(key + " " + value);
});
resolve ();
});
}
function form_generation_for_pdf ( form_type ) {
// alert(form_type);
var form_generate_type = " " ;
var content = " " ;
var form_data_array = [];
if ( form_type == 'form_33' ) {
form_generate_type = 'Form 33' ;
$ ( '#form_33 p' ) . each ( function ( index ) {
if ( index <= 22 )
form_data_array [ index ] = ( $ ( this ) . text ())
});
} else if ( form_type == 'form_O' ) {
$ ( '#form_0_pdf p' ) . each ( function ( index ) {
if ( index <= 16 )
form_data_array [ index ] = ( $ ( this ) . text ())
});
form_generate_type = 'Form O' ;
}
console . log ( form_data_array );
if ( form_type == 'form_33' ) {
$ . ajax ({
url : 'save_form_generation_type.php' ,
type : 'POST' ,
data : {
form_type : $ ( " #form_type " ) . val (),
checkup_id : $ ( " #checkup_id " ) . val (),
form_data_array : form_data_array
},
success : function ( data ) {}
});
} else {
$ . ajax ({
url : 'save_form_generation_type.php' ,
type : 'POST' ,
data : {
form_type : $ ( " #form_type_O " ) . val (),
checkup_id : $ ( " #checkup_id_O " ) . val (),
form_data_array : form_data_array
},
success : function ( data ) {}
});
}
}
var function_calling_count = 0 ;
function_calling_count_o = 0 ;
function open_form_generation ( checkup_id , form_generation_type ) {
console . log ( " inside open form generation function checkup id is " + checkup_id );
$ ( " #valid_date " ) . html ( " " );
$ ( " #checkup_id " ) . val ( checkup_id );
$ ( " #form_type " ) . val ( form_generation_type );
$ ( " #checkup_id_O " ) . val ( checkup_id );
$ ( " #form_type_O " ) . val ( form_generation_type );
console . log ( $ ( " #checkup_id " ) . val ( checkup_id ));
console . log ( " inside open form generation function checkup id is " + checkup_id );
$ . ajax ({
async : false ,
url : 'get_medical_examination_patient_details.php' ,
type : 'POST' ,
data : {
checkup_id : checkup_id
},
success : function ( data ) {
var data = $ . parseJSON ( data );
if ( data != null ) {
var gender = " " ;
var gender_call = " " ;
var gender_call_2 = " " ;
// alert(data.gender);
if ( data . gender == 'Female' ) {
gender = 'Female' ;
gender_call = " She " ;
gender_call_2 = " her " ;
} else if ( data . gender == 'Male' ) {
gender = 'Male' ;
gender_call = " He " ;
gender_call_2 = " his "
} else {
gender = 'Others' ;
gender_call = " He/She " ;
gender_call_2 = " his/her " ;
}
var dob = data . dob ;
var dt = new Date ();
var year = dt . getFullYear ();
console . log ( dob , year );
var age = year - dob ;
if ( form_generation_type == 'form_33' ) {
var content = " " ;
if ( function_calling_count > 0 ) {
$ ( " table[id='header_table'] > tbody > tr:first-child " ) . remove ();
$ ( '#table_body > tbody > tr:first' ) . remove ();
//$("#doc_no").html();
}
// $("#doc_no").html(data.document_no);
$ ( " #header_table> tbody > tr:first " ) . before ( " <tr><td >SL NO <b> " + data . serial_no +
" </b></td><td align= \" right \" >Date <b style= \" font-weight:600 \" > " + data . approval_date + " </b> </td></tr> " )
content +=
" <tr><td><p contenteditable= \" true \" >1. Serial number in the register of adult workers: <b> " +
data . serial_no + " </b> </p><br> " ;
content += " <p contenteditable= \" true \" >2. Name of person examined: <b style= \" font-weight:600 \" > " + data
. patient_name + " </b> </p><br> " ;
content += " <p contenteditable= \" true \" >3. Father`s Name: <b style= \" font-weight:600 \" > " + data . father_name + " </b></p><br> " ;
content += " <p contenteditable= \" true \" >4. Sex: <b style= \" font-weight:600 \" > " + data . gender + " </b></p><br> " ;
content += " <p contenteditable= \" true \" >5. Residence: <b style= \" font-weight:600 \" > " + data . village + " , " + data
. post + " , " + data . ps + " </b></p><br> " ;
content += " <p contenteditable= \" true \" >6. Date of birth, if available: <b style= \" font-weight:600 \" > " + data . birth + " </b></p><br> " ;
content +=
" <p contenteditable= \" true \" >7. Name & address of the factory: GUJARAT HEAVY CHEMICAL LTD.,SUTRAPADA, ANURAG NAGAR,GUJARAT </p><br> " ;
content +=
" <p contenteditable= \" true \" >8. The worker is employed/proposed:</p> " ;
content +=
" <p contenteditable= \" true \" > a) Hazardous process:<b style= \" font-weight:600 \" > " + data . hazardous_process + " </b></p> " ;
content +=
" <p contenteditable= \" true \" > b) Dangerous operation:<b style= \" font-weight:600 \" > " + data . dangerous_operation + " </b></p><br> " ;
content += " <p contenteditable= \" true \" >I certify that I have personally examined the above named person whose identification marks are ……… " + data . identi_mark + " ……..and who is desirous of being employed in above mentioned process/operation and that his/her,age, as can be ascertained from my examination, is ……… " + age + " ……years.</p><br> "
content += " <p contenteditable= \" true \" > In my opinion he/she is fit for employment in the Said manufacturing process/operation.</p><br> " ;
let doc_finding = " " ;
if ( data . fit_status == 'ufit' ) {
doc_finding = data . doc_finding ;
}
content += " <p contenteditable= \" true \" >In my opinion he/she is unfit for employment in the said manufacturing process/operation for the reason ……… " + doc_finding + " …………He/She is referred for further examination to the Certifying Surgeon.</p><br> "
content += " <p contenteditable= \" true \" > The serial number of previous certificate is …………………………….................</p></td></tr><br> "
var imageContent = " " ;
var stampContent = " " ;
imageContent = " <img class= \" editable img-responsive \" id= \" avatar \" src= \" data: " +
data . image_type + " ;base64, " + data . emp_sign +
" \" style= \" display: block; width: 180px; height: 25px; \" /> "
function_calling_count ++ ;
$ ( '#header_table tr' ) . eq ( 4 ) . after ( content );
$ ( " #profile-picture " ) . html ( imageContent );
form_generation_for_pdf ( " form_33 " );
} else if ( form_generation_type == 'form_O' ) {
var content = " " ;
if ( function_calling_count_o > 0 ) {
// $("table[id='header_table'] > tbody > tr:first-child").remove();
$ ( '#table_body_form_o>tbody> tr>td' ) . remove ();
//$("#doc_no").html();
}
content += " <tr><td colspan= \" 2 \" align= \" left \" ><p contenteditable= \" true \" >Certificate No: ................</p></td></tr> " ;
content += " <tr><td><p contenteditable= \" true \" > Certified that Shri/Smt.* " + data
. patient_name + " "
content += " employed as .... " + data . designation +
" .... in..................Mine, Form B No. .................. has been examined "
content += " for an initial/periodical medical examination.He/she* appears to be " +
getAge ( new Date ( data . dob )) + " years of age. "
content +=
" The findings of the examining authority are given in the attached sheet. It is considered that Shri/Smt.* .... " + data
. patient_name + " ..... </p></td></tr> "
// if (data.fit_status == 'fit') {
content += " <tr><td><p contenteditable= \" true \" >(a)* is medically fit for any employment in mines</p></td></tr> "
let finding = " " ;
if ( data . fit_status == 'ufit' ) {
finding = data . doc_finding ;
console . log ( finding );
}
content += " <tr><td><p contenteditable= \" true \" >(b)* is suffering from.......... " + finding + " ...................and medically unfit for</p></td></tr> "
content += " <tr><td><p contenteditable= \" true \" > (i) any employment in mines; or</p></td></tr> "
content += " <tr><td><p contenteditable= \" true \" > (ii)any employment below ground; or</p></td></tr> "
content += " <tr><td><p contenteditable= \" true \" > (iii) any employment or work.............................. </p></td></tr> "
finding = " " ;
let checkup_names = " " ;
if ( data . fit_status == 'tfit' ) {
finding = data . doc_finding ;
checkup_names = data . checkup_test_names ;
}
content += " <tr><td><p contenteditable= \" true \" >(c)* is suffering from...... <b> " + finding + " </b> .............. he/she should get this disability* cured/controlled and should be again examined within a period of....................month.He/She will appear for re-examination with the result of test of ..... <b> " + checkup_names + " </b> ............and the opinion of............Specialist from................. . He/She may be permitted/not* permitted to carry on his duties during this period.</p></td></tr> "
$ ( '#table_body_form_o> tbody > tr:first' ) . before ( content );
var imageContent = " " ;
imageContent = " <img class= \" editable img-responsive \" id= \" avatar \" src= \" data: " +
data . image_type + " ;base64, " + data . emp_sign +
" \" style= \" display: block; width: 180px; height: 25px; \" /> "
$ ( " #doctor_name_id " ) . html ( " Doctor Name : " + data . doctor_name );
$ ( " #qualification_id " ) . html ( " Qualification : " + data . qualification );
$ ( " #registration_no_id " ) . html ( " Registration No : " + data . registration_no );
function_calling_count_o ++ ;
$ ( " #profile-picture1 " ) . html ( imageContent );
form_generation_for_pdf ( " form_O " );
} else {
$ . ajax ({
async : false ,
url : 'save_form_32.php' ,
type : 'post' ,
data : {
checkup_id : checkup_id
},
success : function ( data ) {
}
})
}
}
},
error : function ( data ) {}
});
}
function bulk_approve () {
BootstrapDialog . alert ( " Please wait auto approving process will take some time do not press anywhere else " );
checkArr = {};
checkboxArr = [];
console . log ( " getting here in bulk approve " );
document . querySelectorAll ( '.checkbox' ) . forEach (( component ) => {
if ( component . checked ) {
checkboxArr . push ( component . getAttribute ( 'value' ));
let key = component . getAttribute ( 'value' );
checkArr [ key ] = component . getAttribute ( 'data-checkup-code' );
}
});
console . log ( checkboxArr + ' ' + checkArr );
if ( checkboxArr . length == 0 ) {
BootstrapDialog . alert ( " Select some records to approve " );
return false ;
}
showOverlay ();
generateForm ( checkArr ) . then (() => {
$ . ajax ({
type : 'post' ,
url : 'bulk_doc_approval.php' ,
data : {
checkupIds : checkboxArr
},
success : function ( data ) {
if ( data == 400 ) {
BootstrapDialog . alert ( " Something went wrong while approval " );
} else if ( data == 200 ) {
BootstrapDialog . alert ( " Approval Done " );
$ ( " #flex1 " ) . flexReload ();
hideOverlay ();
}
},
error : function ( data ) {
BootstrapDialog . alert ( " Something went wrong while approval " );
}
})
})
. catch (( Error ) => {
BootstrapDialog . alert ( " Something went wrong " + Error );
hideOverlay ();
});
}
function bulk_approve_checkup_type_wise () {
$ ( " #checkup_type_id_approve " ) . val ( " " );
$ ( '#checkup_type_id_approve' ) . select2 ();
$ ( '#modal-select-checkup-type' ) . modal ( " show " );
}
$ ( document ) . ready ( function () {
< ? php if ( $_SESSION [ 'RoleCode' ] == 'DOC' ) { ?>
document . body . getElementsByTagName ( 'th' )[ 0 ] . innerHTML = '<div style="text-align: left; width: 69.552px;"><input type="checkbox" name="selectAll" id="selectAll" onchange></div>'
let element = document . getElementById ( " selectAll " );
element . addEventListener ( 'click' , ( event ) => {
const isChecked = event . target . checked ;
document . querySelectorAll ( '.checkbox' ) . forEach (( component ) => {
component . checked = isChecked ;
});
});
< ? php } ?>
< ? php if ( $_SESSION [ 'RoleCode' ] != 'DOC' ) { ?> document.body.getElementsByClassName('fbutton')[1].style.display = 'none';
< ? php } ?>
});
// function pdf() {
// window.open('ajax_pdf.php', 'OPD-Injury List');
// }
function excel () {
console . log ( " click " );
$ ( " #checkup_type_id_m " ) . val ( " " );
$ ( " #checkup_type_id_m " ) . select2 ();
$ ( " #is_doctor_pending " ) . val ( true );
$ ( " #start_date_excel " ) . val ( " " );
$ ( " #end_date_excel " ) . val ( " " );
$ ( '#modal-select-checkup-type-dd-ss' ) . modal ( " show " );
}
// function upload_excel() {
// window.location = 'upload_excel_medical.php';
// }
// function download_template() {
// window.location = 'templates/Medical Examination Template.xlsx';
// }
// function download_excel() {
// window.location = 'download_excel_medical.php';
// }
function open_checkup ( checkupId , empId , action , checkup_type_id ) {
currentUrl = window . location . href ;
//window.location = 'checkup.php?checkup_id='+checkupId+'';
console . log ( checkupId + ':' + empId + ' ; ' + action + ' : ' + checkup_type_id );
if ( checkupId != null && checkupId != '' ) {
$ ( " #flex_checkup_id " ) . val ( checkupId );
$ ( " #checkup_type_id_db " ) . val ( checkup_type_id );
$ ( " #emp_id_history " ) . val ( empId );
$ ( " #toPage " ) . val ( action );
$ ( " #returnPage " ) . val ( currentUrl );
$ ( " #flex_form_checkup " ) . attr ( 'method' , 'POST' );
$ ( " #flex_form_checkup " ) . attr ( 'action' , 'checkup_from_before.php' );
$ ( " #flex_form_checkup " ) . submit ();
}
}
function open_checkup_full_view ( checkupId , empId , action , checkup_type_id ) {
if ( checkupId != null && checkupId != '' ) {
$ . ajax ({
url : 'medical_data.php' ,
data : {
checkup_id : checkupId ,
empId : empId ,
checkup_type_id : checkup_type_id
},
type : 'POST' ,
success : function ( data ) {
data = JSON . parse ( data );
// alert(data['checkup_form']['checkup_date']);
var contant = '' ;
contant += '<input type="hidden" id="checkup_full_view_id" name="checkup_full_view_id" value="' + checkupId + '"><div class="mainPanel"><div class="panel-group" id="accordion"><div class="panel panel-default"><div class="panel-heading" id="panel-heading1"><span><center><u><b> </b></u> </span></div><div style="font-size:12px ;"><span><u><b style="color:green">PATIENT DETAILS</b></u> </span></div> <div class="panel-body"><div class="row"><table border="0" width="100%" style="margin-bottom:5px"> <tr> <td width="33%" style="font-size:12px;"> <b>Date:</b>' ;
contant += data [ 'checkup_form' ][ 'checkup_date' ];
contant += '</td><td width="33%" style="font-size:11px;"><b>PME No.</b>' ;
contant += data [ 'checkup_form' ][ 'ticket_no' ];
contant += '</td><td style="font-size:11px;"><b>DOJ:</b>' ;
contant += data [ 'checkup_form' ][ 'doj' ];
contant += '</td></tr><tr><td width="33%" style="font-size:11px;"><b>DESIGNATION:</b>' ;
contant += data [ 'checkup_form' ][ 'designation' ];
contant += '</td><td width="33%" style="font-size:11px;"><b>DEPARTMENT:</b>' ;
contant += data [ 'checkup_form' ][ 'dept' ];
contant += '</td><td style="font-size:11px;"><b>DIVISION:</b>' ;
contant += data [ 'checkup_form' ][ 'bu_name' ];
contant += '</td></tr><tr><td width="33%" style="font-size:11px;"><b>TRADE</b>' ;
contant += data [ 'checkup_form' ][ 'doj' ];
contant += '</td><td width="33%" colspan="2" style="font-size:11px;"><b>EMPLOYEE ID</b>' ;
contant += data [ 'checkup_form' ][ 'emp_code' ];
contant += '</td></tr><tr><td width="33%" style="font-size:11px;"><b>NAME OF CANDIDATE:</b>' ;
contant += data [ 'checkup_form' ][ 'patient_name' ];
contant += '</td><td width="33%" style="font-size:11px;"><b>DOB:</b>' ;
contant += data [ 'checkup_form' ][ 'dob' ];
contant += '</td><td style="font-size:11px;"><b>AGE</b>' ;
contant += data [ 'checkup_form' ][ 'age' ];
contant += '</td></tr><tr><td width="42%" style="font-size:11px;"><b>FATHER’ S/HUSBAND’ S NAME:</b>' ;
contant += data [ 'checkup_form' ][ 'father_name' ];
contant += '</td><td width="33%" style="font-size:11px;"><b>GENDER:</b>' ;
contant += data [ 'checkup_form' ][ 'gender' ];
contant += '</td><td style="font-size:11px;"><b>BLOOD GROUP: </b>' ;
contant += data [ 'checkup_form' ][ 'blood_group' ];
contant += ' </td></tr></table><hr>' ;
var i = 0
while ( i < data [ 'sections_count' ]) {
contant += " <table width='100%' style='height: auto;'><tr> " ;
contant += " <td width='50%' style='height: auto;'> " ;
///
var val = data [ 'sections' ][ i ];
if ( val != '' && val != null && val != undefined ) {
contant += " <table width='100%' style='height: auto;'><tr> " ;
contant += " <td width='50%' style='height: auto;'> " ;
contant += '<u><b height="" class="section' + val + '" style=" color:green;font-size: 12px; font-family: ' + " 'Source Sans Pro' " + ', ' + " 'Helvetica Neue' " + ',Helvetica, Arial, sans-serif;margin-top:10px">' ;
contant += data [ 'sections-' + val ];
contant += '</b></u></div><div style="overflow:scroll; height:100px"><table width="100%" class="section' + val + '" style="margin-top: 10px;border-top:solid 1px ;border-bottom:solid 1px;overflow-y:scroll; "><tr style="height:10px;background-color:rgb(163, 191, 253)" ><td style="border-bottom:1px dashed #000000"><b> Test Names </b></td><td style="border-bottom:1px dashed #000000"><b>Result</b></td><td style="border-bottom:1px dashed #000000"><b class="unit' + val + '">Unit</b></td><td style="border-bottom:1px dashed #000000"><b class="range' + val + '">Ref Range</b></td></tr>' ;
for ( var k = 0 ; k < ( data [ val + '_k' ]); k ++ ) {
if ( data [ val + '-' + k + '-value' ] != null && data [ val + '-' + k + '-value' ] != '' ) {
if ( data [ val + '-' + k + '-tital' ] != '' && data [ val + '-' + k + '-tital' ] != null ) {
contant += ' <tr><td colspan="3"><b style=" font-size: 12px; font-weight: 600;"> <b style="font-size: 12px; font-weight: 600;"><u>' ;
contant += data [ val + '-' + k + '-tital' ];
contant += '</u></b></td></tr>' ;
}
contant += '<tr style="border-bottom:1px dashed #c5c3c3" ><td width="18%" style="font-size: 11px;"><b>' +
data [ val + '-' + k + '-param_name' ] + '</b></td> <td width="8%" style="font-size: 10px;color:red' ;
contant += data [ val + '-' + k + '-color' ] + '">' ;
contant += data [ val + '-' + k + '-value' ];
contant += '</td><td width="5%" style="font-size: 10px;' ; //unit
contant += data [ val + '-' + k + '-color' ] + '">' ;
contant += '<span width="10%" style=" font-size: 10px; class="unit' + val + '">' ; //unit
if ( data [ val + '-' + k + '-unit' ] != null && data [ val + '-' + k + '-unit' ] != '' ) {
contant += data [ val + '-' + k + '-unit' ];
}
contant += '</span></td><td width="30%" style="color:blue;padding-top:10px;font-size: 10px;"><span class="range' + val + '">' ;
if ( data [ val + '-' + k + '-range' ] != null && data [ val + '-' + k + '-range' ] != '' ) {
contant += data [ val + '-' + k + '-range' ];
}
contant += '</span></td></tr>' ;
}
}
contant += '</table>' ;
contant += " </td> " ;
i ++ ;
contant += " </tr></table> " ;
}
///
contant += " </td><td width='50%' style='height: auto;'> " ;
///
var val = data [ 'sections' ][ i ];
if ( val != '' && val != null && val != undefined ) {
contant += " <table width='100%' style='height: auto;'><tr> " ;
contant += " <td width='50%' style='height: auto;'> " ;
contant += '<u><b height="" class="section' + val + '" style=" color:green;font-size: 12px; font-family: ' + " 'Source Sans Pro' " + ', ' + " 'Helvetica Neue' " + ',Helvetica, Arial, sans-serif;margin-top:10px">' ;
contant += data [ 'sections-' + val ];
contant += '</b></u></div><div style="overflow:scroll; height:100px"><table width="100%" class="section' + val + '" style="margin-top: 10px;border-top:solid 1px ;border-bottom:solid 1px;overflow-y:scroll; "><tr style="height:10px;background-color:rgb(163, 191, 253)" ><td style="border-bottom:1px dashed #000000"><b> Test Names </b></td><td style="border-bottom:1px dashed #000000"><b>Result</b></td><td style="border-bottom:1px dashed #000000"><b class="unit' + val + '">Unit</b></td><td style="border-bottom:1px dashed #000000"><b class="range' + val + '">Ref Range</b></td></tr>' ;
for ( var k = 0 ; k < ( data [ val + '_k' ]); k ++ ) {
if ( data [ val + '-' + k + '-value' ] != null && data [ val + '-' + k + '-value' ] != '' ) {
if ( data [ val + '-' + k + '-tital' ] != '' && data [ val + '-' + k + '-tital' ] != null ) {
contant += ' <tr><td colspan="3"><b style=" font-size: 12px; font-weight: 600;"> <b style="font-size: 12px; font-weight: 600;"><u>' ;
contant += data [ val + '-' + k + '-tital' ];
contant += '</u></b></td></tr>' ;
}
contant += '<tr style="border-bottom:1px dashed #c5c3c3" ><td width="18%" style="font-size: 11px;"><b>' +
data [ val + '-' + k + '-param_name' ] + '</b></td> <td width="8%" style="font-size: 10px;color:red' ;
contant += data [ val + '-' + k + '-color' ] + '">' ;
contant += data [ val + '-' + k + '-value' ];
contant += '</td><td width="5%" style="font-size: 10px;' ; //unit
contant += data [ val + '-' + k + '-color' ] + '">' ;
contant += '<span width="10%" style=" font-size: 10px; class="unit' + val + '">' ; //unit
if ( data [ val + '-' + k + '-unit' ] != null && data [ val + '-' + k + '-unit' ] != '' ) {
contant += data [ val + '-' + k + '-unit' ];
}
contant += '</span></td><td width="30%" style="color:blue;padding-top:10px;font-size: 10px;"><span class="range' + val + '">' ;
if ( data [ val + '-' + k + '-range' ] != null && data [ val + '-' + k + '-range' ] != '' ) {
contant += data [ val + '-' + k + '-range' ];
}
contant += '</span></td></tr>' ;
}
}
contant += '</table>' ;
contant += " </td> " ;
i ++ ;
contant += " </tr></table> " ;
}
///
contant += " </td></tr></table> " ;
}
$ ( '#medical_full_view' ) . html ( contant );
$ ( '#fit_state' ) . val ( data [ 'checkup_form' ][ 'fit_unfit_status' ]);
$ ( '#program_id' ) . val ( data [ 'checkup_form' ][ 'program_id' ]);
$ ( '#program_id' ) . trigger ( 'chosen:updated' );
$ ( '#attendedStatus' ) . val ( data [ 'checkup_form' ][ 'attendedStatus' ]);
$ ( '#approve_date' ) . val ( data [ 'checkup_form' ][ 'approve_date' ]);
if ( data [ 'checkup_form' ][ 'program_status' ] != " " && data [ 'checkup_form' ][ 'program_status' ] != null ) {
$ ( 'input:radio[id=program_status][value=' + data [ 'checkup_form' ][ 'program_status' ] + ']' ) . prop ( 'checked' , true );
}
$ ( '#doc_findings' ) . val ( data [ 'checkup_form' ][ 'doc_findings' ]);
$ ( '#doc_comments' ) . val ( data [ 'checkup_form' ][ 'doc_comments' ]);
$ ( '.select2' ) . select2 ();
$ ( '#modal-indent-status' ) . modal ( " show " );
},
error : function ( data ) {
BootstrapDialog . alert ( " Something Went Wrong Try Again after a while ! " );
}
});
}
}
function open_medical_examination_form ( medical_exam_id , patient_id , task ) {
if ( medical_exam_id != null && medical_exam_id != '' && patient_id != null && patient_id != '' ) {
$ ( " #medical_exam_id " ) . val ( medical_exam_id );
$ ( " #flex_medical_form " ) . attr ( 'method' , 'POST' );
if ( task == 'pme' ) {
$ ( " #flex_medical_form " ) . attr ( 'action' , 'add_patient_physical_parameters_pme.php' );
} else if ( task == 'ime_short' ) {
$ ( " #flex_medical_form " ) . attr ( 'action' , 'add_patient_physical_parameters_ime_short_term.php' );
} else if ( task == 'annual' ) {
$ ( " #flex_medical_form " ) . attr ( 'action' , 'add_initial_medical_examination_longterm.php' );
} else if ( task == 'semi_annual' ) {
$ ( " #flex_medical_form " ) . attr ( 'action' , 'add_patient_physical_parameters_ame_below_40.php' );
}
if ( task == 'ime_long' || task == 'pre_employment' ) {
$ ( " #flex_medical_form " ) . attr ( 'action' , 'add_patient_physical_parameters.php' );
}
$ ( " #flex_medical_form " ) . submit ();
}
}
</ script >
< ? php
include ( 'form/checkup_type_modal.php' );
?>
< ? php include ( 'form/medical_full_view.php' ); ?>
2025-02-21 11:45:27 +05:30
< ? php
// include_once('full_view_medical.php');
?>
2024-10-16 19:18:52 +05:30
< ? php include_once ( 'select_checkup_type_s.php' ); ?>
< ? php include_once ( 'form/form_o.php' ); ?>
< ? php include_once ( 'form/form_33.php' ); ?>
< ? php include ( 'techsyn_footer.php' ); ?>