// --------------------------------------------------------- // set font $pdf->SetFont('times', '', 10); $acr_check_code = array('-1' => '', '-2' => '', '-3' => '', '0' => '', '1' => 'low absurd', '2' => 'high absurd', '3' => 'low critical', '4' => 'high critical', '5' => '', '6' => ''); // add a page $pdf->AddPage(); $wth = $pdf->getPageWidth() - 10; $linkk = start_nchsls(); $sql_examination_data = 'select * from examination where sample_id=\'' . $sample_id . '\' order by name_of_examination'; $result_examination_data = mysql_query($sql_examination_data, $linkk); $counter = 55; $pdf->SetFont('helvetica', '', 8); while ($examination_array = mysql_fetch_assoc($result_examination_data)) { //if($examination_array['id']<1000) //{ $pdf->SetY($counter); $counter = $counter + 5; $pdf->Cell($w = $wth * 0.1, $h = 0, $examination_array['NABL_Accredited'], $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); $pdf->Cell($w = $wth * 0.2, $h = 0, $examination_array['name_of_examination'], $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); $pdf->Cell($w = $wth * 0.2, $h = 0, $examination_array['result'], $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); $pdf->Cell($w = $wth * 0.2, $h = 0, $examination_array['referance_range'] . ' ' . $examination_array['unit'], $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); $acr = $acr_check_code[check_critical_abnormal_reportable($examination_array['sample_id'], $examination_array['code'])]; $pdf->Cell($w = $wth * 0.1, $h = 0, $acr, $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); $pdf->Cell($w = $wth * 0.2, $h = 0, $examination_array['method_of_analysis'], $border = 0, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M'); //} //else //{ // $pdf->SetY($counter);$counter=$counter+5; // $pdf->Cell($w=$wth*0.2, $h=0, $examination_array['name_of_examination'],$border=0, $ln=0, $align='', $fill=false, $link='', // $stretch=1, $ignore_min_height=false, $calign='T', $valign='M'); // $pdf->Cell($w=$wth*0.8, $h=0, $examination_array['result'],$border=0, $ln=0, $align='', $fill=false, $link='',