Ejemplo n.º 1
0
 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']);
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
0
function OutSurgery($ADBF, $ACase, $ASurgery, $AService)
{
    $vSMOList = locGetSMOList();
    $vDocSeries = trim(str_replace('-', ' ', $ACase['doc_series']));
    $vSpacePos = strpos($vDocSeries, ' ');
    if ($vSpacePos === false) {
        $vSerLeft = substr($vDocSeries, 0, 2);
        $vSerRight = substr($vDocSeries, 2);
    } else {
        $vSerLeft = substr($vDocSeries, 0, $vSpacePos);
        $vSerRight = substr($vDocSeries, $vSpacePos + 1);
    }
    $vBornDate = $ACase['born_date'];
    if (empty($vBornDate)) {
        $vBornDate = '0000-00-00';
    }
    $vBornDate = explode('-', $vBornDate);
    if ($vBornDate[0] == '0000') {
        $vBornDate[0] = '1901';
    }
    if ($vBornDate[1] == '00') {
        $vBornDate[1] = '01';
    }
    if ($vBornDate[2] == '00') {
        $vBornDate[2] = '01';
    }
    $vBornDate = implode('-', $vBornDate);
    $vSurgeryDate = $ASurgery['date'];
    //        Trace(@$ACase['insurance_company_id'].'=->'.@$vSMOList[$ACase['insurance_company_id']]);
    $vFirstDoctorId = $ACase['first_doctor_id'];
    $CurrDoctorId = $ASurgery['user_id'];
    $vRecord = array(FormatName($ACase['last_name']), FormatName($ACase['first_name']), FormatName($ACase['patr_name']), Date2DBF($vBornDate), $ACase['is_male'] ? 'м' : 'ж', 'э', strtoupper($ACase['polis_series']), strtoupper($ACase['polis_number']), '', '', $ACase['addr_reg_street'], '', '', $ACase['addr_reg_num'], $ACase['addr_reg_subnum'], $ACase['addr_reg_apartment'], 'аТрОт', CalcAge($vBornDate, $vSurgeryDate) >= 18 ? 'в' : 'д', Date2DBF($vSurgeryDate), Date2DBF($vSurgeryDate), '1', str_replace(' ', '', $ACase['diagnosis_mkb']), false, '', $ACase['doc_type_id'], $vSerLeft, $vSerRight, $ACase['doc_number'], FormatAddress(@$ACase['addr_reg_street'], @$ACase['addr_reg_num'], @$ACase['addr_reg_subnum'], @$ACase['addr_reg_apartment']), @$ACase['id'], 1, 0, 23, 'тр.' . @$ACase['id'], 118, 118, str_replace(' ', '', $ACase['diagnosis_mkb']), '', '', 16, 31, 31, 29, 1, 1, getUserEisCode($CurrDoctorId), getUserEisCode($vFirstDoctorId), '1', '1', 0, 0, 0, 0, 3, 5, 5, 0, 2, 0, 0, 0, 0);
    $vOutRecord = array();
    foreach ($vRecord as $vField) {
        $vOutRecord[] = iconv('UTF-8', 'CP866', $vField);
    }
    dbase_add_record($ADBF, $vOutRecord);
}
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
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);
 }
Ejemplo n.º 7
0
 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);
     }
 }
Ejemplo n.º 8
0
 function DrawLine($AIndex, $ACase)
 {
     //            $vWidth = $this->GetAreaWidth();
     $vHeight = $this->FontSize * 1.5;
     $vBornDate = explode('-', $ACase['born_date']);
     $vAccDate = explode(' ', $ACase['accident_datetime']);
     $vRowData = array();
     $vRowData[] = $AIndex;
     //            $vRowData[] = $ACase['last_name'].' '.$ACase['first_name'].' '.$ACase['patr_name'];
     $vRowData[] = FormatNameEx($ACase);
     $vRowData[] = @$vBornDate[0];
     $vRowData[] = SelectAddress(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[] = Date2Readable(@$vAccDate[0]);
     $vRowData[] = $ACase['accident'];
     $vRowData[] = $ACase['diagnosis'];
     $this->OutTableRow($vHeight, $vRowData);
 }
Ejemplo n.º 9
0
function DrawLine($AIndex, $ACase)
{
    $vBornDate = explode('-', $ACase['born_date']);
    $vAccDate = explode(' ', $ACase['accident_datetime']);
    $vAccDate[0] = Date2Readable($vAccDate[0]);
    $vAccDate[1] = explode(':', $vAccDate[1]);
    $vAccDate[1] = $vAccDate[1][0] . ':' . $vAccDate[1][1];
    $vAccDate = implode(', ', $vAccDate);
    $vUnknown = 'нет сведений';
    $vRowData = array();
    $vRowData[] = $AIndex;
    //        $vRowData[] = FormatName($ACase['last_name'], $ACase['first_name'],$ACase['patr_name'])
    $vRowData[] = FormatNameEx($ACase) . ",\n" . @$vBornDate[0] . ",\n" . FormatAddress($ACase['addr_reg_street'], $ACase['addr_reg_num'], $ACase['addr_reg_subnum'], $ACase['addr_reg_apartment']) . ",\n" . $ACase['phone'];
    //            $vRowData[] = Date2Readable($ACase['accident_datetime']);
    $vRowData[] = $vAccDate;
    $vRowData[] = $ACase['accident'];
    $vRowData[] = $vUnknown;
    $vRowData[] = $vUnknown;
    //            $vRowData[] = $vUnknown . ",\n" . $ACase['diagnosis'];
    $vRowData[] = $ACase['diagnosis'];
    OutTableRow($vRowData);
}
Ejemplo n.º 10
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);
 }
