public function getBarcodeFields($lab_config_id=null) { # Returns a set of checkboxes with existing fields types checked. $lab_config = get_lab_config_by_id($lab_config_id); if($lab_config == null && $lab_config_id != "") { ?> <div class='sidetip_nopos'> ERROR: Lab configuration not found </div> <?php return; } # Fetch all specimen types //if($lab_config_id == "") //$specimen_list = get_specimen_types_catalog(); //else //$specimen_list = get_search_fields($lab_config_id); $brfields = get_lab_config_settings_barcode(); //print_r($brfields); //"SELECT pid, p_addl, daily_num, pname, age, sex, dob FROM lab_config WHERE lab_config_id=$lab_config_id"; //$current_specimen_list = array(); //if($lab_config_id != "") // $current_specimen_list = get_lab_config_specimen_types($lab_config_id); # For each specimen type, create a check box. Check it if specimen already in lab configuration ?> <table> <tr> <td>Encoding Format: </td> <td> <?php //$sfields['rpp']= '45'; echo "<select id='brfields_type' name='brfields_type'>"; $codeTypes = getBarcodeTypes(); foreach ($codeTypes as $type) { if($brfields['type'] == $type) echo "<option selected value='".$type."'>".$type."</option>"; else echo "<option value='".$type."'>".$type."</option>"; } echo "</select>";?></td> </tr> <tr> <td> Barcode Width: </td> <td> <?php //$sfields['rpp']= '45'; echo "<select id='brfields_width' name='brfields_width'>"; $i = 1; while($i < 11) { if($brfields['width'] == $i) echo "<option selected value='".$i."'>".$i."</option>"; else echo "<option value='".$i."'>".$i."</option>"; $i++; } echo "</select>";?> </td> </tr> <tr> <td>Barcode Height:</td> <td> <?php //$sfields['rpp']= '45'; echo "<select id='brfields_height' name='brfields_height'>"; $i = 5; while($i < 81) { if($brfields['height'] == $i) echo "<option selected value='".$i."'>".$i."</option>"; else echo "<option value='".$i."'>".$i."</option>"; $i++; } echo "</select>";?> </td> </tr> <tr> <td>Text Size:</td> <td> <?php //$sfields['rpp']= '45'; echo "<select id='brfields_textsize' name='brfields_textsize'>"; $i = 5; while($i < 40) { if($brfields['textsize'] == $i) echo "<option selected value='".$i."'>".$i."</option>"; else echo "<option value='".$i."'>".$i."</option>"; $i++; } echo "</select>";?></td> </tr> </table> <?php }
$lab_config_id = $_REQUEST['location']; $patient_id = $_REQUEST['patient_id']; DbUtil::switchToLabConfig($lab_config_id); $lab_config = get_lab_config_by_id($lab_config_id); $report_id = $REPORT_ID_ARRAY['reports_testhistory.php']; $report_config = $lab_config->getReportConfig($report_id); $margin_list = $report_config->margins; $userrr = get_user_by_id($_SESSION['user_id']); if (is_country_dir($userrr) || is_super_admin($userrr)) { $code_type = 0; $bar_width = 0; $bar_height = 0; $font_size = 0; $printPatientBarcode = 0; } else { $barcodeSettings = get_lab_config_settings_barcode(); // print_r($barcodeSettings); $code_type = $barcodeSettings['type']; //"code39"; $bar_width = $barcodeSettings['width']; //2; $bar_height = $barcodeSettings['height']; //40; $font_size = $barcodeSettings['textsize']; //11; $printPatientBarcode = patientReportBarcodeCheck(); } for ($i = 0; $i < count($margin_list); $i++) { $margin_list[$i] = $SCREEN_WIDTH * $margin_list[$i] / 100; } ?>