示例#1
0
                $pdf->SetXY(20, $counter);
                $pdf->Cell($w = 40, $h = 0, $examination_array['name_of_examination'], $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                $pdf->SetXY(60, $counter);
                $pdf->Cell($w = 40, $h = 0, $examination_array['result'], $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                $pdf->SetXY(100, $counter);
                $pdf->Cell($w = 40, $h = 0, $examination_array['referance_range'] . ' ' . $examination_array['unit'], $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                $pdf->SetXY(140, $counter);
                $acr = $acr_check_code[check_critical_abnormal_reportable($examination_array['sample_id'], $examination_array['code'])];
                $pdf->Cell($w = 20, $h = 0, $acr, $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                $pdf->SetXY(160, $counter);
                $pdf->Cell($w = 40, $h = 0, $examination_array['method_of_analysis'], $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                if ($counter >= 120) {
                    $counter = 45;
                    $pdf->AddPage();
                }
            } else {
                $pdf->SetXY(10, $counter);
                $pdf->Cell($w = 50, $h = 0, trim($examination_array['name_of_examination'], 'Z_'), $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                $pdf->SetXY(60, $counter);
                $pdf->Cell($w = 140, $h = 0, $examination_array['result'], $border, $ln = 0, $align = '', $fill = false, $link = '', $stretch = 1, $ignore_min_height = false, $calign = 'T', $valign = 'M');
                if ($counter >= 120) {
                    $counter = 45;
                    $pdf->AddPage();
                }
            }
        }
    }
    $pdf->Output('report.pdf', 'I');
}
print_report_pdf_A5(array(120909102930.0, 102907, 102908, 102909, 102910), 'Dr XYZ');
示例#2
0
        $other_wheree = $other_wheree . ' ' . $key . ' like \'' . $value . '\' and';
    }
}
$other_where = substr($other_wheree, 0, -3);
if (strlen($sample_id_where) > 0 && strlen($other_where) > 0) {
    $search_str = $search_str . ' where ' . $sample_id_where . ' and ' . $other_where;
} elseif (strlen($sample_id_where) > 0 && strlen($other_where) == 0) {
    $search_str = $search_str . ' where ' . $sample_id_where;
} elseif (strlen($sample_id_where) == 0 && strlen($other_where) > 0) {
    $search_str = $search_str . ' where ' . $other_where;
}
$printed = array();
if (isset($_POST['submit']) && substr($search_str, -7) != 'sample ') {
    $link = start_nchsls();
    if (!($search_result = mysql_query($search_str, $link))) {
        echo mysql_error();
    }
    while ($ar = mysql_fetch_assoc($search_result)) {
        $printed[] = $ar['sample_id'];
    }
    foreach ($printed as $value) {
        if (get_sample_status($value) != 'verified') {
            echo $value . ' is not verified. PDF report can not be printed<br>';
        }
    }
    print_report_pdf_A5($printed, $_POST['authorized_signatory']);
} else {
    main_menu();
    search_form('print_report_pdf.php');
    echo '<h1>No coditions are given for selecting records</h1>';
}