Ejemplo n.º 1
0
 function Render(&$ADirection)
 {
     $vDB = GetDB();
     $vSubjectList = $vDB->GetRBList('rb_directions', 'id', 'name', true);
     $this->SetMargins(20, 20, 20);
     $this->SetAutoPageBreak(true, 30);
     $vBranchInfo = GetBranchInfo();
     $this->AddPage();
     $this->SetFont('arial_rus', '', 10);
     $vWidth = $this->GetAreaWidth();
     $vHeight = $this->FontSize;
     $vHeightLN = $this->FontSize * 1.5;
     $vX = $this->GetX();
     $vY = $this->GetY();
     $this->SetXY($vX, $vY);
     $this->Cell($vWidth, $vHeight, 'Министерство здравоохранения', '', 0, 'L');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'и социального развития', '', 0, 'L');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'Российской Федерации', '', 0, 'L');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, iconv("utf8", "windows-1251", @$vBranchInfo['name']), '', 0, 'L');
     $this->Ln($vHeightLN);
     $this->ExactCell($vHeight, 'Код ОГРН  ');
     $this->BoxedText($vWidth, $vHeight, $vBranchInfo['OGRN']);
     $this->Ln($vHeightLN);
     $this->SetXY($vX, $vY);
     $this->Cell($vWidth, $vHeight, 'Медицинская документация', '', 0, 'R');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'форма № 057/у-04', '', 0, 'R');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'УТВЕРЖДЕНА', '', 0, 'R');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'Приказом Минздравсоцразвития России', '', 0, 'R');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, 'От 22 ноября 2004 г. №255', '', 0, 'R');
     $this->Ln($vHeightLN);
     $this->Ln($vHeightLN);
     $this->SetFont('arial_rus', '', 14);
     $vHeight = $this->FontSize;
     $vHeightLN = $this->FontSize * 1.5;
     $this->Cell($vWidth, $vHeight, 'НАПРАВЛЕНИЕ', '', 0, 'C');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, iconv("utf8", "windows-1251", @$vSubjectList[$ADirection['direction_subject']]), '', 0, 'C');
     $this->Ln($vHeightLN);
     $this->Cell($vWidth, $vHeight, iconv("utf8", "windows-1251", @$ADirection['direction_target']), 'B', 0, 'C');
     $this->Ln($vHeightLN);
     $this->Ln($vHeightLN);
     $this->SetFont('arial_rus', '', 10);
     $vHeight = $this->FontSize;
     $vHeightLN = $this->FontSize * 1.5;
     $this->ExactCell($vHeight, '1. Номер страхового полиса ОМС');
     $this->SetX(90);
     //            $this->Ln($vHeight);
     $this->BoxedText($vWidth, $vHeight, iconv("utf8", "windows-1251", @$ADirection['polis_series']) . ' ' . @$ADirection['polis_number'], 24);
     $this->Ln($vHeightLN);
     $this->ExactCell($vHeight, '2. Код льготы');
     $this->SetX(90);
     $this->BoxedText($vWidth, $vHeight, '', 3);
     $this->Ln($vHeightLN);
     $vBlock = array();
     $vBlock[] = array('title' => '3. Фамилия, Имя, Отчество', 'text' => iconv("utf8", "windows-1251", FormatNameEx($ADirection)));
     $vBlock[] = array('title' => '4. Дата рождения', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$ADirection['born_date'])));
     $vBlock[] = array('title' => '5. Адрес постоянного места жительства', 'text' => iconv("utf8", "windows-1251", @FormatAddress($ADirection['addr_reg_street']), iconv("utf8", "windows-1251", $ADirection['addr_reg_num']), iconv("utf8", "windows-1251", $ADirection['addr_reg_subnum']), iconv("utf8", "windows-1251", $ADirection['addr_reg_apartment'])));
     $vBlock[] = array('title' => '6. Место работы, должность', 'text' => FormatProfession(iconv("utf8", "windows-1251", @$ADirection['employment_place']), iconv("utf8", "windows-1251", @$ADirection['profession'])));
     $vBlock[] = array('title' => '7. Диагноз', 'text' => iconv("utf8", "windows-1251", @$ADirection['diagnosis']));
     $this->BlockNotes($vBlock, $vWidth);
     $this->Ln($vHeightLN);
     $this->ExactCell($vHeight, '8. Код диагноза по МКБ');
     $this->SetX(90);
     $this->BoxedText($vWidth, $vHeight, iconv("utf8", "windows-1251", @$ADirection['diagnosis_mkb']), 5);
     $this->Ln($vHeightLN);
     $vBlock = array();
     $this->Ln($vHeightLN);
     $this->Ln($vHeightLN);
     $vBlock[] = array('title' => 'Врач', 'text' => iconv("utf8", "windows-1251", FormatUserName(@$ADirection['doctor_id'])));
     $vBlock[] = array('title' => 'Дата', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong($vDB->ConvertToDate(time()))));
     $this->BlockNotes($vBlock, 70);
     $this->Ln($vHeightLN * 2);
     $this->ExactCell($vHeight, ' М.П.');
 }
Ejemplo n.º 2
0
 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, ' М.П.');
 }