<?php $results = ""; $biochemtests = array('383'); $biochemlst = implode(",", $biochemtests); $biochemistry = get_form_6($ordersid, $biochemtests, $dbh); $coagtests = array('802', '789', '808', '807', '796', '798'); $coaglst = implode(",", $coagtests); $coagresults = get_form_6($ordersid, $coagtests, $dbh); //а теперь просто собираем отчет. $biomat = find_biomat_tests($ordersid, $biochemlst, $dbh); $head = "\\SetWatermarkText{" . $watermark . "}\n"; $head .= "\\vspace{-10px} \\flushleft \\normalsize Биоматериал: КРОВЬ ИЗ ВЕНЫ, СПЕРМА\n\n\\vspace{-3px}"; $head .= "\\begin{center} \\Large \\textbf{«Мужская сила»} \\end{center}\n\n\\vspace{-0.3cm}\\textbf{\\large{Спермограмма}}\n\n\\vspace{-0.3cm}"; $head .= $biochemistry . "\n\n\\vspace{1cm}\\textbf{\\large{Гормональные исследования}}\n\n\\vspace{-0.3cm}\n"; $head .= $coagresults . "\\newpage\\textbf{\\large{Посев на микрофлору и чувствительность к АБ}}\n\n\\vspace{-0.3cm}\n"; //микробиология $micro = micro_single($ordersid, $dbh); $head .= $micro . "\\end{longtable}\n"; //исследования проводили... $end = "\\vspace{0.5cm}\\normalsize\\textbf{Исследования проводили:}\n\n"; $end .= "Спермограмма: " . getApprUserTests($ordersid, $biochemlst, $dbh) . "\n\n"; $end .= "Гормональные исследования: " . getApprUserTests($ordersid, $coaglst, $dbh) . "\n\n"; $end .= "Посев на микрофлору и чувствительность к АБ: " . getApprUserTests($ordersid, '665', $dbh); $apprdate = find_apprdate($ordersid, $dbh); $end .= "\\flushright Дата выдачи: " . $apprdate; $response = $head . $end;
ibase_free_result($result); switch ($row[0]) { case 1: $results .= micro_single($ordersid, $dbh); break; case 2: $results .= micro_double($ordersid, $dbh); break; case 3: $results .= micro_triple($ordersid, $dbh); break; case 4: $results .= micro_four($ordersid, $dbh); break; default: $results .= micro_single($ordersid, $dbh); break; } $user = ""; $restm = "select distinct u.fullname from resultsmicro r inner join ordtask o on o.id = r.ordtaskid inner join users u on u.usernam = r.by_user where o.ordersid in (" . $ordersid . ") "; $res = ibase_query($dbh, $restm); while ($row = ibase_fetch_row($res)) { $user .= $row[0]; } ibase_free_result($res); $appruser = getApprUser($ordersid, $dbh); $biomat = find_biomat($ordersid, $dbh); $panelname = find_panel($ordersid, $dbh); $head = "\\SetWatermarkText{" . $watermark . "}\n"; $head .= "\\vspace{-10px} \\flushleft \\normalsize Биоматериал: " . $biomat . "\n\n\\vspace{3px}"; $head .= "\\vspace{3px} \\begin{center}\\textbf{" . $panelname . "}\n\n\\vspace{-3px}\\end{center}";