Example #1
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab =& new TTable($vTable, 'emst_cases.*, emst_surgeries.cec_number as cec_number, emst_surgeries.case_id as case_id, emst_surgeries.date as cec_date, emst_surgeries.user_id as doctor_id', $vFilter, $vOrder, 'case_id');
     $vTab->AddColumn('cec_number', '№ ВК');
     $vTab->AddDateColumn('cec_date', 'Дата');
     $vTab->AddColumn('case_id', '№', array('align' => 'right'));
     $vTab->AddColumn('doctor_id', 'Врач', array('align' => 'left', 'fmt' => 'tcfUserName'));
     $vTab->AddColumn('id', 'Фамилия Имя Отчество', array('align' => 'left', 'fmt' => 'tcfName'));
     $vTab->AddColumn('cec_date', 'Дата рождения, полных лет', array('align' => 'left', 'fmt' => 'tcfBornDate'));
     $vTab->AddColumn('is_male', 'Пол', array('align' => 'center', 'fmt' => 'tcfSex'));
     $vTab->AddRowAction('приём', 'accept.html?id=', '../images/sugrery_24x24.gif', 24, 24);
     $vTab->AddRowAction('изменение', 'case_edit.html?id=', '../images/edit_24x24.gif', 24, 24);
     $vTab->AddRowAction('печать', '../reg/case.pdf?id=', '../images/print_24x24.gif', 24, 24);
     $vTab->AddTextColumn('diagnosis', 'Диагноз');
     $vTab->AddColumn('diagnosis_mkb', 'МКБ');
     //            $vTab->AddColumn('antitetanus_series', 'Серия');
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('cec_list.pdf', $vFilter));
     //            $vTab->AddTableAction('сводный отчет',  CompoundURL('antitetanuses_report.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, $_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #2
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab =& new TCasesTableEx($vTable, 'emst_cases.*', $vFilter, $vOrder);
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('dms_list.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, $_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #3
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab =& new TCasesTableEx($vTable, 'emst_cases.*, emst_surgeries.manipulation_text, rb_manipulations.name as manipulation_name', $vFilter, $vOrder);
     $vTab->AddColumn('manipulation_name', 'Манипуляция');
     $vTab->AddColumn('manipulation_text', 'Описание');
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('plasters_list.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, $_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #4
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab =& new TCasesTableEx($vTable, 'emst_cases.*, rb_antitetanus.name as antitetanus_name', $vFilter, $vOrder);
     $vTab->AddColumn('antitetanus_name', 'Прививка');
     $vTab->AddColumn('antitetanus_series', 'Серия');
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('antitetanuses_list.pdf', $vFilter));
     $vTab->AddTableAction('сводный отчет', CompoundURL('antitetanuses_report.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, $_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #5
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructQuery($vDB, $_GET);
     $vTab =& new TTable($vTable, 'emst_rg.*, emst_cases.last_name, emst_cases.first_name, emst_cases.patr_name, emst_cases.born_date, emst_cases.is_male', $vFilter, $vOrder);
     $vTab->AddDateColumn('date', 'Дата');
     $vTab->AddColumn('case_id', '№', array('align' => 'right'));
     $vTab->AddColumn('id', 'Фамилия Имя Отчество', array('align' => 'left', 'fmt' => 'tcfName'));
     $vTab->AddColumn('date', 'Дата рождения, полных лет', array('align' => 'left', 'fmt' => 'tcfBornDate'));
     $vTab->AddColumn('is_male', 'Пол', array('align' => 'center', 'fmt' => 'tcfSex'));
     $vTab->AddColumn('area', 'Область');
     $vTab->AddBoolColumn('done', 'Выполнено');
     $vTab->AddLimTextColumn('description', 'Описание');
     $vTab->AddRowAction('изменить', '/doc/rg_dir_edit.html?id=');
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('rgs_list.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, @$_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #6
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab = new TTable($vTable, 'emst_cases.*', $vFilter, $vOrder, 'id');
     $vTab->AddColumn('id', '№', array('align' => 'right'));
     $vTab->AddDateColumn('create_time', 'Дата и время обращения');
     $vTab->AddColumn('first_doctor_id', 'Врач', array('fmt' => 'tcfUserName'));
     $vTab->AddColumn('id', 'Фамилия Имя Отчество', array('align' => 'left', 'fmt' => 'tcfName'));
     $vTab->AddColumn('create_time', 'Дата рождения, полных лет', array('align' => 'left', 'fmt' => 'tcfBornDate'));
     $vTab->AddColumn('is_male', 'Пол', array('align' => 'center', 'fmt' => 'tcfSex'));
     $vTab->AddColumn('id', 'Адрес', array('align' => 'left', 'fmt' => 'tcfAddress'));
     $vTab->AddColumn('phone', 'Телефон');
     $vTab->AddTextColumn('accident', 'Происшествие');
     $vTab->AddTextColumn('accident_datetime', 'Дата и время происшествия');
     $vTab->AddTextColumn('diagnosis', 'Диагноз');
     $vTab->AddColumn('message_number', 'Телефонограмма');
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('phone_messages_list.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, $_GET['PageIdx'] + 0, 20);
     return $vResult;
 }
Example #7
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructSurgeriesQuery($vDB, $_GET);
     $vTab =& new TTable($vTable, 'emst_surgeries.case_id, emst_surgeries.date, emst_surgeries.user_id,' . 'emst_surgeries.diagnosis, emst_surgeries.diagnosis_mkb,' . 'emst_cases.first_name, emst_cases.last_name, emst_cases.patr_name, emst_cases.born_date, emst_cases.is_male,' . gCaseWithBadDoc . ' as is_bad_docs,' . gSurgeryWithBadIllDoc . ' as is_bad_illdoc', $vFilter, $vOrder, 'case_id');
     $vTab->AddColumn('case_id', '№', array('align' => 'right'));
     $vTab->AddDateColumn('date', 'Дата и время приёма');
     $vTab->AddColumn('user_id', 'Врач', array('align' => 'left', 'fmt' => 'tcfUserName'));
     $vTab->AddColumn('id', 'Фамилия Имя Отчество', array('align' => 'left', 'fmt' => 'tcfName'));
     $vTab->AddColumn('date', 'Дата рождения, полных лет', array('align' => 'left', 'fmt' => 'tcfBornDate'));
     $vTab->AddColumn('is_male', 'Пол', array('align' => 'center', 'fmt' => 'tcfSex'));
     $vTab->AddTextColumn('diagnosis', 'Диагноз');
     $vTab->AddColumn('diagnosis_mkb', 'МКБ');
     $vTab->AddBoolColumn('is_bad_docs', 'Пробл. с док.');
     $vTab->AddBoolColumn('is_bad_illdoc', 'Пробл. с б/л');
     $vTab->AddRowAction('изменение', '../doc/case_edit.html?id=', '../images/edit_24x24.gif', 24, 24);
     $vTab->AddRowAction('печать', '../reg/case.pdf?id=', '../images/print_24x24.gif', 24, 24);
     $vFilter = array();
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('illdocs_check.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, GetPageIdxOrLast(), 20);
     return $vResult;
 }
Example #8
0
        CopyRecordStrValue($vFilter, $_GET, 'patr_name');
        CopyRecordDateValue($vFilter, $_GET, 'beg_date');
        CopyRecordDateValue($vFilter, $_GET, 'end_date');
        //            $vTab->AddTableAction('печать',  CompoundURL('cases_list.pdf', $vFilter));
        $vResult = $vTab->ProduceHTML($vDB, GetPageIdxOrLast(), 20);
        return $vResult;
    }
}
// =======================================================================
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyParam($vFilter, $vValues, 'case_id');
    CopyParam($vFilter, $vValues, 'last_name');
    CopyParam($vFilter, $vValues, 'first_name');
    CopyParam($vFilter, $vValues, 'patr_name');
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('queue.html', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('doc/queue.html');
    $vTemplate->outputObject($vView);
}
Example #9
0
{
}
// =======================================================================
if (!array_key_exists('beg_date', $_GET)) {
    $_GET['beg_date'] = date('Y-m-d');
}
if (!array_key_exists('end_date', $_GET)) {
    $_GET['end_date'] = date('Y-m-d');
}
if (!array_key_exists('paytype', $_GET)) {
    $_GET['paytype'] = 0;
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    CopyParam($vFilter, $vValues, 'paytype');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('surgeries_report.pdf', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('chief/surgeries_report.html');
    $vTemplate->outputObject($vView);
}
Example #10
0
        $vTab->AddRowAction('изменить', 'case_edit.html?id=', '../images/edit_24x24.gif', 24, 24);
        $vTab->AddRowAction('печать', '../reg/case.pdf?id=', '../images/print_24x24.gif', 24, 24);
        //        $vTab->AddRowAction('"заключение..."',  '/info/conclusion.html?id=');
        $vTab->AddTableAction('новая', 'case_edit.html');
        $vResult = $vTab->ProduceHTML($vDB, GetPageIdxOrLast(), 20);
        return $vResult;
    }
}
// =======================================================================
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyParam($vFilter, $vValues, 'case_id');
    CopyParam($vFilter, $vValues, 'last_name');
    CopyParam($vFilter, $vValues, 'first_name');
    CopyParam($vFilter, $vValues, 'patr_name');
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('cases.html', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('reg/cases.html');
    $vTemplate->outputObject($vView);
}
Example #11
0
$vForm = new TEditor($vID, $vCaseID);
switch ($vForm->ActionDispatcher()) {
    case 1:
        //    print "redirect to prev page";
        unset($_SESSION['_rg_dir_backup']);
        Redirect($vForm->_submitValues['html_referer']);
        break;
    case 2:
        //    Redirect( CompoundURL('/doc/rg_dir.pdf', array('id'=>$vForm->_submitValues['id'])) );
        //    break;
        $vTemplate =& CreateTemplate();
        $vRenderer =& CreateRenderer($vTemplate);
        $vForm->accept($vRenderer);
        $vView =& new TBaseView();
        $vView->form = $vRenderer->toObject();
        //    $vView->popup_url = CompoundURL('/doc/rg_dir.pdf', array(session_name()=>session_id(), 'id'=>$vForm->_submitValues['id']));
        //    $vView->popup_url = CompoundURL('/doc/rg_dir.pdf', array('id'=>$vForm->_submitValues['id']));
        $vView->popup_url = CompoundURL('../produce_pdf.html', array('pdfpage' => './doc/rg_dir.pdf', 'id' => $vForm->_submitValues['id']));
        $vTemplate->compile('doc/rg_dir_edit.html');
        $vTemplate->outputObject($vView);
        break;
    default:
        $vTemplate =& CreateTemplate();
        $vRenderer =& CreateRenderer($vTemplate);
        $vForm->accept($vRenderer);
        $vView =& new TBaseView();
        $vView->form = $vRenderer->toObject();
        $vTemplate->compile('doc/rg_dir_edit.html');
        $vTemplate->outputObject($vView);
        break;
}
Example #12
0
 function GetTable()
 {
     $vDB = GetDB();
     list($vTable, $vFilter, $vOrder) = ConstructCaseQuery($vDB, $_GET);
     $vTab =& new TCasesTable($vTable, 'emst_cases.*,' . gCaseWithBadDoc . ' as is_bad_docs', $vFilter, $vOrder);
     $vTab->AddBoolColumn('is_bad_docs', 'ПД');
     $vTab->AddRowAction('приём', 'accept.html?id=', '../images/sugrery_24x24.gif', 24, 24);
     $vTab->AddRowAction('изменение', 'case_edit.html?id=', '../images/edit_24x24.gif', 24, 24);
     $vTab->AddRowAction('печать', '../reg/case.pdf?id=', '../images/print_24x24.gif', 24, 24);
     //            $vTab->AddRowAction('"заключение..."',  '/info/conclusion.html?id=');
     //            $vTab->AddTableAction('новая',  'case_edit.html');
     $vFilter = array();
     CopyRecordRefValue($vFilter, $_GET, 'case_id');
     CopyRecordRefValue($vFilter, $_GET, 'doctor_id');
     CopyRecordStrValue($vFilter, $_GET, 'first_name');
     CopyRecordStrValue($vFilter, $_GET, 'last_name');
     CopyRecordStrValue($vFilter, $_GET, 'patr_name');
     CopyRecordStrValue($vFilter, $_GET, 'paytype');
     CopyRecordDateValue($vFilter, $_GET, 'beg_date');
     CopyRecordDateValue($vFilter, $_GET, 'end_date');
     $vTab->AddTableAction('печать', CompoundURL('cases_list.pdf', $vFilter));
     $vResult = $vTab->ProduceHTML($vDB, GetPageIdxOrLast(), 20);
     return $vResult;
 }
Example #13
0
        //
        //            var_dump($this);
        //
        $vResult = $vDB->InsertOrUpdateById('emst_hospitals', $vRecord);
        if (empty($vID) && $vResult) {
            $this->_submitValues['id'] = $vResult;
        }
        return $vResult;
    }
}
$vID = @$_GET['id'];
$vCaseID = @$_GET['caseid'];
$vForm = new TEditor($vID, $vCaseID);
switch ($vForm->ActionDispatcher()) {
    case 1:
        Redirect($vForm->_submitValues['html_referer']);
        break;
    case 2:
        Redirect(CompoundURL('/index.php', array('id' => $vForm->_submitValues['id'], 'page' => 'doc/hospital_pdf')));
        //      Redirect('/index.php?page=doc/rg_dir_pdf&id='.$vID);
        break;
    default:
        $vTemplate =& CreateTemplate();
        $vRenderer =& CreateRenderer($vTemplate);
        $vForm->accept($vRenderer);
        $vView =& new TBaseView();
        $vView->form = $vRenderer->toObject();
        $vTemplate->compile('doc/hospital_edit.html');
        $vTemplate->outputObject($vView);
        break;
}
Example #14
0
<?php

