Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 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);
 }
Esempio n. 5
0
function tcfSex($ASex)
{
    return htmlspecialchars(FormatSex($ASex));
}