ESH/download_excel_medical.php
2024-10-23 18:28:06 +05:30

321 lines
16 KiB
PHP

<?php
header("Content-type:application/octet-stream");
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=excel_medical_list.xls");
header("Pragma: no-cache");
header("Expires: 0");
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
?>
<?php
include('includes/config/config.php');
include('includes/functions.php')
//include('pop_up_top.php');
?>
<table border="1" width="100%">
<?php
$ohc_type=$_SESSION['current_ohcttype'];
$sql="SELECT a.*,b.patient_name,b.emp_code,b.dob,b.gender,b.aadhar_no,c.designation_name,d.dept_name FROM `medical_examination` a INNER JOIN patient_master b ON a.patient_id = b.id inner join designation c ON c.designation_id=b.designation_id inner join department d ON d.dept_id=b.dept_id WHERE ohc_location_id ='$ohc_type'";
//error_log(query:);
// echo $sql;
//$sql = base64_decode($filterkey);
$result = mysqli_query($conn,$sql);
// echo $result;
?><tr>
<td bgcolor="#eeeeee" valign="top" width="15%">EmpCode</td>
<td bgcolor="#eeeeee" valign="top" width="10%">Medical Type</td>
<td bgcolor="#eeeeee" valign="top" align="left" width="30%">Patient name</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">Designation</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">Department</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">Aadhar No</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">Asthama</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">Diabetes</td>
<td bgcolor="#eeeeee" width="5%" valign="top" align="left">T.B</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Hbd</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Epilepsy</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Medical Date</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Illness</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Heart Deases</td>
<td bgcolor="#eeeeee" valign="top" width="15%" align="left">Typhoid</td>
<td bgcolor="#eeeeee" valign="top" width="15%" align="left">Major Injury</td>
<td bgcolor="#eeeeee" valign="top" width="20%" align="left">DOB</td>
<td bgcolor="#eeeeee" valign="top" width="20%" align="left">Gender</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Height</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Weight</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Pulse</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">BP</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Waist</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Hip</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="center">Nails</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="center">S1</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="center">S2</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Any Other Sound</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Ecg Findings</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Near with Right Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Tmt Findings</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Near Without Right Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dis With Right Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dis Without Right Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dis Without Left Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dis With Left Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Near Without Left Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Near With Left Eye</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Skin</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Color Vision</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">RS</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Musculo Skeletal</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Cns</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">ENT</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Chest Radiograph</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Urine Re Me</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Stool Re Me</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fvc Pre</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fvc Post</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fev1 Pre</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fev1 Post</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fev1 Fvc Post</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Peak Expiratory Flow Pre</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Peak Expiratory Flow Post</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Air Cond Left</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Air Cond Right</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Bone Cond Left</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Bone Cond Right</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">HB</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">TLC</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dlc_n</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dlc_l</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dlc_m</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dlc_e</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Platelets</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">S_Urea</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">S_Creatinine</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Blood_Sugar</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">ESR</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Bun</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Uric Acid</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">PSA</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Lipid Profile</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Live Function Test</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Thyroid Profile</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Dental Exam Report</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Mammography</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Conversational Hearing</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Pap Smear</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Any Other</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Auroscopy</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Throat</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Nose</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">EAC</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Liver</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Speen</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Tenderness</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Any Other Abnormality</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Appearance</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Pus Cells</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Rbcs</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Epithelial Cells</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Other Relevant Findings</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Albumin</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Sugar</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Blood Group</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Pallor</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">CVS</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Ident of Individual Colors</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Physical Status</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Abdomen</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Medical Assistant</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Opinion Remarks</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Vdrl</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Speech</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Higher Function</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Motor Function</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Vertigo</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Reflexes</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Vibration Syndrome</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">PPO</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Grade</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Any Other Eye Disease</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Hydrocele</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Phimosis</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Piles</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fistula</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Fvc</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Hiv</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Smoking</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Tobacco</td>
<td bgcolor="#eeeeee" valign="top" width="10%" align="left">Alcohol</td>
</tr>
<?php
error_reporting(E_ERROR | E_PARSE);
while ($row = mysqli_fetch_array($result)) {
?><tr>
<td><?php echo $row['emp_code']?></td>
<td><?php echo $row['task']?></td>
<td><?php echo $row['patient_name']?></td>
<td><?php echo $row['designation_name']?></td>
<td><?php echo $row['dept_name']?></td>
<td><?php echo $row['aadhar_no']?></td>
<td><?php echo ($row['asthma']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['diabetes']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['tb']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['hbd']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['epilepsy']=='1')?("Yes"):("No")?></td>
<td><?php echo $row['medical_entry_date']?></td>
<td><?php echo ($row['psychiatric']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['heart_dis']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['typhoid']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['major_injury']=='1')?("Yes"):("No")?></td>
<td><?php echo $row['dob']?></td>
<td><?php echo $row['gender']?></td>
<td><?php echo $row['height']?></td>
<td><?php echo $row['weight']?></td>
<td><?php echo $row['pulse']?></td>
<td><?php echo $row['bp']?></td>
<td><?php echo $row['waist']?></td>
<td><?php echo $row['hip']?></td>
<td><?php echo $row['nails']?></td>
<td><?php echo $row['s1']?></td>
<td><?php echo $row['s2']?></td>
<td><?php echo $row['any_other_sound']?></td>
<td><?php echo $row['ecg_findings']?></td>
<td><?php echo $row['near_with_right_eye']?></td>
<td><?php echo $row['tmt_findings']?></td>
<td><?php echo $row['near_without_right_eye']?></td>
<td><?php echo $row['dis_with_right_eye']?></td>
<td><?php echo $row['dis_without_right_eye']?></td>
<td><?php echo $row['dis_without_left_eye']?></td>
<td><?php echo $row['dis_with_left_eye']?></td>
<td><?php echo $row['near_without_left_eye']?></td>
<td><?php echo $row['near_with_left_eye']?></td>
<td><?php echo $row['skin']?></td>
<td><?php echo $row['color_vision']?></td>
<td><?php echo $row['rs']?></td>
<td><?php echo $row['musculo_skeletal']?></td>
<td><?php echo $row['cns']?></td>
<td><?php echo $row['ent']?></td>
<td><?php echo $row['chest_radiograph']?></td>
<td><?php echo $row['urine_re_me']?></td>
<td><?php echo $row['stool_re_me']?></td>
<td><?php echo $row['fvc_pre']?></td>
<td><?php echo $row['fvc_post']?></td>
<td><?php echo $row['fev1_pre']?></td>
<td><?php echo $row['fev1_post']?></td>
<td><?php echo $row['fev1_fvc_post']?></td>
<td><?php echo $row['fev1_fvc_pre']?></td>
<td><?php echo $row['peak_expiratory_flow_pre']?></td>
<td><?php echo $row['peak_expiratory_flow_post']?></td>
<td><?php echo $row['air_cond_left']?></td>
<td><?php echo $row['air_cond_right']?></td>
<td><?php echo $row['bone_cond_left']?></td>
<td><?php echo $row['bone_cond_right']?></td>
<td><?php echo $row['hb']?></td>
<td><?php echo $row['tlc']?></td>
<td><?php echo $row['dlc_n']?></td>
<td><?php echo $row['dlc_l']?></td>
<td><?php echo $row['dlc_m ']?></td>
<td><?php echo $row['dlc_e']?></td>
<td><?php echo $row['platelets']?></td>
<td><?php echo $row['s_urea']?></td>
<td><?php echo $row['s_creatinine']?></td>
<td><?php echo $row['blood_sugar']?></td>
<td><?php echo $row['esr']?></td>
<td><?php echo $row['bun']?></td>
<td><?php echo $row['uric_acid']?></td>
<td><?php echo $row['psa']?></td>
<td><?php echo $row['lipid_profile']?></td
<td><?php echo $row['live_function_test']?></td>
<td><?php echo $row['thyroid_profile']?></td>
<td><?php echo $row['dental_exam_report']?></td>
<td><?php echo $row['mammography']?></td>
<td><?php echo $row['conversational_hearing']?></td>
<td><?php echo $row['pap_smear']?></td>
<td><?php echo $row['any_other']?></td>
<td><?php echo $row['auroscopy']?></td>
<td><?php echo $row['throat']?></td>
<td><?php echo $row['nose']?></td>
<td><?php echo $row['eac']?></td>
<td><?php echo $row['liver']?></td>
<td><?php echo $row['speen']?></td>
<td><?php echo $row['tenderness']?></td>
<td><?php echo $row['any_other_abnormality']?></td>
<td><?php echo $row['appearance']?></td>
<td><?php echo $row['pus_cells']?></td>
<td><?php echo $row['rbcs']?></td>
<td><?php echo $row['epithelial_cells']?></td>
<td><?php echo $row['other_relevant_findings']?></td>
<td><?php echo $row['albumin']?></td>
<td><?php echo $row['sugar']?></td>
<td><?php echo $row['blood_group']?></td>
<td><?php echo $row['pallor']?></td>
<td><?php echo $row['cvs']?></td>
<td><?php echo $row['ident_of_individual_colors']?></td>
<td><?php echo $row['physical_status']?></td>
<td><?php echo $row['abdomen']?></td>
<td><?php echo $row['opinion_remarks_medical_assistant']?></td>
<td><?php echo $row['opinion_remarks']?></td>
<td><?php echo $row['vdrl']?></td>
<td><?php echo $row['speech']?></td>
<td><?php echo $row['higher_function']?></td>
<td><?php echo $row['motor_function']?></td>
<td><?php echo $row['vertigo']?></td>
<td><?php echo $row['reflexes']?></td>
<td><?php echo $row['vibration_syndrome']?></td>
<td><?php echo $row['ppo']?></td>
<td><?php echo $row['grade']?></td>
<td><?php echo $row['any_other_eye_disease']?></td>
<td><?php echo $row['hydrocele']?></td>
<td><?php echo $row['phimosis']?></td>
<td><?php echo $row['piles']?></td>
<td><?php echo $row['fistula']?></td>
<td><?php echo $row['fvc']?></td>
<td><?php echo ($row['smoking']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['tobacco']=='1')?("Yes"):("No")?></td>
<td><?php echo ($row['alcohol']=='1')?("Yes"):("No")?></td>
</tr><?php
}
?>
</table>
<?php
//include('pdf_footer.php');
?>