#####################################################################
#
# Травмпункт. (c) 2005 Vista
#
#####################################################################
$vPDFPage = $_GET['pdfpage'];
unset($_GET['pdfpage']);
unset($_GET['page']);
$vPDFPage = CompoundURL($vPDFPage, $_GET);
$vPrint = false;
$vLink = false;
$vObject = false;
$vPrint = true;
//$vLink   = true;
$vObject = true;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
    <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
    <title>PDF document</title>
    <script language="javascript">
    <!--
            function PrintIt()
            {
                var vMyDoc = document.all["MyDoc"];
//                if ( vMyDoc.readyState == 4 )
                //vMyDoc.printWithDialog();
            }
Example #15
0
        $this->setDefaults($_GET);
    }
}
class TData extends TBaseView
{
}
// =======================================================================
if (!array_key_exists('beg_date', $_GET)) {
    $_GET['beg_date'] = date('Y-m-d');
}
if (!array_key_exists('end_date', $_GET)) {
    $_GET['end_date'] = date('Y-m-d');
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('stats_list.pdf', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('reg/stats_list.html');
    $vTemplate->outputObject($vView);
}
Example #16
0
 function DrawPagesBar($AUrl, $ATotal, $APerPage, $APageIdx)
 {
     if ($APerPage > 0 && $ATotal > $APerPage) {
         $vParams = $_GET;
         $vPageIdx = $this->BoundPage($ATotal, $APerPage, $APageIdx);
         $vMaxPageIdx = intval(($ATotal - 1) / $APerPage);
         $vResult = '';
         if ($vPageIdx != 0) {
             $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => 0))), '[1]');
             $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $APageIdx - 1))), 'prev');
         }
         /*
               for( $i=0; $i<=$vMaxPageIdx; $i++ )
               {
                 if ( $i == $vPageIdx )
                   $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx'=>$i))), '<b>' . ($i+1) . '</b>');
                 else
                   $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx'=>$i))), ($i+1));
               }
         */
         $vMinPage = max($vPageIdx - 10, 0);
         $vMaxPage = min($vPageIdx + 10, $vMaxPageIdx);
         /*
               $vMinPage = max($vPageIdx - ($vPageIdx%10),0);
               $vMaxPage = min($vMinPage+10,$vMaxPageIdx);
         */
         for ($i = $vMinPage; $i <= $vMaxPage; $i++) {
             if ($i == $vPageIdx) {
                 $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $i))), '<b>' . ($i + 1) . '</b>');
             } else {
                 if ($i == $vMinPage && $vMinPage > 0 || $i == $vMaxPage && $vMaxPage < $vMaxPageIdx) {
                     $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $i))), '...');
                 } else {
                     $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $i))), $i + 1);
                 }
             }
         }
         if ($vPageIdx < $vMaxPageIdx) {
             $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $APageIdx + 1))), 'next');
             $vResult .= CreateLink(CompoundURL($AUrl, array_merge($vParams, array('PageIdx' => $vMaxPageIdx))), '[' . ($vMaxPageIdx + 1) . ']');
         }
         return $vResult;
     } else {
         return '';
     }
 }