Ejemplo n.º 11
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.º 12
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);
 }
Ejemplo n.º 13
0
 function DrawLine($ADB, $AIndex, $ACase)
 {
     $vHeight = $this->FontSize * 1.5;
     $vBornDate = explode('-', $ACase['born_date']);
     $vAccDate = explode(' ', $ACase['accident_datetime']);
     $vAccDate[0] = Date2Readable($vAccDate[0]);
     $vAccDate[1] = explode(':', $vAccDate[1]);
     $vAccDate[1] = $vAccDate[1][0] . ':' . $vAccDate[1][1];
     $vAccDate = implode(', ', $vAccDate);
     $vUnknown = 'нет сведений';
     $vSurgeries = $ADB->Select('emst_surgeries', 'diagnosis, clinical_outcome_id, clinical_outcome_notes', $ADB->CondEqual('case_id', $ACase['id']), 'date, id', 1);
     if (($vFirstSurgery = $vSurgeries->Fetch()) === false) {
         $vFirstSurgery = array();
     }
     $vRowData = array();
     $vRowData[] = $AIndex;
     //            $vRowData[] = FormatName($ACase['last_name'], $ACase['first_name'],$ACase['patr_name'])
     $vRowData[] = FormatNameEx($ACase) . ",\n" . @$vBornDate[0] . ",\n" . FormatAddress($ACase['addr_reg_street'], $ACase['addr_reg_num'], $ACase['addr_reg_subnum'], $ACase['addr_reg_apartment']) . ",\n" . $ACase['phone'];
     //            $vRowData[] = Date2Readable($ACase['accident_datetime']);
     $vRowData[] = $vAccDate;
     $vRowData[] = $ACase['accident'];
     $vRowData[] = $vUnknown;
     $vRowData[] = $vUnknown;
     //            $vRowData[] = $vUnknown . ",\n" . $ACase['diagnosis'];
     //            $vRowData[] = $ACase['diagnosis'];
     $vColDataGosp = @FormatClinicalOutcome($vFirstSurgery['clinical_outcome_id'], $vFirstSurgery['clinical_outcome_notes']);
     $vColDataDiag = @$vFirstSurgery['diagnosis'];
     if (!empty($vColDataGosp) && !empty($vColDataDiag)) {
         $vColData = $vColDataGosp . ', ' . $vColDataDiag;
     } else {
         $vColData = $vColDataGosp . $vColDataDiag;
     }
     $vRowData[] = $vColData;
     foreach ($vRowData as &$v) {
         $v = iconv('utf-8', 'cp1251', $v);
     }
     $this->OutTableRow($vHeight, $vRowData);
 }
Ejemplo n.º 14
0
function tcfAddress($AID, &$ARow)
{
    $vRegAddr = FormatAddress(@$ARow['addr_reg_street'], @$ARow['addr_reg_num'], @$ARow['addr_reg_subnum'], @$ARow['addr_reg_apartment']);
    $vPhysAddr = FormatAddress(@$ARow['addr_phys_street'], @$ARow['addr_phys_num'], @$ARow['addr_phys_subnum'], @$ARow['addr_phys_apartment']);
    if ($vRegAddr == $vPhysAddr) {
        return htmlspecialchars($vPhysAddr);
    } else {
        return htmlspecialchars('Рег.:' . $vRegAddr) . '<br>' . htmlspecialchars('Факт:' . $vPhysAddr);
    }
}
Ejemplo n.º 15
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, ' М.П.');
 }