setLanguageArray($lg); // --------------------------------------------------------- // set font $pdf->SetFont('freesans', '', 12); // add a page $pdf->AddPage(); // Hindi content include('includes/config/config.php'); include_once("includes/functions.php"); error_reporting(0); while (ob_get_level()) ob_end_clean(); header("Content-Encoding: None", true); $sql_patient_physical_parameters="select a.*,b.*,c.*,a.height,a.weight,a.waist,a.bp,e.file_name, e.emp_sign as sign, e.qualification,e.registration_no,e.emp_id as sign_id, f.company_name, f.company_logo, f.image_type from company_profile f, medical_examination a inner join patient_master b on b.id=a.patient_id left join designation c on b.designation_id=c.designation_id left join tbl_users d on d.user_id=a.approved_by left join employee_signature e on d.emp_id=e.emp_id where a.medical_exam_id='".$_REQUEST['medical_exam_id']."' "; //echo $sql_patient_physical_parameters; $result_patient_physical_parameters= mysqli_query($conn,$sql_patient_physical_parameters); $row_patient_physical_parameters= mysqli_fetch_assoc($result_patient_physical_parameters); @extract($row_patient_physical_parameters); $doc_emp_id = getFieldfromTable ( 'emp_id', 'tbl_users', 'user_id', $sign_medical_officer ); $doctor_name = getFieldfromTable ( 'patient_name', 'patient_master', 'id', $doc_emp_id ); $pdf->setCellPaddings( $left = '2px', $top = '2px', $right = '2px', $bottom = '2px'); $path = 'images/'; $filename = $company_name; $filepath = $path.$filename; // If a physical file is not available then create it // If the DB data is fresher than the file then make a new file $result = file_put_contents($filepath, $company_logo); if($result === FALSE) { die(__FILE__.'
Error - Line #'.__LINE__.': Could not create '.$filepath); } $pdf->Image($filepath,12, 12, 40, 30, '', '', '', false, 150, '', false, false, 0, false, false, false ); $html = << .tbl1{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; } .tbl1 td{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; padding: 1px; }
MAIHAR IU Department OCCUPATIONAL HEALTH CENTRE
Document No. F-MED-09
Revision 0.0
Implementation Date 01.04.2016
Initial Medical Examination Card (LongTerm)
EOD; $pdf->WriteHTML($html, true, 0, true, 0); $medical_entry_date=strtoupper(date_format(date_create($row_patient_physical_parameters['medical_entry_date']),"d-M-Y ")); $dob=strtoupper(date_format(date_create($row_patient_physical_parameters['dob']),"d-M-Y ")); $address='VILL-'.$village.',POST-'.$post.',PS-'.$ps.',TEHSIL-'.$tehsil.',DIST-'.$district.',STATE-'.$state.'(PINCODE-'.$pin_code.')'; $from = new DateTime($dob); $to = new DateTime('today'); $age= $from->diff($to)->y; if($gender=='M') $gender="Male"; elseif ($gender=='F') $gender="Female"; $txt = << .tbl1{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; } .tbl1 td{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; padding: 1px; } EOD; $past_present_illness_array = explode(',', $past_present_illness); $result_section = mysqli_query($conn,"SET NAMES utf8"); $sql_section = "select * from history_parameter where param_id in (1,2,3,4,5,7,9,11) order by param_id asc"; $count=1; $result_section = mysqli_query($conn,$sql_section); while ($row_section = mysqli_fetch_assoc($result_section)) { $check=""; if(in_array($row_section['param_id'],$past_present_illness_array)) $check="√"; else $check="X"; if($count%2!=0){ $txt.=<< EOD; } $txt.=<< {$row_section['param_name']} ({$row_section['param_name_hindi']}) {$check} EOD; if($count%2==0){ $txt.=<< EOD; } $count++; } $txt.=<< EOD; $sql_past_occupational_history=" select * from past_occupational_history where medical_exam_id='".$_REQUEST['medical_exam_id']."' "; $result_past_occupational_history = mysqli_query($conn,$sql_past_occupational_history); if(mysqli_num_rows($result_past_occupational_history)>0){ while($row_past_occupational_history= mysqli_fetch_assoc($result_past_occupational_history)){ $txt.=<< EOD; } }else{ $txt.=<< EOD; } $txt.=<< EOD; $sql_patient_personal_info=" select * from patient_personal_information where medical_exam_id='".$_REQUEST['medical_exam_id']."' "; $result_patient_personal_info = mysqli_query($conn,$sql_patient_personal_info); $row_patient_personal_info= mysqli_fetch_assoc($result_patient_personal_info); @extract($row_patient_personal_info); $date_of_exam=strtoupper(date_format(date_create($row_patient_personal_info['date_of_exam']),"d-M-Y ")); $txt.=<<
SR.NO. {$serial_no}
NAME {$patient_name}
FATHER NAME {$father_name}
AGE/SEX {$age} {$gender}
ADDRESS {$address}
GRADE/POST {$designation_name}
MOBILE.NO. {$primary_phone}
GATE PASS NO./P NO {$emp_code} DATE {$medical_entry_date}
TO BE FILLED IN BY THE CANDIDATE
9.HISTORY PAST AND PRESENT ILLNESS [ if YES write √ if NO write X ]
10. PAST OCCUPATIONAL HISTORY
NAME OF ORGANIZATION TRADE/DESIGNATION PERIOD OF SERVICE- IN YEARS PAST OCCUPATIONAL ILLNESS
{$row_past_occupational_history['org_name']} {$row_past_occupational_history['trade_designation']} {$row_past_occupational_history['period_services']} {$row_past_occupational_history['past_occu_illness']}
11.PERSONAL INFORMATION
I. DATE OF BIRTH {$dob}
II. IDENTIFICATION MARK {$identi_mark}
III. DATE OF EXAMINATION {$date_of_exam}
IV. MARRIED/UNMARRIED {$marital_status}
V. NO. OF CHILDREN {$no_of_child}
VI. WHETHER ADOPTING ANY METHOD OF FAMILY PLANNING {$adopting_family_planning}
VII. SMOKING / TOBACCO / ALCOHOL {$addiction}
EOD; $pdf->writeHTML($txt, true, false, false, false, ''); // --------------------------------------------------------- $pdf->AddPage(); $query_for_doctor="select UPPER(patient_name) as patient_name from patient_master where id=$sign_id "; $result_for_doctor = @mysqli_query($conn,$query_for_doctor); $row_for_doctor = @mysqli_fetch_array($result_for_doctor); @extract($row_for_doctor); $txt1.=<< .tbl1{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; } .tbl1 td{ font-size:8px; border: 1px solid black; border-collapse: collapse; font-weight:1200; padding: 1px; }