Example #17
0
        $vView =& new TBaseView();
        $vView->form = $vRenderer->toObject();
        $vValues =& $vForm->_submitValues;
        $vParams = array();
        $vParams['pdfpage'] = 'info/conclusion.pdf';
        CopyRecordRefValue($vParams, $vValues, 'case_id');
        CopyRecordRefValue($vParams, $vValues, 'doctor_id');
        CopyRecordStrValue($vParams, $vValues, 'create_time');
        CopyRecordStrValue($vParams, $vValues, 'last_name');
        CopyRecordStrValue($vParams, $vValues, 'first_name');
        CopyRecordStrValue($vParams, $vValues, 'patr_name');
        CopyRecordDateValue($vParams, $vValues, 'born_date');
        CopyRecordStrValue($vParams, $vValues, 'employment_place');
        CopyRecordStrValue($vParams, $vValues, 'profession');
        CopyRecordStrValue($vParams, $vValues, 'diagnosis');
        CopyRecordStrValue($vParams, $vValues, 'diagnosis_mkb');
        CopyRecordRefValue($vParams, $vValues, 'heavity');
        $vView->popup_url = CompoundURL('produce_pdf.html', $vParams);
        $vTemplate->compile('info/conclusion.html');
        $vTemplate->outputObject($vView);
        break;
    default:
        $vTemplate =& CreateTemplate();
        $vRenderer =& CreateRenderer($vTemplate);
        $vForm->accept($vRenderer);
        $vView =& new TBaseView();
        $vView->form = $vRenderer->toObject();
        $vTemplate->compile('info/conclusion.html');
        $vTemplate->outputObject($vView);
        break;
}
Example #18
0
        //            $vTab->AddRowAction('изменить',           '/doc/rg_dir_edit.html?id=');
        $vResult = $vTab->ProduceHTML($vDB, @$_GET['PageIdx'] + 0, 20);
        return $vResult;
    }
}
// =======================================================================
if (!array_key_exists('beg_date', $_GET)) {
    $_GET['beg_date'] = date('Y-m-d');
}
if (!array_key_exists('end_date', $_GET)) {
    $_GET['end_date'] = date('Y-m-d');
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    //        CopyParam($vFilter, $vValues, 'case_id');
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('pick_rgs.html', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('reg/pick_rgs.html');
    $vTemplate->outputObject($vView);
}
Example #19
0
    $_GET['beg_date'] = date('Y-m-d');
}
if (!array_key_exists('end_date', $_GET)) {
    $_GET['end_date'] = date('Y-m-d');
}
if (!array_key_exists('service', $_GET)) {
    $_GET['service'] = defaultService;
}
if (!array_key_exists('paytype', $_GET)) {
    $_GET['paytype'] = 0;
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    CopyParam($vFilter, $vValues, 'reexpose');
    CopyParam($vFilter, $vValues, 'service');
    CopyParam($vFilter, $vValues, 'paytype');
    Redirect(CompoundURL('stats.dbf', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('reg/stats_dbf_setup.html');
    $vTemplate->outputObject($vView);
}
Example #20
0
        $this->setDefaults($_GET);
    }
}
class TData extends TBaseView
{
}
// =======================================================================
if (!array_key_exists('beg_date', $_GET)) {
    $_GET['beg_date'] = date('Y-m-d');
}
if (!array_key_exists('end_date', $_GET)) {
    $_GET['end_date'] = date('Y-m-d');
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    CopyRecordBoolValue($vFilter, $vValues, 'show_unlisted_cases');
    Redirect(CompoundURL('report_57.pdf', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('chief/report_57.html');
    $vTemplate->outputObject($vView);
}
Example #21
0
    }
}
// =======================================================================
if (empty($_GET['beg_date'])) {
    $_GET['show_diagnosis'] = 1;
}
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordRefValue($vFilter, $vValues, 'case_id');
    CopyRecordRefValue($vFilter, $vValues, 'doctor_id');
    CopyParam($vFilter, $vValues, 'last_name');
    CopyParam($vFilter, $vValues, 'first_name');
    CopyParam($vFilter, $vValues, 'patr_name');
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    CopyParam($vFilter, $vValues, 'show_diagnosis');
    CopyParam($vFilter, $vValues, 'show_cure');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('curecheck.html', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('doc/curecheck.html');
    $vTemplate->outputObject($vView);
}
Example #22
0
}
// =======================================================================
RegisterListParams();
$vForm =& new TSearchForm();
if ($vForm->validate()) {
    $vValues = $vForm->getSubmitValues();
    $vFilter = array();
    CopyRecordRefValue($vFilter, $vValues, 'case_id');
    CopyRecordRefValue($vFilter, $vValues, 'doctor_id');
    CopyParam($vFilter, $vValues, 'last_name');
    CopyParam($vFilter, $vValues, 'first_name');
    CopyParam($vFilter, $vValues, 'patr_name');
    CopyRecordDateValue($vFilter, $vValues, 'beg_date');
    CopyRecordDateValue($vFilter, $vValues, 'end_date');
    CopyParam($vFilter, $vValues, 'is_primary');
    CopyParam($vFilter, $vValues, 'empty_diagnosis_mkb');
    CopyParam($vFilter, $vValues, 'is_bad_doc');
    CopyParam($vFilter, $vValues, 'is_bad_illdoc');
    CopyParam($vFilter, $vValues, 'eisoms_status');
    CopyRecordBoolValue($vFilter, $vValues, 'is_lost_outcome');
    //        CopyParam($vFilter, $vValues, 'Order');
    Redirect(CompoundURL('surgeries.html', $vFilter));
} else {
    $vTemplate =& CreateTemplate();
    $vRenderer =& CreateRenderer($vTemplate);
    $vForm->accept($vRenderer);
    $vView =& new TData();
    $vView->form = $vRenderer->toObject();
    $vTemplate->compile('doc/surgeries.html');
    $vTemplate->outputObject($vView);
}
Example #23
0
 function perform(&$page, $actionName)
 {
     $page->isFormBuilt() or $page->buildForm();
     $vPageID = $page->getAttribute('id');
     $vController =& $page->controller;
     $vContainer =& $vController->container();
     $vContainer['values'][$vPageID] = $page->exportValues();
     $vContainer['valid'][$vPageID] = $page->validate();
     $vController->isValid();
     $vDefaults =& $vContainer['defaults'];
     $vValues =& $vContainer['values'];
     $vNumDates = count($vDefaults['surgeries']);
     $vBaseInfo =& $vValues['BaseInfo'];
     if ($vNumDates > 0) {
         $vLastDate =& $vValues[DatePageName($vNumDates - 1)];
     } else {
         $vLastDate = array();
     }
     $vParams = array();
     $vParams['pdfpage'] = 'info/studinfo.pdf';
     $vParams['case_id'] = $vDefaults['BaseInfo']['id'];
     $vParams['last_name'] = $vBaseInfo['last_name'];
     $vParams['first_name'] = $vBaseInfo['first_name'];
     $vParams['patr_name'] = $vBaseInfo['patr_name'];
     $vParams['born_date'] = DateValueToStr($vBaseInfo['born_date']);
     $vDate = @$vDefaults['surgeries'][$vNumDates - 1]['date'];
     if (empty($vDate)) {
         $vDate = date('Y-m-d');
     } else {
         list($vDate, $vJunk) = explode(' ', $vDate);
     }
     $vParams['date'] = $vDate;
     $vParams['diagnosis'] = @$vLastDate['diagnosis'];
     $vParams['doctor_id'] = $_SESSION['User.ID'];
     $vParams['studinfo_type'] = @$vValues[$vPageID]['studinfo_type'];
     $vParams['studinfo_target'] = @$vValues[$vPageID]['studinfo_target'];
     $vParams['studinfo_show_diagnosis'] = @$vValues[$vPageID]['studinfo_show_diagnosis'];
     $vContainer['_PopupURL'] = CompoundURL('../produce_pdf.html', $vParams);
     $page->handle('jump');
 }