function Render(&$AConclusion) { $vDB = GetDB(); $vHeavitiesList = $vDB->GetRBList('rb_trauma_heavity', '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 * 1.5; $vX = $this->GetX(); $vY = $this->GetY(); $this->SetXY($vX, $vY); $this->Cell($vWidth, $vHeight, iconv("utf8", "windows-1251", @$vBranchInfo['name']), 'B', 0, 'L'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'Медицинская документация', '', 0, 'R'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'Учетная форма № 315/у', '', 0, 'R'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'УТВЕРЖДЕНА', '', 0, 'R'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'Приказом Минздравсоцразвития России', '', 0, 'R'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'От 15 апреля 2005 г. №275', '', 0, 'R'); $this->Ln($vHeight); $this->Ln($vHeight); $this->SetFont('arial_rus', '', 14); $vHeight = $this->FontSize * 1.5; $this->Cell($vWidth, $vHeight, 'МЕДИЦИНСКОЕ ЗАКЛЮЧЕНИЕ', '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'о характере полученных повреждений здоровья в результате несчастного', '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, 'случая на производстве и степени их тяжести', '', 0, 'C'); $this->Ln($vHeight); $this->Ln($vHeight); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize * 1.5; $vBlock = array(); $vBlock[] = array('title' => 'Выдано', 'text' => iconv("utf8", "windows-1251", @$AConclusion['employment_place'])); $vBlock[] = array('title' => 'О том, что пострадавший', 'text' => iconv("utf8", "windows-1251", FormatNameEx($AConclusion))); $vBlock[] = array('title' => 'дата рождения', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$AConclusion['born_date']))); $vBlock[] = array('title' => 'должность (профессия)', 'text' => iconv("utf8", "windows-1251", @$AConclusion['profession'])); $vBlock[] = array('title' => 'поступил в', 'text' => iconv("utf8", "windows-1251", @$vBranchInfo['name'])); $vBlock[] = array('title' => 'дата и время обращения', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(@$AConclusion['create_time']))); $vBlock[] = array('title' => 'Диагноз', 'text' => iconv("utf8", "windows-1251", @$AConclusion['diagnosis'])); $vBlock[] = array('title' => 'Код диагноза по МКБ', 'text' => iconv("utf8", "windows-1251", @$AConclusion['diagnosis_mkb'])); $this->BlockNotes($vBlock, $vWidth); $this->Cell($vWidth, $vHeight, 'Согласно схеме определения степени тяжести повреждения здоровья при несчастных случаях', '', 0, 'L'); $this->Ln($vHeight); $vBlock = array(); $vBlock[] = array('title' => 'на производстве указанное повреждение относится к категории', 'text' => iconv("utf8", "windows-1251", @$vHeavitiesList[$AConclusion['heavity']])); $this->BlockNotes($vBlock, $vWidth); $this->Ln($vHeight); $vBlock = array(); $vBlock[] = array('title' => 'Врач', 'text' => iconv("utf8", "windows-1251", FormatUserName(@$AConclusion['doctor_id']))); $vBlock[] = array('title' => 'Дата', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong($vDB->ConvertToDate(time())))); $this->BlockNotes($vBlock, $vWidth); $this->Ln($vHeight); }
function FirstPage($ASurgery) { $this->AddPage(); $this->SetFont('arial_rus', '', 10); $vWidth = $this->GetAreaWidth(); $vHeight = $this->FontSize; // $this->Image('images/ill.jpeg', 0, 0, 140, 207); if ($ASurgery['ill_doc_is_continue']) { $this->MarkContinue(); } else { $this->MarkPrimary(); } $vCase =& $ASurgery['case']; if (DateIsEmpty($ASurgery['ill_beg_date']) && !DateIsEmpty($vCase['disability_from_date'])) { $ASurgery['ill_beg_date'] = $vCase['disability_from_date']; } else { if (!DateIsEmpty($ASurgery['ill_beg_date']) && DateIsEmpty($vCase['disability_from_date'])) { $vCase['disability_from_date'] = $ASurgery['ill_beg_date']; } } // print_r($ASurgery); // $vName = trim($vCase['last_name'].' '.$vCase['first_name'].' '.$vCase['patr_name']); $vName = iconv('utf-8', 'cp1251', FormatNameEx($vCase)); $this->Text(18, 19, $vName); $vDocName = iconv('utf-8', 'cp1251', FormatUserName($ASurgery['user_id'])); $this->Text(95, 19, $vDocName); $vAddress = iconv('utf-8', 'cp1251', @FormatAddress($vCase['addr_reg_street'], $vCase['addr_reg_num'], $vCase['addr_reg_subnum'], $vCase['addr_reg_apartment'])); $this->Text(18, 24, $vAddress); $this->Text(120, 24, $vCase['id']); $this->Text(18, 29, $vCase['employment_place']); $vDate = explode(' ', iconv('utf-8', 'cp1251', Date2ReadableLong($ASurgery['ill_beg_date']))); if (!empty($vDate[2])) { $vDate[2] = substr($vDate[2], -2); } $this->Text(27, 34, @($vDate[0] . ' ' . $vDate[1])); $this->Text(75, 34, @$vDate[2]); // ----------------------------------------------------------------- $vIllFromDate = iconv('utf-8', 'cp1251', Date2ReadableLong($vCase['disability_from_date'])); if (!empty($vIllFromDate)) { $this->Text(80, 48, 'C ' . $vIllFromDate); } // $this->Text(15, 59, 'СПб ГУЗ ГП №51, Космонавтов 35'); $vBranchInfo = GetBranchInfo(); $this->Text(15, 59, @$vBranchInfo['ill_doc_name']); $this->Text(24, 63.5, $vDate[0] . ' ' . $vDate[1]); $this->Text(70, 63.5, $vDate[2]); $this->Text(15, 69, $vName); $this->Text(110, 69, CalcAge($vCase['born_date'], $ASurgery['ill_beg_date'])); if ($vCase['is_male']) { $this->Ellipse(124, 68, 3, 2); } else { $this->Ellipse(131, 68, 3, 2); } $this->Text(15, 73.5, $vCase['employment_place']); }
function Render(&$AInfo) { $vDB = GetDB(); $vBranchInfo = GetBranchInfo(); $this->AddPage(); $this->SetFont('arial_rus', '', 10); $vWidth = $this->GetAreaWidth() / 2 - 10; $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->Cell($vWidth, $vHeight, '', '', 0, 'L'); $this->Ln($vHeightLN); $this->ExactCell($vHeight, 'Код ОГРН '); $this->BoxedText($vWidth, $vHeight, iconv("utf8", "windows-1251", $vBranchInfo['OGRN'])); $this->Ln($vHeightLN); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize; $vHeightLN = $this->FontSize * 1.5; $this->Cell($vWidth, $vHeight, 'НАПРАВЛЕНИЕ НА ЛФК', '', 0, 'C'); $this->Ln($vHeightLN); // $this->Notes('Карта стационарного (амб.) больного №', 0, $vWidth, 1, @$AInfo['case_id']); $this->Notes('Фамилия, имя, отчество', 0, $vWidth, 1, FormatShortNameEx($AInfo)); $vX = $this->GetX(); $vY = $this->GetY(); $this->Notes('Возраст ', 0, $vWidth / 2, 1, CalcAge(@$AInfo['born_date'])); $this->SetXY($vX + $vWidth / 2, $vY); $this->Notes('Пол', 0, $vWidth / 2, 1, iconv("utf8", "windows-1251", FormatSex($AInfo['is_male']))); $vBlock = array(); $vBlock[] = array('title' => 'Адрес', 'text' => iconv("utf8", "windows-1251", FormatAddress(@$AInfo['addr_reg_street'], @$AInfo['addr_reg_num'], @$AInfo['addr_reg_subnum'], @$AInfo['addr_reg_apartment']))); $vBlock[] = array('title' => 'Документ', 'text' => iconv("utf8", "windows-1251", FormatDocument(@$AInfo['doc_type_id'], @$AInfo['doc_series'], @$AInfo['doc_number']))); $vBlock[] = array('title' => 'Полис', 'text' => iconv("utf8", "windows-1251", FormatPolisEx(@$AInfo['insurance_company_id'], @$AInfo['polis_series'], @$AInfo['polis_number']))); $vBlock[] = array('title' => 'Диагноз', 'text' => iconv("utf8", "windows-1251", @$AInfo['diagnosis']), 'rows' => 3); $vBlock[] = array('title' => 'Дата', 'text' => iconv("utf8", "windows-1251", Date2ReadableLong(date('Y-m-d', time())))); $vBlock[] = array('title' => 'Врач', 'text' => iconv("utf8", "windows-1251", FormatUserName(@$AInfo['doctor_id']))); $this->BlockNotes($vBlock, $vWidth); }
function DrawLine($ACase) { // $vWidth = $this->GetAreaWidth(); $vHeight = $this->FontSize * 1.5; $vRowData = array(); $vRowData[] = $ACase['id']; $vRowData[] = Date2Readable($ACase['create_time']); $vRowData[] = FormatUserName($ACase['first_doctor_id']); // $vRowData[] = $ACase['last_name'].' '.$ACase['first_name'].' '.$ACase['patr_name']; $vRowData[] = FormatNameEx($ACase); $vRowData[] = FormatBornDateAndAge($ACase['create_time'], $ACase['born_date']); $vRowData[] = FormatSex($ACase['is_male']); $vRowData[] = FormatAddresses(FormatAddress($ACase['addr_reg_street'], $ACase['addr_reg_num'], $ACase['addr_reg_subnum'], $ACase['addr_reg_apartment']), FormatAddress($ACase['addr_phys_street'], $ACase['addr_phys_num'], $ACase['addr_phys_subnum'], $ACase['addr_phys_apartment'])); $vRowData[] = $ACase['phone']; $vRowData[] = $ACase['accident']; $vRowData[] = Date2Readable($ACase['accident_datetime']); $vRowData[] = $ACase['diagnosis']; $vRowData[] = $ACase['message_number']; foreach ($vRowData as &$v) { $v = iconv('utf-8', 'cp1251', $v); } $this->OutTableRow($vHeight, $vRowData); $this->OutTableRow($vHeight, $vRowData); }
function DrawLine($ACEC) { $vBranchInfo = GetBranchInfo(); $vHeight = $this->FontSize * 1.5; $vRowData = array(); $vCECDate = ExtractWord($ACEC['date'], ' ', 0); $vCaseID = $ACEC['case_id']; $vNumCECesBefore = GetNumCECes($vCaseID, $vCECDate, $ACEC['id']); $vCECNumber = $ACEC['cec_number']; if ($vCECNumber == 0) { $vCECNumber = ''; } $vRowData[] = $vCECNumber . "\n(" . ($vNumCECesBefore + 1) . ')'; // 'Дата', $vRowData[] = Date2Readable($vCECDate); // 'Врач', $vRowData[] = FormatUserName($ACEC['user_id']); // 'Ф.И.О. больного' & 'Дата рождения' // $vRowData[] = FormatName($ACEC['last_name'], $ACEC['first_name'],$ACEC['patr_name']) $vRowData[] = FormatNameEx($ACEC) . "\n" . FormatBornDateAndAge($vCECDate, $ACEC['born_date']) . "\nи.б. " . $vCaseID; // $vRowData[] = FormatSex($ACase['is_male']); // 'Адрес', $vRowData[] = FormatAddress($ACEC['addr_reg_street'], $ACEC['addr_reg_num'], $ACEC['addr_reg_subnum'], $ACEC['addr_reg_apartment']); // $vRowData[] = $ACase['phone']; // 'Место работы' & 'Профессия' $vTmpList = array(); $vTmp = FormatWorkableAge($vCECDate, $ACEC['born_date'], $ACEC['is_male']); if (!empty($vTmp)) { $vTmpList[] = $vTmp; } $vTmp = FormatCategory($ACEC['employment_category_id']); if (!empty($vTmp)) { $vTmpList[] = $vTmp; } $vTmp = $ACEC['employment_place']; if (!empty($vTmp)) { $vTmpList[] = $vTmp; } $vTmp = $ACEC['profession']; if (!empty($vTmp)) { $vTmpList[] = $vTmp; } $vRowData[] = implode(",\n", $vTmpList); // 'Диагноз', $vRowData[] = $ACEC['diagnosis']; // '№ листка нетрудоспособности', $vTmp = $ACEC['ill_doc']; if (!empty($vTmp)) { $vTmp .= "\n" . Date2Readable($ACEC['disability_from_date']); $vTmp .= "\n" . Date2Readable($vCECDate); $vTmp .= "\n(" . (DateDiff($vCECDate, $ACEC['disability_from_date']) + 1) . ')'; } $vRowData[] = $vTmp; // 'Заключение комиссии' $vRowData[] = "лечение продлено\nс " . Date2Readable(DateAddDay($vCECDate)) . "\nпо " . Date2Readable($ACEC['cec_cureup_date']) . "\n(" . DateDiff($ACEC['cec_cureup_date'], $vCECDate) . ')'; // 'Подписи членов комиссии' $vTmp = $ACEC['cec_members']; if (empty($vTmp)) { $vTmp = $vBranchInfo['cec_members']; } $vRowData[] = $vTmp; foreach ($vRowData as &$v) { $v = iconv('utf-8', 'cp1251', $v); } $this->OutTableRow($vHeight, $vRowData); }
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($AParams) { global $RowDescr; $this->SetFont('arial_rus', '', 9); $vHeight = $this->FontSize * 1.5; $vWidth = $this->GetAreaWidth(); $vDB = GetDB(); $vBegDate = $AParams['beg_date']; $vEndDate = $AParams['end_date']; list($vTable, $vFilter, $vOrder) = ConstructSurgeriesQuery($vDB, $AParams); $vSurgeries = $vDB->Select($vTable, 'emst_surgeries.case_id, emst_surgeries.date, emst_surgeries.user_id,' . 'emst_surgeries.diagnosis, emst_surgeries.diagnosis_mkb,' . 'emst_surgeries.ill_doc, ' . 'emst_cases.first_name, emst_cases.last_name, emst_cases.patr_name, emst_cases.born_date, emst_cases.is_male,' . 'emst_cases.addr_reg_street, emst_cases.addr_reg_num, emst_cases.addr_reg_subnum, emst_cases.addr_reg_apartment, ' . 'emst_cases.employment_place, emst_cases.profession', $vFilter, $vOrder); foreach ($vSurgeries as &$v2) { $v2 = iconv('utf-8', 'cp1251', $v2); } $this->AddPage(); $this->Cell($vWidth, $vHeight, iconv('utf-8', 'cp1251', 'КНИГА'), '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, iconv('utf-8', 'cp1251', 'учета выборочного контроля'), '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, iconv('utf-8', 'cp1251', 'за выданными листками нетрудоспособности'), '', 0, 'C'); $this->Ln($vHeight); $this->Cell($vWidth, $vHeight, iconv('utf-8', 'cp1251', 'с ') . iconv('utf-8', 'cp1251', Date2ReadableLong($vBegDate)) . iconv('utf-8', 'cp1251', ' г. по ') . iconv('utf-8', 'cp1251', Date2ReadableLong($vEndDate)) . iconv('utf-8', 'cp1251', ' г.'), '', 0, 'C'); $this->Ln($vHeight * 2); $vCols = array('№', 'дата проверки', 'врач', "ФИО,\nдата рождения,\nадрес", 'место работы', 'диагноз', "Л/Н", 'д/к', "допо-\nлнено к обсле-\nдованию", "допо-\nлнено к лече-\nнию", "допо-\nлнено к диаг-\nнозу", "Л/Н выдан необос-\nнованно", "нару-\nшение инстру-\nкций", "дефек-\nты в докумен-\nтации", 'подписи врачей'); foreach ($vCols as &$v) { $v = iconv('utf-8', 'cp1251', $v); } $this->OutTableRow($vHeight, $vCols); $this->OutColNumbers(); while ($vRecord = $vSurgeries->Fetch()) { $vRowData = array($vRecord['case_id'], Date2Readable($vRecord['date']), FormatUserName($vRecord['user_id']), FormatNameEx($vRecord) . "\n" . Date2Readable($vRecord['born_date']) . "\n" . FormatAddress($vRecord['addr_reg_street'], $vRecord['addr_reg_num'], $vRecord['addr_reg_subnum'], $vRecord['addr_reg_apartment']), $vRecord['employment_place'] . "\n" . $vRecord['profession'], $vRecord['diagnosis'], $vRecord['ill_doc'], 1, '', '', '', '', '', '', ''); // подписи врачей foreach ($vRowData as &$vq) { $vq = iconv('utf-8', 'cp1251', $vq); } $this->OutTableRow($vHeight, $vRowData); } }
function OutCard($ACaseID, &$ASurgeries) { $vDB = GetDB(); $vCase = $vDB->GetById('emst_cases', $ACaseID); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize * 1.5; $vWidth = $this->GetAreaWidth(); // $vName = trim(@$vCase['last_name'].' '.@$vCase['first_name'].' '.@$vCase['patr_name']); $vName = FormatNameEx($vCase); $this->Cell(20, $vHeight, 'Ф.И.О.'); $this->Cell(70, $vHeight, $vName, 'B'); $this->ExactCell($vHeight, ' И.Б. № '); $this->Cell(15, $vHeight, $ACaseID, 'B'); // $this->Ln($vHeight); $this->ExactCell($vHeight, ' пол '); $this->Cell(5, $vHeight, FormatSex(@$vCase['is_male']), 'B'); $this->ExactCell($vHeight, ' дата рождения '); $this->Cell(30, $vHeight, Date2Readable(@$vCase['born_date']), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Категория'); $this->Cell(20, $vHeight, '11-прочее', 'B'); $this->ExactCell($vHeight, ' работабщий '); $this->Cell(10, $vHeight, FormatBoolean(@$vCase['employment_category_id'] == 1), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Документ'); $this->Cell(70, $vHeight, FormatDocument(@$vCase['doc_type_id'], @$vCase['doc_series'], @$vCase['doc_number']), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Полис'); $this->Cell(70, $vHeight, FormatPolis(@$vCase['insurance_company_id'], @$vCase['polis_series'], @$vCase['polis_number']), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Адр.рег.'); $this->Cell(70, $vHeight, FormatAddress(@$vCase['addr_reg_street'], @$vCase['addr_reg_num'], @$vCase['addr_reg_subnum'], @$vCase['addr_reg_apartment']), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Адр.факт.'); $this->Cell(70, $vHeight, FormatAddress(@$vCase['addr_phys_street'], @$vCase['addr_phys_num'], @$vCase['addr_phys_subnum'], @$vCase['addr_phys_apartment']), 'B'); $this->Ln($vHeight); $vCount = count($ASurgeries); if ($vCount > 0) { $vLast = $ASurgeries[$vCount - 1]; } else { $vLast = array(); } $this->Cell(20, $vHeight, 'Цель'); $this->Cell(30, $vHeight, '1-Леч.-диагн.', 'B'); $this->Cell(20, $vHeight, 'Случай'); $this->Cell(30, $vHeight, '1-Первичный', 'B'); $this->Cell(30, $vHeight, 'Законченность'); $this->Cell(10, $vHeight, FormatBoolean(!empty($vLast['clinical_outcome_id'])), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Исход'); $this->Cell(70, $vHeight, FormatClinicalOutcome(@$vLast['clinical_outcome_id'], @$vLast['clinical_outcome_notes']), 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Диагноз'); $vTmp = $vCase['diagnosis']; if (strlen($vTmp) > 80) { $vTmp = substr($vTmp, 0, 80 - 3) . '...'; } $this->Cell(140, $vHeight, $vTmp, 'B'); $this->Cell(10, $vHeight, 'МКБ'); $this->Cell(20, $vHeight, @$vCase['diagnosis_mkb'], 'B'); $this->Ln($vHeight); $this->Cell(20, $vHeight, 'Характер'); $this->Cell(20, $vHeight, '1-Острое', 'B'); $this->Cell(20, $vHeight, 'Травма'); $this->Cell(60, $vHeight, FormatTraumaType(@$vCase['trauma_type_id']), 'B'); $this->Ln($vHeight); $this->CheckSpace($vHeight * 4); $this->Cell(40, $vHeight, 'ПОСЕЩЕНИЯ'); $this->Ln($vHeight); $this->OutSurgery($vHeight, array('№', 'Дата', 'Врач', 'Специальность', 'Цель', 'Место'), 'C'); for ($i = 0; $i < $vCount; $i++) { $vSurgery =& $ASurgeries[$i]; $this->OutSurgery($vHeight, array(1 + $i, Date2Readable(ExtractWord($vSurgery['date'], ' ', 0)), FormatUserName($vSurgery['user_id']), 'травматолог', '1-Леч.диагн.', '1-Амбулаторно')); } $vIllDocs = array(); $vPrevIllDoc = null; for ($i = 0; $i < $vCount; $i++) { $vSurgery =& $ASurgeries[$i]; if (!empty($vSurgery['ill_doc'])) { if (empty($vPrevIllDoc) || $vPrevIllDoc['ill_doc'] != $vSurgery['ill_doc'] || $vPrevIllDoc['ill_beg_date'] != $vSurgery['ill_beg_date'] || $vPrevIllDoc['ill_end_date'] != $vSurgery['ill_end_date']) { $vIllDocs[] = $vSurgery; $vPrevIllDoc =& $vSurgery; } } } if (count($vIllDocs)) { $this->CheckSpace($vHeight * 4); $this->Cell(40, $vHeight, 'НЕТРУДОСПОСОБНОСТЬ'); $this->Ln($vHeight); $this->OutIllDoc($vHeight, array('№', 'Док.', 'Врач', 'Повод', 'Дата откр.', 'Дата закр.', 'Кому', 'Пол', 'Возр.'), 'C'); for ($i = 0; $i < count($vIllDocs); $i++) { $vSurgery = $vIllDocs[$i]; $this->OutIllDoc($vHeight, array(1 + $i, '1-Б/Л', FormatUserName($vSurgery['user_id']), '1-Заб.', Date2Readable($vSurgery['ill_beg_date']), Date2Readable($vSurgery['ill_end_date']), '1-Пац', FormatSex(@$vCase['is_male']), CalcAge(@$vCase['born_date'], $vSurgery['ill_beg_date']))); } $this->Cell(20, $vHeight, 'Б/Л. '); $this->Cell(40, $vHeight, $vIllDocs[count($vIllDocs) - 1]['ill_doc'], 'B'); } // $this->Ln($vHeight); // $this->Cell($vWidth, $vHeight, ); // $this->Ln($vHeight); // $this->Cell($vWidth, $vHeight, Date2Readable(@$vCase['born_date'])); $this->Ln($vHeight); $this->Ln($vHeight); }
function Render(&$AStudinfo) { $vDB = GetDB(); $vName = FormatNameEx($AStudinfo); $this->SetMargins(0, 0, 0); $this->SetAutoPageBreak(true, 0); $vBranchInfo = GetBranchInfo(); $this->AddPage(); // $this->Image('images/studinfo.jpeg', 10, 2, 284, 201); # ============================================================= # первая страница $this->SetFont('times', '', 10.5); $vHeight = $this->FontSize; $this->SetXY(80, 9); $this->ExactCell($vHeight, 'Код формы по ОКУД __________'); $this->SetXY(80, 13); $this->ExactCell($vHeight, 'Код учреждения по ОКПО ______'); $this->Line(12, 19, 135, 19); $this->Line(12, 24, 85, 24); $this->Line(12, 32, 135, 32); $this->Line(85, 19, 85, 32); $this->SetXY(12, 19); $this->Cell(85 - 12, 24 - 19, 'Министерство здравоохранения СССР', '', 0, 'C'); $this->SetXY(12, 24); $this->SetFont('times', '', 9.5); $this->Cell(85 - 12, 2, 'наименование учреждения', '', 0, 'C'); $this->SetFont('courier', '', 10.5); $this->SetXY(12, 25); $this->MultiCell(85 - 12, 3.5, iconv("utf8", "windows-1251", @$vBranchInfo['name']), 0, 'L'); $this->SetFont('times', '', 10.5); $this->SetXY(85, 19); $this->MultiCell(135 - 85, (32 - 19) / 4, "Медицинская документация\nФорма № 095/у\nУтв. Минздравом СССР\n04.10.80 № 1030", 0, 'C'); $this->SetFont('times', 'B', 15.5); $this->SetXY(21, 35); $this->ExactCell($this->FontSize, 'Контрольный талон к справке № _________'); $this->SetFont('times', '', 11.5); $this->SetXY(11, 44); $this->ExactCell($this->FontSize, 'Дата выдачи '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $this->SetFont('courier', '', 12); $this->SetXY(55, 44); // $this->ExactCell($this->FontSize, Date2ReadableLong($vDB->ConvertToDate(time()))); // $this->ExactCell($this->FontSize, Date2ReadableLong($vDB->ConvertToDate(@$AStudinfo['date']))); $this->ExactCell($this->FontSize, iconv("utf8", "windows-1251", Date2ReadableLong(@$AStudinfo['date']))); $this->SetFont('times', '', 11.5); $this->SetXY(11, 51); $this->ExactCell($this->FontSize, 'Фамилия, имя, отчество '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $this->Line(12, $vY + 7, 135, $vY + 7); $this->SetFont('courier', '', 12); $this->SetXY(55, 49); $this->MultiCell(135 - 50, 7, iconv("utf8", "windows-1251", $vName), 0, 'L'); $this->SetFont('times', '', 11.5); $this->SetXY(11, 64); $this->ExactCell($this->FontSize, 'Название учебного заведения, детского дошкольного учреждения'); $vY = $this->GetY() + $this->FontSize + 7; $this->Line(12, $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $this->SetFont('courier', '', 12); $this->SetXY(11, 69); $this->MultiCell(135 - 11, 7, iconv("utf8", "windows-1251", @$AStudinfo['studinfo_target']), 0, 'L'); $this->SetFont('times', '', 11.5); $this->SetXY(11, 91); $this->ExactCell($this->FontSize, 'Диагноз заболевания '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); list($vDiagnosis, $vFontSize, $vStep) = $this->SelectFontSize(iconv("utf8", "windows-1251", @$AStudinfo['diagnosis']), array(87, 125), 12, 7, 5); // $this->SetFont('courier','',$vFontSize); // $vTexts = $this->SplitText(@$AStudinfo['diagnosis'], array(87, 125)); $vX1 = 50; $vY1 = 91; for ($i = 0; $i < count($vDiagnosis); $i++) { $this->SetXY($vX1, $vY1); $this->ExactCell($this->FontSize, iconv("utf8", "windows-1251", $vDiagnosis[$i])); $vX1 = 11; $vY1 += $vStep; } $this->SetFont('times', '', 11.5); $this->SetXY(11, 126); $this->ExactCell($this->FontSize, 'Освобожден с '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 82, $vY); $this->SetFont('times', '', 11.5); $this->SetXY(82, 126); $this->ExactCell($this->FontSize, 'по '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $this->SetFont('times', '', 11.5); $this->SetXY(11, 134); $this->ExactCell($this->FontSize, 'Освобождение'); $this->SetXY(11, 139); $this->SetFont('times', '', 11.5); $this->ExactCell($this->FontSize, ' продлено с '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 82, $vY); $this->SetFont('times', '', 11.5); $this->SetXY(82, 139); $this->ExactCell($this->FontSize, 'по '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $this->SetFont('times', '', 11.5); $this->SetXY(11, 149); $this->ExactCell($this->FontSize, 'Фамилия врача, выдавшего справку '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, 135, $vY); $vY += 7; $this->Line(12, $vY, 135, $vY); $this->SetFont('courier', '', 12); $this->SetXY($this->GetX(), 149); $this->ExactCell($this->FontSize, iconv("utf8", "windows-1251", iconv("utf8", "windows-1251", FormatUserName(@$AStudinfo['doctor_id'])))); $this->SetFont('times', '', 11.5); $this->SetXY(11, 162); $this->ExactCell($this->FontSize, 'ПРИМЕЧАНИЕ:'); $this->SetXY(45, 162); $this->ExactCell($this->FontSize, 'Контрольные талоны служат для учета выданных'); $this->SetXY(45, 169); $this->ExactCell($this->FontSize, 'справок'); $this->SetFont('times', '', 1); $this->SetXY(11, 200); $this->ExactCell($this->FontSize, 'A кроме того они очень годны для задалбывания программиста. Для самолётиков они явно маловаты, а самое им место - в сортире!'); # ============================================================= # вторая страница: $vX = 145; $this->SetFont('times', '', 10.5); $vHeight = $this->FontSize; $this->SetXY($vX + 80, 9); $this->ExactCell($vHeight, 'Код формы по ОКУД __________'); $this->SetXY($vX + 80, 13); $this->ExactCell($vHeight, 'Код учреждения по ОКПО ______'); $this->Line($vX + 12, 19, $vX + 135, 19); $this->Line($vX + 12, 24, $vX + 85, 24); $this->Line($vX + 12, 32, $vX + 135, 32); $this->Line($vX + 85, 19, $vX + 85, 32); $this->SetXY($vX + 12, 19); $this->Cell(85 - 12, 24 - 19, 'Министерство здравоохранения СССР', '', 0, 'C'); $this->SetXY($vX + 12, 24); $this->SetFont('times', '', 9.5); $this->Cell(85 - 12, 2, 'наименование учреждения', '', 0, 'C'); $this->SetFont('courier', '', 10.5); $this->SetXY($vX + 12, 25); $this->MultiCell(85 - 12, 3.5, iconv("utf8", "windows-1251", @$vBranchInfo['name']), 0, 'L'); $this->SetFont('times', '', 10.5); $this->SetXY($vX + 85, 19); $this->MultiCell(135 - 85, (32 - 19) / 4, "Медицинская документация\nФорма № 095/у\nУтв. Минздравом СССР\n04.10.80 № 1030", 0, 'C'); $this->SetFont('times', 'B', 16); $this->SetXY($vX + 43, 35); $this->ExactCell($this->FontSize, 'С П Р А В К А № _________'); $this->SetFont('times', 'B', 12.5); $this->SetXY($vX + 6, 42); $this->MultiCell(142 - 6, $this->FontSize + 0.5, "о временной нетрудоспособности студента, учащегося техникума,\nпрофессионально-технического училища, о болезни, карантине\nи прочих причинах отсутствия ребенка, посещающего школу,\nдетское дошкольное учреждение (нужное подчеркнуть)", 0, 'C'); $vY = 42 + $this->FontSize; $vY1 = $vY + $this->FontSize + 0.5; $vY2 = $vY1 + $this->FontSize + 0.5; $vY3 = $vY2 + $this->FontSize + 0.5; switch (@$AStudinfo['studinfo_type']) { case 1: // студент ВУЗ $this->Line($vX + 8, $vY, $vX + 74, $vY); // о временной нетрудоспособности $this->Line($vX + 75, $vY, $vX + 93, $vY); // студента break; case 2: // студент техникума $this->Line($vX + 8, $vY, $vX + 74, $vY); // о временной нетрудоспособности $this->Line($vX + 95, $vY, $vX + 140, $vY); // учащегося техникума break; case 3: // ПТУ $this->Line($vX + 8, $vY, $vX + 74, $vY); // о временной нетрудоспособности $this->Line($vX + 95, $vY, $vX + 120, $vY); // учащегося $this->Line($vX + 10, $vY1, $vX + 93, $vY1); // профессионально-технического училища break; case 4: // школьник $this->Line($vX + 95, $vY1, $vX + 114, $vY1); // о болезни $this->Line($vX + 75, $vY2, $vX + 91, $vY2); // ребенка $this->Line($vX + 93, $vY2, $vX + 136, $vY2); // посещающего школу break; case 5: // дошкольник $this->Line($vX + 95, $vY1, $vX + 114, $vY1); // о болезни $this->Line($vX + 75, $vY2, $vX + 91, $vY2); // ребенка $this->Line($vX + 93, $vY2, $vX + 121, $vY2); // посещающего $this->Line($vX + 18, $vY3, $vX + 84, $vY3); // детское дошкольное учреждение break; default: break; } # на будущее: # $this->Line($vX+116, $vY1, $vX+138, $vY1); /* карантине */ # $this->Line($vX+12, $vY2, $vX+91, $vY2); /* прочих причинах отсутствия ребенка */ # $this->Line($vX+75, $vY2, $vX+91, $vY2); /* ребенка */ $vOutDate = Date2ReadableLong(@$AStudinfo['date']); // $vOutDate = Date2ReadableLong($vDB->ConvertToDate(@$AStudinfo['date'])); // $vOutDate = Date2ReadableLong($vDB->ConvertToDate(time())); if (empty($vOutDate)) { $vOutDateParts = array('', '', ''); } else { $vOutDateParts = explode(' ', $vOutDate); } // Trace($vOutDate); // Trace($vOutDateParts); $this->SetFont('times', '', 10.5); $vHeight = $this->FontSize; $this->SetXY($vX + 36, 65); $this->ExactCell($vHeight, 'Дата выдачи " '); $this->SetFont('courier', '', 12); $this->Cell(8, $vHeight, iconv("utf8", "windows-1251", @$vOutDateParts[0]), 'B', 0, 'C'); $this->SetFont('times', '', 10.5); $this->ExactCell($vHeight, '" '); $this->SetFont('courier', '', 12); $this->Cell(25, $vHeight, iconv("utf8", "windows-1251", @$vOutDateParts[1]), 'B', 0, 'C'); $this->SetFont('courier', '', 12); $this->ExactCell($vHeight, iconv("utf8", "windows-1251", @$vOutDateParts[2])); $this->SetFont('times', '', 10.5); $this->ExactCell($vHeight, ' года '); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 10, 71); $this->MultiCell(145 - 10, $this->FontSize + 0.5, "студенту, учащемуся, ребенку, посещающему дошкольное учрежде-\nние (нужное подчеркнуть)", 0, 'L'); $vY = 71 + $this->FontSize; $vY1 = $vY + $this->FontSize + 0.5; switch (@$AStudinfo['studinfo_type']) { case 1: // студент ВУЗ $this->Line($vX + 11, $vY, $vX + 28, $vY); // студенту break; case 2: // студент техникума $this->Line($vX + 30, $vY, $vX + 51, $vY); // учащемуся break; case 3: // ПТУ $this->Line($vX + 30, $vY, $vX + 51, $vY); // учащемуся break; case 4: // школьник $this->Line($vX + 30, $vY, $vX + 51, $vY); // учащемуся break; case 5: // дошкольник $this->Line($vX + 53, $vY, $vX + 139, $vY); // посещающему дошкольное учрежде- $this->Line($vX + 11, $vY1, $vX + 18, $vY1); // ние break; default: break; } $this->Line($vX + 11, 86, $vX + 135, 86); $this->SetXY($vX + 10, 86); $this->SetFont('times', '', 9); $this->Cell(135 - 10, $this->FontSize, 'название учебного заведения, дошкольного', '', 0, 'C'); $this->Line($vX + 11, 95, $vX + 135, 95); $this->SetXY($vX + 10, 95); $this->SetFont('times', '', 9); $this->Cell(135 - 10, $this->FontSize, 'учреждения', '', 0, 'C'); $this->SetFont('courier', '', 12); $this->SetXY($vX + 12, 79); $this->MultiCell(135 - 12, 9, iconv("utf8", "windows-1251", @$AStudinfo['studinfo_target']), 0, 'L'); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 11, 101); $this->ExactCell($this->FontSize, 'Фамилия, имя, отчество '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); $this->Line($vX + 12, $vY + 6.5, $vX + 135, $vY + 6.5); $this->SetFont('courier', '', 12); $this->SetXY($vX + 57, 100); $this->MultiCell(135 - 57, 6, iconv("utf8", "windows-1251", $vName), 0, 'L'); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 11, 114); $this->ExactCell($this->FontSize, 'Дата рождения (год, месяц, для детей до одного года - день) '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); $this->Line($vX + 12, $vY + 6.5, $vX + 135, $vY + 6.5); $this->SetFont('courier', '', 12); $this->SetXY($vX + 12, $vY + 6 - $this->FontSize); $this->ExactCell($this->FontSize, iconv("utf8", "windows-1251", Date2ReadableLong(@$AStudinfo['born_date']))); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 11, 127); $this->ExactCell($this->FontSize, 'Диагноз заболевания (прочие причины отсутствия) '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); $this->Line($vX + 12, $vY + 6.5, $vX + 135, $vY + 6.5); $this->Line($vX + 12, $vY + 6.5 * 2, $vX + 135, $vY + 6.5 * 2); if (iconv("utf8", "windows-1251", @$AStudinfo['studinfo_show_diagnosis'])) { list($vDiagnosis, $vFontSize, $vStep) = $this->SelectFontSize(@$AStudinfo['diagnosis'], array(25, 125), 12, 6.5, 3); $vX1 = $vX + 110; $vY1 = 127; for ($i = 0; $i < count($vDiagnosis); $i++) { $this->SetXY($vX1, $vY1); $this->ExactCell($this->FontSize, $vDiagnosis[$i]); $vX1 = $vX + 11; $vY1 += $vStep; } $this->SetFont('times', '', 12.5); $this->SetXY($vX + 10, 192); $this->ExactCell($this->FontSize, 'Примечание: диагноз указан про просьбе пациента'); } $this->SetFont('times', '', 12.5); $this->SetXY($vX + 11, 147); $this->ExactCell($this->FontSize, 'Наличие контакта с инфекционными больными (нет, да, какими)'); $vY = $this->GetY() + $this->FontSize; $this->Line($vX + 105, $vY, $vX + 111, $vY); // нет $vY = $this->GetY() + $this->FontSize + 6; $this->Line($vX + 12, $vY, $vX + 135, $vY); $this->SetFont('times', '', 9); $this->SetXY($vX + 11, $vY); $this->Cell(135 - 10, $this->FontSize, '(подчеркнуть, вписать)', '', 0, 'C'); $vY += 6.5; $this->Line($vX + 12, $vY, $vX + 135, $vY); $this->SetFont('times', '', 9); $this->SetXY($vX + 11, $vY); $this->Cell(135 - 10, $this->FontSize, 'освобожден от занятий, посещений детского дошкольного учреждения', '', 0, 'C'); $vY += 7.5; $this->Line($vX + 12, $vY, $vX + 135, $vY); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 10, 173); $this->ExactCell($this->FontSize, 'с '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 68, $vY); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 69, 173); $this->ExactCell($this->FontSize, 'по '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 10, 178); $this->ExactCell($this->FontSize, 'с '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 68, $vY); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 69, 178); $this->ExactCell($this->FontSize, 'по '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); $this->SetFont('times', '', 12.5); $this->SetXY($vX + 10, 185); $this->ExactCell($this->FontSize, 'м.п. поликлиники'); $this->SetFont('times', 'BI', 12); $this->SetXY($vX + 64, 186); $this->ExactCell($this->FontSize, 'Подпись врача '); $vY = $this->GetY() + $this->FontSize; $this->Line($this->GetX(), $vY, $vX + 135, $vY); # =============================================================== # линия отреза $this->SetLineWidth(0.5); $this->SetDrawColor(128); $this->Line(149, 10, 149, 203); }
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, ' М.П.'); }
function DrawLine($ARG) { // $vWidth = $this->GetAreaWidth(); $vHeight = $this->FontSize * 1.5; $vRowData = array(); // 1) Дата направления $vRowData[] = Date2Readable($ARG['date']); // 2) № И.Б. $vRowData[] = $ARG['case_id']; // 3) Ф.И.О. пострадавшего // $vRowData[] = FormatName($ARG['last_name'], $ARG['first_name'], $ARG['patr_name']); $vRowData[] = FormatNameEx($ARG); // 4) Дата рождения (полных лет) $vRowData[] = FormatBornDateAndAge($ARG['date'], $ARG['born_date']); // 5) Пол // $vRowData[] = FormatSex($ARG['is_male']); // 6) Aдрес // $vRowData[] = FormatAddresses( // FormatAddress($ARG['addr_reg_street'], $ARG['addr_reg_num'], $ARG['addr_reg_subnum'], $ARG['addr_reg_apartment']), // FormatAddress($ARG['addr_phys_street'], $ARG['addr_phys_num'], $ARG['addr_phys_subnum'], $ARG['addr_phys_apartment'])); // 7) Телефон $vRowData[] = $ARG['phone']; // 8) Область $vRowData[] = $ARG['area']; // 9) Диагноз // $vRowData[] = $ARG['diagnosis']; // 10) Врач $vRowData[] = FormatUserName($ARG['user_id']); // 11) Описание $vRowData[] = $ARG['description']; foreach ($vRowData as &$v) { $v = iconv('utf-8', 'cp1251', $v); } $this->OutTableRow($vHeight, $vRowData); }
function Render(&$AInfo) { $vDB = GetDB(); $vBranchInfo = GetBranchInfo(); $this->AddPage(); $this->SetFont('arial_rus', '', 10); $vWidth = $this->GetAreaWidth() / 2 - 10; $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, @$vBranchInfo['name'], '', 0, 'L'); $this->Cell($vWidth, $vHeight, '', '', 0, 'L'); $this->Ln($vHeightLN); $this->ExactCell($vHeight, 'Код ОГРН '); // $this->BoxedText($vWidth, $vHeight, $vBranchInfo['OGRN']); $this->BoxedText($vWidth, $vHeight, ' '); $this->Ln($vHeightLN); $this->SetXY($vX, $vY); $this->Cell($vWidth, $vHeight, 'Медицинская документация', '', 0, 'R'); $this->Ln($vHeightLN); $this->Cell($vWidth, $vHeight, 'форма № 044/у', '', 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, '04.10.80 №1030', '', 0, 'R'); $this->Ln($vHeightLN); $this->Ln($vHeightLN); $this->SetFont('arial_rus', '', 10); $vHeight = $this->FontSize; $vHeightLN = $this->FontSize * 1.5; $this->Cell($vWidth, $vHeight, 'КАРТА', '', 0, 'C'); $this->Ln($vHeightLN); $this->Cell($vWidth, $vHeight, 'больного, лечащегося в физиотерапевтическом отделении (кабинете)', '', 0, 'C'); $this->Ln($vHeightLN); $this->Notes('Карта стационарного (амб.) больного №', 0, $vWidth, 1, @$AInfo['case_id']); $this->Notes('Лечащий врач', 0, $vWidth, 1, _2w(FormatUserName(@$AInfo['doctor_id']))); // $this->Notes('Фамилия, имя, отчество', 0, $vWidth, 1, FormatShortName(@$AInfo['last_name'], @$AInfo['first_name'], @$AInfo['patr_name'])); /* $this->Notes('Фамилия, имя, отчество', 0, $vWidth, 1, _2w(FormatShortNameEx($AInfo))); $vX = $this->GetX(); $vY = $this->GetY(); $this->Notes('Возраст', 0, $vWidth/2, 1, CalcAge(@$AInfo['born_date'])); $this->SetXY($vX+$vWidth/2, $vY); $this->Notes('Пол', 0, $vWidth/2, 1, FormatSex($AInfo['is_male'])); */ $this->Notes('Фамилия, имя, отчество', 0, $vWidth, 1, FormatShortNameEx($AInfo)); $vX = $this->GetX(); $vY = $this->GetY(); $this->Notes('Возраст', 0, $vWidth / 2, 1, CalcAge(@$AInfo['born_date'])); $this->SetXY($vX + $vWidth / 2, $vY); $this->Notes('Пол', 0, $vWidth / 2, 1, _2w(FormatSex($AInfo['is_male']))); $this->Notes('Адрес', 0, $vWidth, 1, _2w(FormatAddress(@$AInfo['addr_reg_street'], @$AInfo['addr_reg_num'], @$AInfo['addr_reg_subnum'], @$AInfo['addr_reg_apartment']))); $this->Notes('Из какого отделения (кабинета) направлен больной', 0, $vWidth, 1, _2w($vBranchInfo['name']), false); $vX = $this->GetX(); $vY = $this->GetY(); $this->Notes('Диагноз', 0, $vWidth, 4, _2w(@$AInfo['diagnosis']), false); $vX1 = $this->GetX(); $vY1 = $this->GetY(); $this->SetFont('arial_rus', '', 4); $this->SetXY($vX, $vY + $vHeightLN * 2 - $this->FontSize / 2); $this->Cell($vWidth, $vHeight, 'подчеркнуть заболевание, по поводу', '', 0, 'C'); $this->Ln($vHeightLN); $this->Cell($vWidth, $vHeight, 'которого больной направлен на физиотерапию', '', 0, 'C'); $this->SetXY($vX1, $vY1); $this->SetFont('arial_rus', '', 10); $this->Notes('Жалобы больного', 0, $vWidth, 2, '', false); $vX = $this->GetX(); $vY = $this->GetY() + 3; $this->SetXY($vX, $vY); $this->Cell(35, $vHeight, 'Назначение '); $this->Ln($vHeight); $this->Cell(35, $vHeight, 'процедуры'); $this->Ln($vHeight); $this->Cell(35, $vHeight, 'лечащим врачом'); $this->Ln($vHeight); $this->Cell(35, $vHeight, 'или врачом-'); $this->Ln($vHeight); $this->Cell(35, $vHeight, 'физиотерапевтом'); $this->Ln($vHeight); $this->Cell(35, $vHeight, '(подчеркнуть)'); $vX += 38; $this->SetXY($vX, $vY); $this->Cell(15, $vHeight, 'Дата', 'LTR', 0, 'C'); $this->Cell(30, $vHeight, 'Наименование', 'LTR', 0, 'C'); $this->Cell(10, $vHeight, 'К-во', 'LTR', 0, 'R'); $this->Cell(20, $vHeight, 'Продолжи-', 'LTR', 0, 'C'); $this->Cell(15, $vHeight, 'Дози-', 'LTR', 0, 'C'); $this->SetXY($vX, $vY + $vHeight); $this->Cell(15, $vHeight, '', 'LR', 0, 'C'); $this->Cell(30, $vHeight, 'процедуры', 'LR', 0, 'C'); $this->Cell(10, $vHeight, '', 'LR', 0, 'C'); $this->Cell(20, $vHeight, 'тельность', 'LR', 0, 'C'); $this->Cell(15, $vHeight, 'ровка', 'LR', 0, 'C'); for ($i = 0; $i < 3; $i++) { $this->SetXY($vX, $vY + $vHeight * 2 + $i * $vHeightLN); $this->Cell(15, $vHeightLN, '', 'LTRB', 0, 'C'); $this->Cell(30, $vHeightLN, '', 'LTRB', 0, 'C'); $this->Cell(10, $vHeightLN, '', 'LTRB', 0, 'C'); $this->Cell(20, $vHeightLN, '', 'LTRB', 0, 'C'); $this->Cell(15, $vHeightLN, '', 'LTRB', 0, 'C'); } $this->Ln($vHeightLN); $vX = $this->GetX(); $vY = $this->GetY(); $this->Line($vX, $vY + $vHeight / 2, $vX + $vWidth, $vY + $vHeight / 2); $this->Ln($vHeight); $this->Cell($vWidth * 0.6, $vHeight, 'Место проведения процедуры: кабинет,'); $this->Ln($vHeight); $this->Cell($vWidth * 0.6, $vHeight, 'перевязочная, на дому (подчеркнуть)'); $this->Ln($vHeight); $this->Cell($vWidth * 0.6, $vHeight, 'Виды лечения, назначенные помимо'); $this->Ln($vHeight); $this->Cell($vWidth * 0.6, $vHeight, 'физиотерапии (в том числе и медикаментозные)'); $this->Ln($vHeight); $this->Notes('', 0, $vWidth * 0.6, 3, '', false); $this->Notes('Эпикриз', 0, $vWidth * 0.6, 2, '', false); $this->Notes('Врач-физиотерапевт', 0, $vWidth * 0.6, 1, ''); $this->Image('images/angels.jpeg', $vX + $vWidth * 0.65, $vY + $vHeight, $vWidth * 0.35); }
function tcfUserName($AID) { return htmlspecialchars(FormatUserName($AID)); }
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, ' М.П.'); }