} else { if ($type == "C") { $consultation_fee = $encounter['article']; } } } $type = "C"; } } include_once $root_path . 'include/inc_date_format_functions.php'; /* Update History */ if (!$newdata) { $encounter_obj->setHistorySeen($_SESSION['sess_user_name'], $encounter_nr); } /* Get insurance firm name*/ $insurance_firm_name = $insurance_obj->getFirmName($insurance_firm_id); /* Check whether config path exists, else use default path */ $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $default_photo_path; /* Prepare text and resolve the numbers */ require_once $root_path . 'include/inc_patient_encounter_type.php'; /* Save encounter nrs to session */ $_SESSION['sess_pid'] = $pid; $_SESSION['sess_en'] = $encounter_nr; $_SESSION['sess_full_en'] = $full_en; $_SESSION['sess_parent_mod'] = 'admission'; $_SESSION['sess_user_origin'] = 'admission'; $_SESSION['sess_file_return'] = $thisfile; /* Prepare the photo filename */ require_once $root_path . 'include/inc_photo_filename_resolve.php'; $user = $_COOKIE[$local_user . $sid]; # Start Smarty templating here
$data[] = array($encounter['blood_group'], ar2uni("{$LDBloodGroup} :")); $data[] = array(ar2uni($eclass), ar2uni("{$LDAdmitType} :")); if ($encounter['encounter_class_nr'] == 1) { $data[] = array(ar2uni($current_ward_name), ar2uni("{$LDWard} :")); } else { $data[] = array(ar2uni($current_dept_name), ar2uni("{$LDDepartment} :")); } $data[] = array(''); $data[] = array(ar2uni($encounter['referrer_diagnosis']), ar2uni("{$LDDiagnosis} :")); $data[] = array(ar2uni($encounter['referrer_dr']), ar2uni("{$LDRecBy} :")); $data[] = array(ar2uni($encounter['referrer_recom_therapy']), ar2uni("{$LDTherapy} :")); $data[] = array(ar2uni($encounter['referrer_notes']), ar2uni("{$LDSpecials} :")); $data[] = array(''); $data[] = array(ar2uni($insclass), ar2uni("{$LDBillType} :")); $data[] = array($encounter['insurance_nr'], ar2uni("{$LDInsuranceNr} :")); $data[] = array(ar2uni($insurance_obj->getFirmName($encounter['insurance_firm_id'])), ar2uni("{$LDInsuranceCo} :")); $data[] = array(''); $data[] = array(ar2uni($encounter['create_id']), ar2uni("{$LDAdmitBy} :")); $pdf->ezTable($data, '', '', array('xPos' => 'right', 'xOrientation' => 'left', 'showLines' => 0, 'fontSize' => $report_textsize, 'showHeadings' => 0, 'shaded' => 0, 'cols' => array(0 => array('justification' => 'right')))); } else { # Load the page header #1 require '../std_plates/pageheader1.php'; # Load the patient data plate #1 require '../std_plates/patientdata1.php'; $data = NULL; # make empty line //$y=$pdf->ezText("\n",14); //$data[]=array($LDPatientData); //$pdf->ezTable($data,'','',array('xPos'=>'left','xOrientation'=>'right','showLines'=>0,'fontSize'=>$report_titlesize,'showHeadings'=>0,'shaded'=>2,'shadeCol2'=>array(0.9,0.9,0.9),'width'=>555)); # make empty line $y = $pdf->ezText("\n", 14);
# Encounter admission date ImageTTFText($label, 11, 0, $lmargin, $tmargin + 30, $eblack, $arial, $result['pdate']); # Family name, first name ImageTTFText($label, 16, 0, $lmargin, $tmargin + 56, $eblack, $arial, ar2uni($result['name_last']) . ', ' . ar2uni($result['name_first'])); # Date of birth ImageTTFText($label, 11, 0, $lmargin, $tmargin + 74, $eblack, $arial, $result['date_birth']); # Address street nr, street name ImageTTFText($label, 11, 0, $lmargin, $tmargin + 93, $eblack, $arial, ucfirst(ar2uni($result['addr_str'])) . ' ' . $result['addr_str_nr']); # Address, zip, city/town name ImageTTFText($label, 11, 0, $lmargin, $tmargin + 108, $eblack, $arial, ucfirst(ar2uni($result['addr_zip'])) . ' ' . ar2uni($result['name'])); # Sex ImageTTFText($label, 14, 0, $lmargin, $tmargin + 130, $eblack, $arial, strtoupper($result['sex'])); # Family name, repeat print ImageTTFText($label, 14, 0, $lmargin + 30, $tmargin + 130, $eblack, $arial, ar2uni($result['name_last'])); # Insurance co name ImageTTFText($label, 14, 0, $lmargin, $tmargin + 150, $eblack, $arial, $ins_obj->getFirmName($result['insurance_firm_id'])); # Location ImageTTFText($label, 9, 0, $lmargin, $tmargin + 170, $eblack, $arial, ar2uni($locstr)); #Blood group if (stristr('AB', $result['blood_group'])) { ImageTTFText($label, 24, 0, $lmargin + 240, $tmargin + 127, $eblack, $arial, $result['blood_group']); } else { ImageTTFText($label, 24, 0, $lmargin + 245, $tmargin + 127, $eblack, $arial, $result['blood_group']); } // place the barcode img if ($bc) { ImageCopy($label, $bc, 110, 4, 9, 9, 170, 37); } if (!$child_img) { Imagepng($label); // *******************************************************************