12.DECLARARTION:

CERTIFIED THAT THE PARTICULARS GIVEN BY ME IN THE FOREGOING ABOVE ARE TRUE, COMPLETE AND CORRECT TO THE BEST OF MY KNOWLEDGE AND BELIEF. IF ANY OF THIS INFORMATION IS FOUND TO BE FALSE/INCOMPLETE/ INCORRECT, ONLY I SHALL BE RESPONSIBLE FOR IT AND COMPANY HAVE FULL RIGHT TO CANCEL MY APPOINTMENT OR TERMINATE MY SERVICE CONTRACT.

मैं अपने पूरे होशोहवाश में यह प्रमाणित करता हूँ कि मेरे द्वारा दी गयी उपरोक्त समस्त जानकारी पूर्णत सही है, अगर मेरे द्वारा दी गयी कोई जानकारी गलत पाई जाती है तो उसके लिए पूर्णत मैं जिम्मेदार हूं एवं कंपनी को यह अधिकार है कि वो मुझे नौकरी में न रखे अथवा मेरी सेवाओं को समाप्त कर दे

SIGNATURE/LEFT THUMB IMPRESSION OF CANDIDATE


{$date_of_exam}
DATE
RECORD OF MEDICAL EXAMINATION
Height(cms){$height} WAIST(cms){$waist} CLINICAL EXAMINATION
WEIGHT(kgs){$weight} HIP(cms){$hip} NAILS{$nails}
BMI(cms){$bmi} PULSE{$pulse}
VISION BP{$bp}  MM OF HG
RT.EYE LT.EYE ABDOMEN
DISTANT VISIONWITHOUT GLASSES 6/{$dis_without_right_eye}6/{$dis_without_left_eye} LIVER {$liver }
WITH GLASSES 6/{$dis_with_right_eye}6/{$dis_with_left_eye} Speen {$speen }
NEAR VISIONWITHOUT GLASSES N/{$near_without_right_eye}N/{$near_without_left_eye} TENDERNESS {$tenderness }
WITH GLASSES N/{$near_with_right_eye}N/{$near_with_right_eye} ANY OTHER ABNORMALITY {$any_other_abnormality }
SKIN {$skin }
COLOR VISION {$color_vision } RS {$rs }
CVS MUSCULO SKELETAL {$musculo_skeletal }
S1 {$s1} S2 {$s2} CNS {$cns }
ANY OTHER SOUND {$any_other_sound} ECG (12 LEAD) FINDINGS {$ecg_findings} ENT
2D ECHO/TMT FINDINGS {$tmt_findings} Conversational Hearing {$conversational_hearing }
AUROSCOPY {$auroscopy }
EAC {$eac }
NOSE {$nose }
THROAT {$throat }
14. ILO CLASSIFICATION OF CHEST RADIOGRAPH (Enclosed Chest Radiograph)
PROFUSION OF PNEUMOCONIOTIC OPACITIES GRADES Types
{$profusion_opacities} {$grade} {$type}
RESULT OF SPIROMETRY (REPORT ENCLOSED)
PARAMETERS PREDICTED VALUE PERFORMED VALUE % OF PREDICTED
FORCED VITAL CAPACITY (FVC) {$fvc_pre} {$fvc_post} {$fvc}
FORCED EXPIRATORY VOLUME IN 1 SEC (FEV1) {$fev1_pre} {$fev1_post} {$fev1}
FEV1/FVC {$fev1_fvc_pre} {$fev1_fvc_post} {$fev1_fvc}
PEAK EXPIRATORY FLOW {$peak_expiratory_flow_pre} {$peak_expiratory_flow_post} {$peak_expiratory_flow}
AUDIOMETRY FINDINGS ( REPORT ENCLOSED)
CONDUCTION TYPE LEFT EAR RIGHT EAR
AIR CONDUCTION {$air_cond_left} {$air_cond_right}
BONE CONDUCTION {$bone_cond_left} {$bone_cond_left}
INVESTIGATIONS
BLOOD GROUP {$blood_group}
HB {$hb} TLC{$tlc} DLC-N{$dlc_n}
DLC-L{$dlc_l} DLC-M{$dlc_m} DLC-E{$dlc_e}
ESR{$esr} S. UREA{$s_urea} S.CREATININE{$s_creatinine}
BLOOD SUGAR {$blood_sugar} VDRL{$vdrl} HBSAG {$hbsag}
HIV {$hiv} LIPID PROFILE{$lipid_profile}
URINE RE/ME
APPEARANCE{$appearance} PUS CELLS{$pus_cells} RBCS{$rbcs}
EPITHELIAL CELLS{$epithelial_cells} OTHER RELEVANT FINDINGS {$other_relevant_findings} ALBUMIN {$albumin}
SUGAR{$sugar}
STOOL RE/ME{$stool_re_me}
OPINION OF THE MO{$opinion_mo}
REMARKS BY MEDICAL ASSISTANT{$opinion_remarks_medical_assistant}
REMARKS BY DOCTOR{$opinion_remarks}





SIGNATURE OF MEDICAL OFFICER
(WITH STAMP)

DOCTOR NAME{$doctor_name}
QUALIFICATION{$approving_doc_qualification}
REGISTRATION NO{$approving_doc_regd_no}
EOD; $pdf->writeHTML($txt1, true, false, false, false, ''); // $path = 'images/'; // $filename = $file_name; // $filepath = $path.$filename; error_log("paathhhhhh".$filepath); // If a physical file is not available then create it // If the DB data is fresher than the file then make a new file if(!is_file($filepath) || strtotime($row['last_update']) > filemtime($filepath)) { $result = file_put_contents('', $row_patient_physical_parameters['approving_doc_sign_img']); error_log("imagggggggge".$row_patient_physical_parameters['approving_doc_sign_img']); if($result === FALSE) { // die(__FILE__.'
Error - Line #'.__LINE__.': Could not create '.$filepath); } } $pdf->Image('',114, 206, 30, 10, '', '', '', false, 150, '', false, false, 0, false, false, false ); ob_end_clean(); //Close and output PDF document $pdf->Output('example_018.pdf', 'I'); ?>