function FirstPage($AData) { $vBranchInfo = GetBranchInfo(); $this->AddPage(); $this->SetFont('arial_rus', '', 10); $vWidth = $this->GetAreaWidth(); $vHeight = $this->FontSize * 1.5; $vX = $this->GetX(); $vY = $this->GetY(); $this->SetXY($vX + 0, $vY); // $this->Cell($vWidth, $vHeight, 'СПб ГУЗ ГП №51 Травматологическое отделение', 'B', 0, 'L'); $this->Cell($vWidth, $vHeight, iconv("utf8", "windows-1251", @$vBranchInfo['name']), 'B', 0, 'L'); $this->Ln($vHeight); $this->SetFont('arial_rus', '', 14); $vHeight = $this->FontSize * 1.5; $this->Cell($vWidth, $vHeight, 'Направление на рентгенологическое исследование'); $this->Ln($vHeight); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize * 1.5; /* $vTitles = array('Дата', 'История болезни №', 'Фамилия Имя Отчество', 'Дата рождения', 'Объективный статус', 'Область исследования', 'Описание'); $vTitleWidth = 0; foreach( $vTitles as $vTitle ) { $vTitleWidth = max($vTitleWidth, $this->GetStringWidth($vTitle)+3); } $this->Notes($vTitles[0], $vTitleWidth, $vWidth, 1, Date2ReadableLong($AData['date'])); $this->Notes($vTitles[1], $vTitleWidth, $vWidth, 1, $AData['case_id']); $this->Notes($vTitles[2], $vTitleWidth, $vWidth, 1, $AData['case']['last_name'].' '.$AData['case']['first_name'].' '.$AData['case']['patr_name']); $this->Notes($vTitles[3], $vTitleWidth, $vWidth, 1, Date2ReadableLong($AData['case']['born_date'])); $this->Notes($vTitles[4], $vTitleWidth, $vWidth, 3, $AData['objective']); $this->Notes($vTitles[5], $vTitleWidth, $vWidth, 1, $AData['area']); */ $vCase =& $AData['case']; $vBlock = array(array('title' => 'Дата', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong($AData['date']))), array('title' => 'История болезни №', 'text' => $AData['case_id']), array('title' => 'Фамилия Имя Отчество', 'text' => iconv("utf8", "windows-1251", $vCase['last_name']) . ' ' . iconv("utf8", "windows-1251", $vCase['first_name']) . ' ' . iconv("utf8", "windows-1251", $vCase['patr_name'])), array('title' => 'Дата рождения', 'text' => iconv("utf8", "windows-1251", FormatBornDateAndAgeLong($AData['date'], @$vCase['born_date']))), array('title' => 'Пол', 'text' => @$vCase['is_male'] ? 'мужской' : 'женский'), array('title' => 'Адрес регистрации', 'text' => iconv("utf8", "windows-1251", FormatAddress(@$vCase['addr_reg_street'], @$vCase['addr_reg_num'], @$vCase['addr_reg_subnum'], @$vCase['addr_reg_apartment']))), array('title' => 'Адрес проживания', 'text' => iconv("utf8", "windows-1251", FormatAddress(@$vCase['addr_phys_street'], @$vCase['addr_phys_num'], @$vCase['addr_phys_subnum'], @$vCase['addr_phys_apartment']))), array('title' => 'Документ', 'text' => iconv("utf8", "windows-1251", FormatDocument(@$vCase['doc_type_id'], @$vCase['doc_series'], @$vCase['doc_number']))), array('title' => 'Телефон(ы)', 'text' => @$vCase['phone']), array('title' => 'Категория', 'text' => iconv("utf8", "windows-1251", FormatCategory(@$vCase['employment_category_id']))), array('title' => 'Место работы', 'text' => iconv("utf8", "windows-1251", @$vCase['employment_place'])), array('title' => 'Профессия', 'text' => iconv("utf8", "windows-1251", @$vCase['profession'])), array('title' => 'Полис', 'text' => iconv("utf8", "windows-1251", FormatPolis(@$vCase['insurance_company_id'], @$vCase['polis_series'], @$vCase['polis_number']))), array('title' => 'что произошло', 'text' => iconv("utf8", "windows-1251", @$vCase['accident'])), array('title' => 'дата и время', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$vCase['accident_datetime']))), array('title' => 'Диагноз предварительный', 'text' => iconv("utf8", "windows-1251", $AData['diagnosis']), 'rows' => 2), array('title' => 'Область исследования', 'text' => iconv("utf8", "windows-1251", $AData['area']), 'rows' => 2), array('title' => 'Направил', 'text' => iconv("utf8", "windows-1251", FormatUserName($AData['user_id']))), array('title' => 'Описание', 'text' => iconv("utf8", "windows-1251", $AData['description']), 'rows' => 1)); $this->BlockNotes($vBlock, $vWidth); $this->Ln($vHeight * 5); $vBlock = array(array('title' => 'Диагноз заключительный', 'text' => '', 'rows' => 2)); $this->BlockNotes($vBlock, $vWidth); }
function Render(&$AEpicrisis) { $vDB = GetDB(); $this->SetMargins(20, 20, 20); $this->SetAutoPageBreak(true, 30); $vBranchInfo = GetBranchInfo(); $this->AddPage(); $this->SetFont('arial_rus', '', 10); $vWidth = $this->GetAreaWidth(); $vHeight = $this->FontSize * 1.5; $vX = $this->GetX(); $vY = $this->GetY(); $vPos = $vWidth * 3 / 4; $vSmallWidth = $vWidth - $vPos; $vX = $this->GetX(); $vY = $this->GetY(); $this->SetXY($vX, $vY); $this->Cell($vPos, $this->FontSize, 'Министерство здравоохранения', '', 0, 'L'); $this->Ln($vHeight); $this->Cell($vPos, $this->FontSize, 'и социального развития', '', 0, 'L'); $this->Ln($vHeight); $this->Cell($vPos, $this->FontSize, 'Российской Федерации', '', 0, 'L'); $this->Ln($vHeight); $this->Cell($vPos, $this->FontSize, iconv("utf8", "windows-1251", @$vBranchInfo['name']), '', 0, 'L'); $this->Ln($vHeight); $this->ExactCell($this->FontSize, 'Код ОГРН '); $this->BoxedText($vPos, $this->FontSize, iconv("utf8", "windows-1251", $vBranchInfo['OGRN'])); $this->Ln($vHeight); $this->SetXY($vPos, $vY); $this->Cell($vSmallWidth, $this->FontSize, 'Медицинская документация', '', 0, 'L'); $this->Ln($vHeight); $this->SetX($vPos); $this->Cell($vSmallWidth, $this->FontSize, 'Форма № 027/у', '', 0, 'L'); $this->Ln($vHeight); $this->SetX($vPos); $this->Cell($vSmallWidth, $this->FontSize, 'Утв. Минздравом СССР', '', 0, 'L'); $this->Ln($vHeight); $this->SetX($vPos); $this->Cell($vSmallWidth, $this->FontSize, '04.10.80 № 1030', '', 0, 'L'); $this->Ln($vHeight * 4); $this->SetFont('arial_rus', '', 14); $vHeight = $this->FontSize * 1.5; $this->Cell($vWidth, $vHeight, 'ВЫПИСКА', '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'из медицинской карты амбулаторного больного № ' . $AEpicrisis['case_id'], '', 0, 'C'); $this->Ln($vHeight * 2); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize * 1.5; $vBlock = array(); // $vBlock[] = array('title'=>'В', 'text'=>@$AEpicrisis['target']); // $vBlock[] = array('title'=>'Фамилия, имя, отчество', 'text'=>FormatName(@$AEpicrisis['last_name'], @$AEpicrisis['first_name'], @$AEpicrisis['patr_name'])); $vBlock[] = array('title' => 'Фамилия, имя, отчество', 'text' => iconv("utf8", "windows-1251", FormatNameEx($AEpicrisis))); $vBlock[] = array('title' => 'Дата рождения', 'text' => iconv("utf8", "windows-1251", FormatBornDateAndAgeLong($vDB->ConvertToDate(time()), @$AEpicrisis['born_date']))); $vBlock[] = array('title' => 'Пол', 'text' => @$AEpicrisis['is_male'] ? 'мужской' : 'женский'); $vBlock[] = array('title' => 'Домашний адрес', 'text' => iconv("utf8", "windows-1251", @FormatAddress($AEpicrisis['addr_reg_street'], $AEpicrisis['addr_reg_num'], $AEpicrisis['addr_reg_subnum'], $AEpicrisis['addr_reg_apartment']))); $vBlock[] = array('title' => 'Место работы и род занятий', 'text' => iconv("utf8", "windows-1251", FormatProfession(@$AEpicrisis['employment_place'], @$AEpicrisis['profession']))); $vBlock[] = array('title' => 'Полис', 'text' => iconv("utf8", "windows-1251", FormatPolis(@$AEpicrisis['insurance_company_id'], @$AEpicrisis['polis_series'], @$AEpicrisis['polis_number']))); $vBlock[] = array('title' => 'Дата обращения', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$AEpicrisis['create_time']))); $vBlock[] = array('title' => 'Тип травмы', 'text' => iconv("utf8", "windows-1251", FormatTraumaType(@$AEpicrisis['trauma_type_id']))); $vBlock[] = array('title' => 'Со слов пострадавшего', 'text' => iconv("utf8", "windows-1251", @$AEpicrisis['accident'])); $vBlock[] = array('title' => 'Дата и время происшествия', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$AEpicrisis['accident_datetime']))); // $vBlock[] = array('title'=>'Жалобы', 'text'=>@$AEpicrisis['complaints']); $vBlock[] = array('title' => 'Диагноз', 'text' => iconv("utf8", "windows-1251", @$AEpicrisis['diagnosis'])); $vBlock[] = array('title' => 'Лечение', 'text' => iconv("utf8", "windows-1251", @$AEpicrisis['cure'])); if (!empty($AEpicrisis['dynamic_id'])) { $vBlock[] = array('title' => 'Динамика', 'text' => iconv("utf8", "windows-1251", FormatDynamic(@$AEpicrisis['dynamic_id']))); } if (!empty($AEpicrisis['clinical_outcome_id'])) { $vBlock[] = array('title' => 'Исход', 'text' => iconv("utf8", "windows-1251", FormatClinicalOutcome($AEpicrisis['clinical_outcome_id']))); } else { $vBlock[] = array('title' => 'Исход', 'text' => 'В настоящее время продолжает лечение'); } $vBlock[] = array('title' => 'Лечебные и трудовые рекомендации', 'text' => iconv("utf8", "windows-1251", @$AEpicrisis['recomendation'])); $this->BlockNotes($vBlock, $vWidth); $this->Ln($vHeight * 2); $vBlock = array(); $vBlock[] = array('title' => 'Врач', 'text' => iconv("utf8", "windows-1251", FormatUserName(@$AEpicrisis['doctor_id']))); $vBlock[] = array('title' => 'Дата', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong($vDB->ConvertToDate(time())))); $this->BlockNotes($vBlock, 70); $this->Ln($vHeight * 2); $this->ExactCell($vHeight, ' М.П.'); }