} else { if (!$p_insurance->RecordCount()) { $insurance_show = true; } elseif ($p_insurance->RecordCount() == 1) { $buffer = $p_insurance->FetchRow(); extract($buffer); //while(list($x,$v)=each($buffer)) {$$x=$v; } $insurance_show = true; # Get insurace firm name $insurance_firm_name = $insurance_obj->getFirmName($insurance_firm_id); } else { $insurance_show = false; } } } $insurance_class = $insurance_obj->getInsuranceClassInfo($insurance_class_nr); # Resolve the insurance class name if (isset(${$insurance_class}['LD_var']) && !empty(${$insurance_class}['LD_var'])) { $insclass = ${$insurance_class}['LD_var']; } else { $insclass = $insurance_class['name']; } # Get the global config for person´s registration form*/ require_once $root_path . 'include/care_api_classes/class_globalconfig.php'; $GLOBAL_CONFIG = array(); $glob_obj = new GlobalConfig($GLOBAL_CONFIG); $glob_obj->getConfig('person_%'); require_once $root_path . 'include/care_api_classes/class_insurance.php'; $insurance_obj = new Insurance(); $classpath = $root_path . 'classes/phppdf/'; $fontpath = $classpath . 'fonts/';
/** * Displays the GUI showing the data */ function display($pid) { global $root_path, $dbf_nodate, $newdata; $validdata = TRUE; if (!empty($pid)) { $this->pid = $pid; } # Load the language tables $lang_tables = $this->langfile; include $root_path . 'include/inc_load_lang_tables.php'; include_once $root_path . 'include/inc_date_format_functions.php'; include_once $root_path . 'include/care_api_classes/class_insurance.php'; $pinsure_obj = new PersonInsurance($this->pid); # Get the global config for person�s registration form include_once $root_path . 'include/care_api_classes/class_globalconfig.php'; $GLOBAL_CONFIG = array(); $glob_obj = new GlobalConfig($GLOBAL_CONFIG); $glob_obj->getConfig('person_%'); //extract($GLOBAL_CONFIG); if (empty($this->pid)) { $validdata = FALSE; } else { //if($data_obj=&$this->person_obj->getAllInfoObject()){ // $this->data=$data_obj->FetchRow(); if ($this->is_loaded) { extract($this->data); # Get related insurance data $p_insurance =& $pinsure_obj->getPersonInsuranceObject($this->pid); if ($p_insurance == FALSE) { $insurance_show = true; } else { if (!$p_insurance->RecordCount()) { $insurance_show = true; } elseif ($p_insurance->RecordCount() == 1) { $buffer = $p_insurance->FetchRow(); extract($buffer); $insurance_show = true; # Get insurace firm name $insurance_firm_name = $pinsure_obj->getFirmName($insurance_firm_id); } else { $insurance_show = FALSE; } } $insurance_class_info = $pinsure_obj->getInsuranceClassInfo($insurance_class_nr); # Check if person is currently admitted $this->current_encounter = $this->person_obj->CurrentEncounter($this->pid); # update the record�s history if (empty($newdata)) { @$this->person_obj->setHistorySeen($_SESSION['sess_user_name']); } # Check whether config foto path exists, else use default path $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path; } else { $validdata = FALSE; } } if ($validdata) { include_once $root_path . 'include/inc_photo_filename_resolve.php'; ############ Here starts the GUI output ################## # load config options include_once $root_path . 'include/care_api_classes/class_multi.php'; $multi = new multi(); ?> <table border=0 cellspacing=1 cellpadding=3> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"><?php echo $LDRegistryNr; ?> : </td> <td width="30%" bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#800000"> <?php if ($pid) { if (IS_TANZANIAN) { echo $this->showPID($pid); } else { echo $pid; } } ?> <br> <?php if (file_exists($root_path . 'cache/barcodes/pn_' . $pid . '.png')) { echo '<img src="' . $root_path . 'cache/barcodes/pn_' . $pid . '.png" border=0 width=180 height=35>'; } else { echo "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5&label=2&form_file=pn' border=0 width=0 height=0>"; echo "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5' border=0 width=180 height=35>"; } ?> </td> <td valign="top" rowspan=6 align="center" bgcolor="#ffffee" > <FONT SIZE=-1 FACE="Arial"><img <?php echo $img_source; ?> > </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"><?php echo $LDFileNr; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#800000"><b><?php echo $selian_pid; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"><?php echo $LDRegTime; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#800000"><b><?php echo convertTimeToLocal(formatDate2Local($date_reg, $date_format, 0, 1)); ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDRegDate; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#800000"> <b><?php echo formatDate2Local($date_reg, $date_format); ?> <input name="date_reg" type="hidden" value="<?php echo $date_reg; ?> "> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"><?php echo $LDTitle; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $title; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDLastName; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $name_last; ?> </b> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDFirstName; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $name_first; ?> </b> <?php # If person is dead show a black cross if ($death_date && $death_date != $dbf_nodate) { echo ' <img ' . createComIcon($root_path, 'blackcross_sm.gif', '0') . '>'; } ?> </td> </tr> <?php if (!$GLOBAL_CONFIG['person_name_2_hide'] && $name_2) { $this->createTR($LDName2, $name_2); } if (!$GLOBAL_CONFIG['person_name_3_hide'] && $name_3) { $this->createTR($LDName3, $name_3); } if (!$GLOBAL_CONFIG['person_name_middle_hide'] && $name_middle) { $this->createTR($LDNameMid, $name_middle); } if (!$GLOBAL_CONFIG['person_name_maiden_hide'] && $name_maiden) { $this->createTR($LDNameMaiden, $tribe_name); } if (!$GLOBAL_CONFIG['person_name_others_hide'] && $name_others) { $this->createTR($LDNameOthers, $name_others); } ?> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDBday; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo formatDate2Local($date_birth, $date_format); ?> </b> <?php # If person is dead show a black cross if ($death_date && $death_date != $dbf_nodate) { echo ' <img ' . createComIcon($root_path, 'blackcross_sm.gif', '0') . '> <font color="#000000">' . formatDate2Local($death_date, $date_format) . '</font>'; } ?> </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $LDSex; ?> : <?php if ($sex == "m") { echo $LDMale; } elseif ($sex == "f") { echo $LDFemale; } ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"><?php echo $LDBloodGroup; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php $buf = 'LD' . trim($blood_group); echo ${$buf}; ?> </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $LDRHfactor . $rh; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo 'Allergy'; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $allergy; ?> </b> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDCivilStatus; ?> : </td> <td colspan=2 bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php if ($civil_status == "single") { echo $LDSingle; } elseif ($civil_status == "married") { echo $LDMarried; } elseif ($civil_status == "divorced") { echo $LDDivorced; } elseif ($civil_status == "widowed") { echo $LDWidowed; } elseif ($civil_status == "separated") { echo $LDSeparated; } ?> </td> </tr> <?php global $db; $coreObj->sql = "SELECT name FROM care_tz_company WHERE id={$insurance_ID}"; if ($ergebnis = $db->Execute($coreObj->sql)) { $row = $ergebnis->FetchRow(); $insurance_name = $row['name']; } else { $insurance_name = ''; } ?> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDInsurance; ?> : </td> <td><FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $insurance_name; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDMembership_nr; ?> : </td> <td><FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $membership_nr; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDForm_nr; ?> : </td> <td><FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $form_nr; ?> </td> </tr> <tr> <td colspan=3> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDAddress; ?> : </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo $LDTownCity; ?> : </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $citizenship; ?> <?php //echo $addr_citytown_name; //echo $addr_citytown_nr; ?> </td> <td bgcolor="#ffffee"> <FONT SIZE=-1 FACE="Arial" color="#990000"><b> <?php echo $LDZipCode; ?> : <?php echo $addr_zip; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo 'Region'; ?> : </td> <td bgcolor="#ffffee" colspan=2> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $region > 0 ? $multi->GetRegionName($region) : $region; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo 'District'; ?> : </td> <td bgcolor="#ffffee" colspan=2> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $district > 0 ? $multi->GetDistrictName($district) : $district; ?> </td> </tr> <tr> <td bgColor="#eeeeee"> <FONT SIZE=-1 FACE="Arial"> <?php echo 'Ward'; ?> : </td> <td bgcolor="#ffffee" colspan=2> <FONT SIZE=-1 FACE="Arial" color="#990000"> <b><?php echo $ward > 0 ? $multi->GetWardName($ward) : $ward; ?> </td> </tr> <?php if (!$GLOBAL_CONFIG['person_insurance_1_nr_hide'] && $insurance_show && $insurance_nr) { $this->createTR($LDInsuranceNr, $insurance_nr, 2); $buffer = $insurance_class_info['LD_var']; if (isset(${$buffer}) && !empty(${$buffer})) { $this->createTR($LDInsuranceClass, ${$buffer}, 2); } else { $this->createTR($LDInsuranceClass, $insurance_class_info['name'], 2); } $this->createTR($LDInsuranceCo . ' 1', $insurance_firm_name, 2); } if (!$GLOBAL_CONFIG['person_phone_1_nr_hide'] && $phone_1_nr) { $this->createTR($LDPhone . ' 1', $phone_1_nr, 2); } if (!$GLOBAL_CONFIG['person_phone_2_nr_hide'] && $phone_2_nr) { $this->createTR($LDPhone . ' 2', $phone_2_nr, 2); } if (!$GLOBAL_CONFIG['person_cellphone_1_nr_hide'] && $cellphone_1_nr) { $this->createTR($LDCellPhone . ' 1', $cellphone_1_nr, 2); } if (!$GLOBAL_CONFIG['person_cellphone_2_nr_hide'] && $cellphone_2_nr) { $this->createTR($LDCellPhone . ' 2', $cellphone_2_nr, 2); } if (!$GLOBAL_CONFIG['person_fax_hide'] && $fax) { $this->createTR($LDFax, $fax, 2); } if (!$GLOBAL_CONFIG['person_email_hide'] && $email) { } //if (!$GLOBAL_CONFIG['person_citizenship_hide']&&$citizenship){ //$this->createTR($LDCitizenship,$citizenship,2); //} if (!$GLOBAL_CONFIG['person_sss_nr_hide'] && $sss_nr) { $this->createTR('District', $district_name, 2); } if (!$GLOBAL_CONFIG['person_nat_id_nr_hide'] && $nat_id_nr) { // $this->createTR('Ward',$ward_name,2); } if (!$GLOBAL_CONFIG['person_religion_hide'] && $religion) { $this->createTR($LDReligion, $name, 2); } if (!$GLOBAL_CONFIG['person_insurance_hide'] && $insurance_ID) { // $this->createTR($LDInsurance,$insurance_ID,2); } if (!$GLOBAL_CONFIG['person_ethnic_orig_hide'] && $ethnic_orig) { $this->createTR($LDEthnicOrigin, $ethnic_orig_txt, 2); } $sql = 'SELECT modify_id, create_id FROM care_person where pid="' . $pid . '"'; $result = $db->Execute($sql); $row = $result->FetchRow(); if ($row['modify_id'] == '') { $modifyid = $row['create_id']; } else { $modifyid = $row['modify_id']; } ?> <tr> <td bgcolor="#eeeeee"> <nobr><FONT SIZE=2 FACE="Arial"><?php echo $LDRegBy; ?> :</nobr> </td> <td colspan=2 bgcolor="#ffffee"> <FONT SIZE=2 FACE="Arial" color="#990000"><b><?php echo $modifyid; ?> </b></FONT> </td> </tr> </table> <?php } else { echo 'Invalid PID number or the data is not available from the databank! Please report this to <a href="mailto:info@care2x.org">info@care2x.org</a>. Thank you.'; } }
/** * Displays the GUI showing the data */ function display($pid = 0) { global $root_path, $dbf_nodate, $newdata, $kb_other_his_array, $lang; // $_SESSION; $validdata = TRUE; if (!empty($pid)) { $this->pid = $pid; } # Load the language tables $lang_tables = $this->langfiles; include $root_path . 'include/inc_load_lang_tables.php'; # Load the other hospitals array include_once $root_path . 'global_conf/other_hospitals.php'; include_once $root_path . 'include/inc_date_format_functions.php'; include_once $root_path . 'include/care_api_classes/class_insurance.php'; $pinsure_obj = new PersonInsurance($this->pid); # Get the global config for person�s registration form include_once $root_path . 'include/care_api_classes/class_globalconfig.php'; $GLOBAL_CONFIG = array(); $glob_obj = new GlobalConfig($GLOBAL_CONFIG); $glob_obj->getConfig('person_%'); //extract($GLOBAL_CONFIG); if (empty($this->pid)) { $validdata = FALSE; } else { //if($data_obj=&$this->person_obj->getAllInfoObject()){ // $this->data=$data_obj->FetchRow(); if ($this->is_loaded) { extract($this->data); # Get related insurance data $p_insurance = $pinsure_obj->getPersonInsuranceObject($this->pid); if ($p_insurance == FALSE) { $insurance_show = true; } else { if (!$p_insurance->RecordCount()) { $insurance_show = true; } elseif ($p_insurance->RecordCount() == 1) { $buffer = $p_insurance->FetchRow(); extract($buffer); $insurance_show = true; # Get insurace firm name $insurance_firm_name = $pinsure_obj->getFirmName($insurance_firm_id); } else { $insurance_show = FALSE; } } $insurance_class_info = $pinsure_obj->getInsuranceClassInfo(isset($insurance_class_nr)); # Check if person is currently admitted $this->current_encounter = $this->person_obj->CurrentEncounter($this->pid); # update the record�s history if (empty($newdata)) { @$this->person_obj->setHistorySeen($_SESSION['sess_user_name']); } # Check whether config foto path exists, else use default path $photo_path = is_dir($root_path . $GLOBAL_CONFIG['person_foto_path']) ? $GLOBAL_CONFIG['person_foto_path'] : $this->default_photo_path; } else { $validdata = FALSE; } } if ($validdata) { include_once $root_path . 'include/inc_photo_filename_resolve.php'; ############ Here starts the GUI output ################## # Start Smarty templating here # Create smarty object without initiliazing the GUI (2nd param = FALSE) include_once $root_path . 'gui/smarty_template/smarty_care.class.php'; $this->smarty = new smarty_care('common', FALSE); # Set from width $this->smarty->assign('sFormWidth', 'width="100%"'); $img_male = createComIcon($root_path, 'spm.gif', '0'); $img_female = createComIcon($root_path, 'spf.gif', '0'); if (!empty($this->pretext)) { $this->smarty->assign('pretext', $this->pretext); } $this->smarty->assign('LDRegistryNr', $LDRegistryNr); $this->smarty->assign('pid', $pid); if (file_exists($root_path . 'cache/barcodes/pn_' . $pid . '.png')) { $this->smarty->assign('sBarcodeImg', '<img src="' . $root_path . 'cache/barcodes/pn_' . $pid . '.png" border=0 width=180 height=35>'); } else { $this->smarty->assign('sBarcodeImg', "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5&label=2&form_file=pn' border=0 width=0 height=0>"); $this->smarty->assign('sBarcodeImg', "<img src='" . $root_path . "classes/barcode/image.php?code=" . $pid . "&style=68&type=I25&width=180&height=50&xres=2&font=5' border=0 width=180 height=35>"); } $this->smarty->assign('img_source', $img_source); # iRowSpanCount counts the rows on the left of the photo image. Begin with 5 because there are 5 static rows. $iRowSpanCount = 5; $this->smarty->assign('LDRegDate', $LDRegDate); $this->smarty->assign('sRegDate', @formatDate2Local($date_reg, $date_format) . '<input name="date_reg" type="hidden" value="' . $date_reg . '"'); //$iRowSpanCount++; $this->smarty->assign('LDRegTime', $LDRegTime); $this->smarty->assign('sRegTime', convertTimeToLocal(@formatDate2Local($date_reg, $date_format, 0, 1))); $this->smarty->assign('sFileNr', $this->createTR($LDFileNr, $selian_pid, 1, TRUE)); if (!$GLOBAL_CONFIG['person_title_hide']) { $this->smarty->assign('sPersonTitle', $this->createTR($LDTitle, $title)); $iRowSpanCount++; } $this->smarty->assign('sNameLast', $this->createTR($LDLastName, $name_last, 1, TRUE)); //$iRowSpanCount++; # If person is dead show a black cross if ($death_date && $death_date != $dbf_nodate) { $sCross = ' <img ' . createComIcon($root_path, 'blackcross_sm.gif', '0', '', TRUE) . '>'; } else { $sCross = ''; } $this->smarty->assign('sNameFirst', $this->createTR($LDFirstName, $name_first . $sCross, 1, TRUE)); if (!$GLOBAL_CONFIG['person_name_2_hide'] && $name_2) { $this->smarty->assign('sName2', $this->createTR($LDName2, $name_2)); $iRowSpanCount++; } if (!$GLOBAL_CONFIG['person_name_3_hide'] && $name_3) { $this->smarty->assign('sName3', $this->createTR($LDName3, $name_3)); $iRowSpanCount++; } if (!$GLOBAL_CONFIG['person_name_middle_hide'] && $name_middle) { $this->smarty->assign('sNameMiddle', $this->createTR($LDNameMid, $name_middle)); $iRowSpanCount++; } if (!$GLOBAL_CONFIG['person_name_maiden_hide'] && $name_maiden) { $this->smarty->assign('sNameMaiden', $this->createTR($LDNameMaiden, $name_maiden)); $iRowSpanCount++; } if (!$GLOBAL_CONFIG['person_name_others_hide'] && $name_others) { $this->smarty->assign('sNameOthers', $this->createTR($LDNameOthers, $name_others)); $iRowSpanCount++; } # Set the rowspan value for the photo image <td> $this->smarty->assign('sPicTdRowSpan', "rowspan={$iRowSpanCount}"); $this->smarty->assign('LDBday', "{$LDBday}:"); if ($death_date && $death_date != $dbf_nodate) { $this->smarty->assign('sCrossImg', $sCross); $this->smarty->assign('sDeathDate', '<font color="#000000">' . @formatDate2Local($death_date, $date_format) . '</font>'); } $this->smarty->assign('sBdayInput', '<div class="vi_data">' . @formatDate2Local($date_birth, $date_format) . '</div>'); $this->smarty->assign('LDSex', "{$LDSex}:"); if ($sex == "m") { $this->smarty->assign('LDMale', '<div class="vi_data">' . $LDMale . '</div>'); } elseif ($sex == "f") { $this->smarty->assign('LDFemale', '<div class="vi_data">' . $LDFemale . '</div>'); } if (!$GLOBAL_CONFIG['person_bloodgroup_hide'] && trim($blood_group)) { // KB: make blood group hideable $this->smarty->assign('LDBloodGroup', $LDBloodGroup); $buf = 'LD' . trim($blood_group); $this->smarty->assign('sBGAInput', ${$buf}); } if (!$GLOBAL_CONFIG['person_civilstatus_hide'] && trim($civil_status)) { $this->smarty->assign('LDCivilStatus', $LDCivilStatus); if ($civil_status == "single") { $sCSBuffer = $LDSingle; } elseif ($civil_status == "married") { $sCSBuffer = $LDMarried; } elseif ($civil_status == "divorced") { $sCSBuffer = $LDDivorced; } elseif ($civil_status == "widowed") { $sCSBuffer = $LDWidowed; } elseif ($civil_status == "separated") { $sCSBuffer = $LDSeparated; } $this->smarty->assign('sCSSingleInput', $sCSBuffer); } $this->smarty->assign('LDAddress', "{$LDAddress}:"); $this->smarty->assign('LDStreet', "{$LDStreet}:"); $this->smarty->assign('sStreetInput', $addr_str); $this->smarty->assign('LDStreetNr', "{$LDStreetNr}:"); $this->smarty->assign('sStreetNrInput', $addr_str_nr); $this->smarty->assign('LDTownCity', "{$LDTownCity}:"); $this->smarty->assign('sTownCityInput', $addr_citytown_name); $this->smarty->assign('LDZipCode', "{$LDZipCode} :"); $this->smarty->assign('sZipCodeInput', $addr_zip); $this->smarty->assign('LDTribe', "{$LDTribe} :"); $this->smarty->assign('sTribe', $tribe_name); $this->smarty->assign('LDOccupation', "{$LDOccupation} :"); $this->smarty->assign('sTitle', $title); $this->smarty->assign('LDEducation', "{$LDEducation} :"); $this->smarty->assign('sEducation', $education); if (!$GLOBAL_CONFIG['person_insurance_hide']) { if (!isset($GLOBAL_CONFIG['person_insurance_1_nr_hide']) && $insurance_show && isset($insurance_nr)) { $this->smarty->assign('bShowInsurance', TRUE); $this->smarty->assign('sInsuranceNr', $this->createTR($LDInsuranceNr, $insurance_nr, 2)); $buffer = $insurance_class_info['LD_var']; if (isset(${$buffer}) && !empty(${$buffer})) { $this->smarty->append('sInsClasses', ${$buffer}); } else { $this->smarty->append('sInsClasses', $insurance_class_info['name']); } $this->smarty->assign('LDInsuranceCo', $LDInsuranceCo); $this->smarty->assign('sInsCoNameInput', $insurance_firm_name); $this->createTR($LDInsuranceCo . ' 1', $insurance_firm_name, 2); } } if (!$GLOBAL_CONFIG['person_phone_1_nr_hide'] && $phone_1_nr) { //$this->smarty->assign('sPhone1',$this->createTR($LDPhone.' 1',$phone_1_nr,2)); // by RM: $this->smarty->assign('sPhone1', $this->createTR($LDPhone, $phone_1_nr, 2)); } if (!$GLOBAL_CONFIG['person_phone_2_nr_hide'] && $phone_2_nr) { $this->smarty->assign('sPhone2', $this->createTR($LDPhone . ' 2', $phone_2_nr, 2)); } if (!$GLOBAL_CONFIG['person_cellphone_1_nr_hide'] && $cellphone_1_nr) { //$this->smarty->assign('sCellPhone1',$this->createTR($LDCellPhone.' 1',$cellphone_1_nr,2)); // by RM: $this->smarty->assign('sCellPhone1', $this->createTR($LDCellPhone, $cellphone_1_nr, 2)); } if (!$GLOBAL_CONFIG['person_cellphone_2_nr_hide'] && $cellphone_2_nr) { $this->smarty->assign('sCellPhone2', $this->createTR($LDCellPhone . ' 2', $cellphone_2_nr, 2)); } if (!$GLOBAL_CONFIG['person_fax_hide'] && $fax) { $this->smarty->assign('sFax', $this->createTR($LDFax, $fax, 2)); } if (!$GLOBAL_CONFIG['person_email_hide'] && $email) { $this->smarty->assign('sEmail', $this->createTR($LDEmail, "<a href=\"mailto:{$email}\">{$email}</a>", 2)); } if (!$GLOBAL_CONFIG['person_citizenship_hide'] && $citizenship) { $this->smarty->assign('sCitzenship', $this->createTR($LDCitizenship, $citizenship, 2)); } if (!$GLOBAL_CONFIG['person_sss_nr_hide'] && $sss_nr) { $this->smarty->assign('sSSSNr', $this->createTR($LDSSSNr, $sss_nr, 2)); } if (!$GLOBAL_CONFIG['person_nat_id_nr_hide'] && $nat_id_nr) { $this->smarty->assign('sNatIdNr', $this->createTR($LDNatIdNr, $nat_id_nr, 2)); } if (!$GLOBAL_CONFIG['person_religion_hide'] && $religion) { $this->smarty->assign('sReligion', $this->createTR($LDReligion, $religion, 2)); } if (!$GLOBAL_CONFIG['person_ethnic_orig_hide'] && $ethnic_orig) { $this->smarty->assign('LDEthnicOrig', $LDEthnicOrigin); $this->smarty->assign('sEthnicOrigInput', $ethnic_orig_txt); } if (!$GLOBAL_CONFIG['person_other_his_nr_hide']) { $other_hosp_list = $this->person_obj->OtherHospNrList(); $iHospCount = sizeof($other_hosp_list); if ($iHospCount) { $this->smarty->assign('bShowOtherHospNr', TRUE); $this->smarty->assign('LDOtherHospitalNr', $LDOtherHospitalNr); $sOtherNrBuffer = ''; if (is_array($other_hosp_list) && $iHospCount) { foreach ($other_hosp_list as $k => $v) { $sOtherNrBuffer .= "<b>" . $kb_other_his_array[$k] . ":</b> " . $v . "<br />\n"; } } $this->smarty->assign('sOtherNr', $sOtherNrBuffer); } } $this->smarty->assign('LDRegBy', $LDRegBy); if (empty($modify_id)) { $buffer = $create_id; } else { $buffer = $modify_id; } $this->smarty->assign('sRegByInput', $buffer); } else { $this->smarty->assign('pretext', 'Invalid PID number or the data is not available from the databank! Please report this to <a href="mailto:info@care2x.org">info@care2x.org</a>. Thank you.'); } # If data is to be returned only, buffer output, get the buffer contents, end and clean buffer and return contents. if ($this->bReturnOnly) { ob_start(); $this->smarty->display('registration_admission/reg_form.tpl'); $sTemp = ob_get_contents(); ob_end_clean(); return $sTemp; } else { $this->smarty->display('registration_admission/reg_form.tpl'); return TRUE; } }