private function getFormData($cdrequest = "0") { // Busca todos os Postos de Coleta. $companyModel = new CompanyModel(); $this->view->companyData = $companyModel->fetchAll(null, 'company.nmcompany'); // Busca todos os Setores. $departmentModel = new DepartmentModel(); $this->view->departmentData = $departmentModel->fetchAll(null, 'department.nmdepartment'); }
public function indexAction() { $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $company = new CompanyModel(); $selectCompany = $company->fetchAll('cdcompanyparent IS NULL'); $_SESSION['cdbilling'] = ''; $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $clientModel = new ClientModel(); $clientData = $clientModel->fetchAll(); $this->view->selectCovenant = $selectCovenant; $this->view->selectCompany = $selectCompany; $this->view->selectDepartment = $selectDepartment; $this->view->clientData = $clientData; }
public function __construct() { parent::__construct(); $companyModel = new CompanyModel(); $selectCompany = $companyModel->fetchAll(); $arraycompany = array(); $arraycompany['0'] = "Selecione"; foreach ($selectCompany as $selCp) { $arraycompany[$selCp->cdcompany] = $selCp->nmcompany; } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arraydepartment = array(); $arraydepartment['0'] = "Selecione"; foreach ($selectDepartment as $selDp) { $arraydepartment[$selDp->cddepartment] = $selDp->nmdepartment; } //Form Dados de Cadastro $this->_cdcashdesk = new Zend_Form_Element_Hidden('cdcashdesk'); $this->_cdcashdesk->setAttrib("id", "cashdesk_cdcashdesk"); $this->_idcashdesk = new Zend_Form_Element_Text('_idcashdesk'); $this->_idcashdesk->setAttrib("id", "cashdesk_idcashdesk"); $this->_idcashdesk->setLabel("Cód. Guichê *"); $this->_idcashdesk->setDecorators($this->_decoratorsDefault); $this->_idcashdesk->setRequired(true); $this->_nmcashdesk = new Zend_Form_Element_Text('nmcashdesk'); $this->_nmcashdesk->setAttrib("id", "cashdesk_nmcashdesk"); $this->_nmcashdesk->setLabel("Nome/Descrição do Guichê de Atendimento *"); $this->_nmcashdesk->setDecorators($this->_decoratorsDefault); $this->_nmcashdesk->setRequired(false); $this->_branch = new Zend_Form_Element_Select('branch'); $this->_branch->setAttrib("id", "cashdesk_branch"); $this->_branch->setAttrib("class", "multiple_select"); $this->_branch->setMultiOptions($arraycompany); $this->_branch->setLabel("Filial/Posto de Coleta *"); $this->_branch->setDecorators($this->_decoratorsDefault); $this->_branch->setRegisterInArrayValidator(true); $this->_branch->setRequired(true); $this->_department = new Zend_Form_Element_Select('department'); $this->_department->setAttrib("id", "cashdesk_department"); $this->_department->setAttrib("class", "multiple_select"); $this->_department->setMultiOptions($arraydepartment); $this->_department->setLabel("Setor *"); $this->_department->setDecorators($this->_decoratorsDefault); $this->_department->setRegisterInArrayValidator(true); $this->_department->setRequired(true); }
public function __construct() { $departmentList = DepartmentModel::getList(); $tree = array(); $this->mkTree($departmentList, $tree); $this->assign('departmentList', $tree); parent::__construct(); }
public function getFormCadastre() { $departmentModel = new DepartmentModel(); $departmentData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment()); $roleModel = new RoleModel(); $roleData = $roleModel->fetchAll($roleModel->select()); $departmentSupervisorModel = new DepartmentsupervisorModel(); $departmentSupervisorData = $departmentSupervisorModel->fetchAll($departmentSupervisorModel->getAllSupervisor()); $companyModel = new CompanyModel(); $companyData = $companyModel->fetchAll(); $Arraycompany = array(); $Arraycompany['0'] = 'Selecione'; foreach ($companyData as $company) { $Arraycompany[$company->cdcompany] = $company->nmfantasyname; } $this->_nmagenda = new Zend_Form_Element_Text('nmagenda'); $this->_nmagenda->setLabel("Nome da Agenda"); $this->_nmagenda->setRequired(true); $this->_nmagenda->setDecorators($this->_decoratorsRequired); $this->_nmagenda->setAttrib("id", "agenda_nmagendas"); $this->_nmagenda->setAttrib("class", "alpha nameagenda"); $this->_nmagenda->setRequired(true); $this->_cdcompany = new Zend_Form_Element_Select('cdcompany'); $this->_cdcompany->setRegisterInArrayValidator(false); $this->_cdcompany->addMultiOptions($Arraycompany); $this->_cdcompany->setLabel("Empresa"); $this->_cdcompany->setDecorators($this->_decoratorsRequired); $this->_cdcompany->setAttrib("id", "user_cdcompany"); $this->_cdcompany->setAttrib("class", "alpha"); $this->_cdcompany->setRequired(true); $this->_cdphysicallocation = new Zend_Form_Element_Select('cdphysicallocation'); $this->_cdphysicallocation->setRegisterInArrayValidator(false); $this->_cdphysicallocation->setLabel("Localização Física"); $this->_cdphysicallocation->addMultiOptions(array('0' => 'Selecione')); $this->_cdphysicallocation->setDecorators($this->_decoratorsRequired); $this->_cdphysicallocation->setAttrib("id", "company_physicallocation"); $this->_cdphysicallocation->setAttrib("class", "alpha"); $this->_cdphysicallocation->setRequired(true); $this->_gridhours = new Zend_Form_Element_Select('gridhours'); $this->_gridhours->setRegisterInArrayValidator(false); $this->_gridhours->addMultiOptions(array('1' => 'Sim', '2' => 'Não')); $this->_gridhours->setLabel("Grade de Horário"); $this->_gridhours->setDecorators($this->_decoratorsDefault); $this->_gridhours->setAttrib("id", "user_gridhours"); $this->_gridhours->setRequired(false); }
public function delete() { $id = request('id'); if (DepartmentModel::delete($id)) { $this->success($this->reffer()); } else { $this->error(); } }
protected function _departmentList() { if (!$this->departmentList) { $departmentList = DepartmentModel::getList(); $tree = array(); mkTree($departmentList, $tree); $this->departmentList = $tree; } return $this->departmentList; }
public function dadosagendasearchAction() { $this->_helper->layout->disableLayout(); $page = $this->_request->getParam("page", 1); $limit = $this->_request->getParam("rows"); $sidx = $this->_request->getParam("sidx", 1); $sord = $this->_request->getParam("sord"); $filters = $this->_request->getParam("filters"); if ($filters != '') { $data = $this->buildWhereClause($filters); } $agendaModel = new AgendaModel(); $departmentModel = new DepartmentModel(); $companyModel = new CompanyModel(); if (isset($data['sql']) && $data['sql'] != '') { $agenda = $agendaModel->fetchAll($data['sql']); $count = count($agenda); if ($count > 0) { $agenda = $agendaModel->fetchAll($data['sql']); } else { $total_pages = 0; } $responce = new stdClass(); $responce->page = $page; $responce->records = $count; } else { $agenda = $agendaModel->fetchAll(); $count = count($agenda); if ($count > 0 && $limit > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0; } if ($page > $total_pages) { $page = $total_pages; } $agenda = $agendaModel->fetchAll(); $responce = new stdClass(); $responce->page = $page; $responce->total = $total_pages; $responce->records = $count; } $i = 0; foreach ($agenda as $row) { $departmento = $departmentModel->getDepartmentByAgenda($row->cdagenda); $company = $companyModel->getCompanyByDepartment($departmento[0]->cddepartment); $responce->rows[$i]['id'] = $row->cdagenda; $responce->rows[$i]['cddepartment'] = $departmento[0]->cddepartment; $responce->rows[$i]['cdcompany'] = $company[0]->cdcompany; $responce->rows[$i]['cell'] = array($row->cdagenda, $row->nmagenda, $company[0]->nmcompany, $departmento[0]->nmdepartment, 'Ativo', $departmento[0]->cddepartment, $company[0]->cdcompany); $i++; } $this->view->dadosagendasearch = $responce; }
public function __construct() { parent::__construct(); $departmentList = DepartmentModel::getList(); $tree = array(); if ($this->userInfo['group']['permission']['type'] == 'super') { $this->mkTree($departmentList, $tree); } else { $this->mkTree($departmentList, $tree, $this->userInfo['department_id']); } $this->departmentList = $tree; $this->assign('departmentList', $tree); }
public function __construct() { $survey = (require_once GLOFT_PATH . 'conf/survey.php'); $this->assign('survey', $survey); parent::__construct(); $departmentList = DepartmentModel::getList(); $tree = array(); if ($this->userInfo['group']['permission']['type'] == 'super') { $this->mkTree($departmentList, $tree); } else { $this->mkTree($departmentList, $tree, $this->userInfo['department_id']); } $this->departmentList = $tree; $this->assign('departmentList', $tree); }
public function init() { $userInfo = $this->isLogin(); if (!$userInfo) { $this->error('没有登陆'); } else { $userInfo['department'] = DepartmentModel::get($userInfo['department_id']); $userInfo['group'] = UsergroupModel::get($userInfo['group_id']); $this->userInfo = $userInfo; } if (!$this->checkPermission()) { $this->error('没有权限'); } $this->_menuList(); }
public function __construct() { $groupList = UsergroupModel::getList(); $tmp = array(); if ($groupList) { foreach ($groupList as $group) { $tmp[$group['id']] = $group; } } $groupList = $tmp; $departmentList = DepartmentModel::getList(); $tmp = array(); $this->mkTree($departmentList, $tmp); $this->assign('groupList', $groupList); $this->assign('departmentList', $tmp); parent::__construct(); }
public function departmentafilliatesAction() { $departmentModel = new DepartmentModel(); $cddepartment = $this->_request->getParam("cddepartment"); $cdepartementAffiliatesData = $departmentModel->getAllAffiliatesBydepartmentParent($cddepartment); $i = 0; foreach ($cdepartementAffiliatesData as $row) { $id = "department_" . $row->cddepartment; $responce->rows[$i]['cell'] = array($id, $row->cddepartment, $row->nmdepartment); $i++; } $this->view->departmentafilliates = $responce; }
public function __construct() { parent::__construct(); $sectorModel = new DepartmentModel(); $selectDepartment = $sectorModel->fetchAll(); $arraysector = array(); foreach ($selectDepartment as $selDEP) { $arraysector[$selDEP->cddepartment] = $selDEP->nmdepartment; } //Conferir Resultados $this->_nmpaciente = new Zend_Form_Element_Text('nmpaciente'); $this->_nmpaciente->setAttrib("id", "appraisalrelease_nmpacient"); $this->_nmpaciente->setAttrib("autocomplete", "off"); $this->_nmpaciente->setLabel("Paciente"); $this->_nmpaciente->setDecorators($this->_decoratorsDefault); $this->_nmpaciente->setRequired(false); $this->_cdrequest = new Zend_Form_Element_Text('cdrequest'); $this->_cdrequest->setAttrib("id", "appraisalrelease_cdrequest"); $this->_cdrequest->setLabel("Cód.Req"); $this->_cdrequest->setDecorators($this->_decoratorsDefault); $this->_cdrequest->setRequired(false); $this->_cdsample = new Zend_Form_Element_Text('cdsample'); $this->_cdsample->setAttrib("id", "appraisalrelease_cdsample"); $this->_cdsample->setLabel("Cód Amostra"); $this->_cdsample->setDecorators($this->_decoratorsDefault); $this->_cdsample->setRequired(false); $this->_nmdoctor = new Zend_Form_Element_Text('nmdoctor'); $this->_nmdoctor->setAttrib("id", "appraisalrelease_nmdoctor"); $this->_nmdoctor->setLabel("Médico"); $this->_nmdoctor->setDecorators($this->_decoratorsDefault); $this->_nmdoctor->setRequired(false); $this->_cdage = new Zend_Form_Element_Text('cdage'); $this->_cdage->setAttrib("id", "appraisalrelease_cdage"); $this->_cdage->setLabel("Idade"); $this->_cdage->setDecorators($this->_decoratorsDefault); $this->_cdage->setRequired(false); $this->_cdmaterial = new Zend_Form_Element_Text('cdmaterial'); $this->_cdmaterial->setAttrib("id", "appraisalrelease_cdmaterial"); $this->_cdmaterial->setLabel("Material"); $this->_cdmaterial->setDecorators($this->_decoratorsDefault); $this->_cdmaterial->setRequired(false); $this->_fgstatus = new Zend_Form_Element_Text('fgstatus'); $this->_fgstatus->setAttrib("id", "appraisalrelease_fgstatus"); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRequired(false); $this->_collectiondate = new Zend_Form_Element_Text('collectiondate'); $this->_collectiondate->setAttrib("id", "appraisalrelease_collectiondate"); $this->_collectiondate->setLabel("Data da Coleta"); $this->_collectiondate->setDecorators($this->_decoratorsDefault); $this->_collectiondate->setRequired(false); $this->_nmexamination = new Zend_Form_Element_Text('nmexamination'); $this->_nmexamination->setAttrib("id", "appraisalrelease_nmexamination"); $this->_nmexamination->setLabel("Exame"); $this->_nmexamination->setDecorators($this->_decoratorsDefault); $this->_nmexamination->setRequired(false); //Conferir Resultados em uma nova janela $this->_nmpacientewindow = new Zend_Form_Element_Text('nmpacientewindow'); $this->_nmpacientewindow->setAttrib("id", "appraisalrelease_nmpacientewindow"); $this->_nmpacientewindow->setAttrib("autocomplete", "off"); $this->_nmpacientewindow->setLabel("Paciente"); $this->_nmpacientewindow->setDecorators($this->_decoratorsDefault); $this->_nmpacientewindow->setRequired(false); $this->_cdrequestwindow = new Zend_Form_Element_Text('cdrequestwindow'); $this->_cdrequestwindow->setAttrib("id", "appraisalrelease_cdrequestwindow"); $this->_cdrequestwindow->setLabel("Cód.Req"); $this->_cdrequestwindow->setDecorators($this->_decoratorsDefault); $this->_cdrequestwindow->setRequired(false); $this->_cdsamplewindow = new Zend_Form_Element_Text('cdsamplewindow'); $this->_cdsamplewindow->setAttrib("id", "appraisalrelease_cdsamplewindow"); $this->_cdsamplewindow->setLabel("Cód Amostra"); $this->_cdsamplewindow->setDecorators($this->_decoratorsDefault); $this->_cdsamplewindow->setRequired(false); $this->_nmdoctorwindow = new Zend_Form_Element_Text('nmdoctorwindow'); $this->_nmdoctorwindow->setAttrib("id", "appraisalrelease_nmdoctorwindow"); $this->_nmdoctorwindow->setLabel("Médico"); $this->_nmdoctorwindow->setDecorators($this->_decoratorsDefault); $this->_nmdoctorwindow->setRequired(false); $this->_cdagewindow = new Zend_Form_Element_Text('cdagewindow'); $this->_cdagewindow->setAttrib("id", "appraisalrelease_cdagewindow"); $this->_cdagewindow->setLabel("Idade"); $this->_cdagewindow->setDecorators($this->_decoratorsDefault); $this->_cdagewindow->setRequired(false); $this->_cdmaterialwindow = new Zend_Form_Element_Text('cdmaterialwindow'); $this->_cdmaterialwindow->setAttrib("id", "appraisalrelease_cdmaterialwindow"); $this->_cdmaterialwindow->setLabel("Material"); $this->_cdmaterialwindow->setDecorators($this->_decoratorsDefault); $this->_cdmaterialwindow->setRequired(false); $this->_fgstatuswindow = new Zend_Form_Element_Text('fgstatuswindow'); $this->_fgstatuswindow->setAttrib("id", "appraisalrelease_fgstatuswindow"); $this->_fgstatuswindow->setLabel("Status"); $this->_fgstatuswindow->setDecorators($this->_decoratorsDefault); $this->_fgstatuswindow->setRequired(false); $this->_collectiondatewindow = new Zend_Form_Element_Text('collectiondatewindow'); $this->_collectiondatewindow->setAttrib("id", "appraisalrelease_collectiondatewindow"); $this->_collectiondatewindow->setLabel("Data da Coleta"); $this->_collectiondatewindow->setDecorators($this->_decoratorsDefault); $this->_collectiondatewindow->setRequired(false); $this->_nmexaminationwindow = new Zend_Form_Element_Text('nmexaminationwindow'); $this->_nmexaminationwindow->setAttrib("id", "appraisalrelease_nmexaminationwindow"); $this->_nmexaminationwindow->setLabel("Exame"); $this->_nmexaminationwindow->setDecorators($this->_decoratorsDefault); $this->_nmexaminationwindow->setRequired(false); //Forms Iniciais $this->_sector = new Zend_Form_Element_Select('sector'); $this->_sector->setAttrib("id", "appraisalrelease_sector"); $this->_sector->setAttrib("class", "check_multiple_select"); $this->_sector->setMultiOptions($arraysector); $this->_sector->setLabel("Setor"); $this->_sector->setDecorators($this->_decoratorsDefault); $this->_sector->setRegisterInArrayValidator(true); $this->_sector->setRequired(true); $this->_sector2 = new Zend_Form_Element_Select('sector2'); $this->_sector2->setAttrib("id", "appraisalrelease_sector2"); $this->_sector2->setAttrib("class", "check_multiple_select"); $this->_sector2->setMultiOptions($arraysector); $this->_sector2->setLabel("Setor"); $this->_sector2->setDecorators($this->_decoratorsDefault); $this->_sector2->setRegisterInArrayValidator(true); $this->_sector2->setRequired(true); $this->_nmpacient = new Zend_Form_Element_Text('nmpacient'); $this->_nmpacient->setAttrib("id", "appraisalrelease_nmpacient"); $this->_nmpacient->setAttrib("autocomplete", "off"); $this->_nmpacient->setLabel("Paciente"); $this->_nmpacient->setDecorators($this->_decoratorsDefault); $this->_nmpacient->setRequired(false); $this->_nmpacientid = new Zend_Form_Element_Hidden('nmpacientid'); $this->_nmpacientid->setAttrib("id", "appraisalrelease_nmpacientid"); $this->_nmpacientid->setAttrib("id", "client_cdclient"); $this->_nmpacientid->setAttrib("onkeyup", "lookup(this.value);"); $this->_nmpacientid->setAttrib("onblur", "fill();"); $this->_nmpacientid->setDecorators($this->_decoratorsDefault); $this->_dtbeginning = new Zend_Form_Element_Text('dtbeginning'); $this->_dtbeginning->setAttrib("id", "appraisalrelease_dtbeginning"); $this->_dtbeginning->setAttrib("class", "datepicker"); $this->_dtbeginning->setLabel("Data Início"); $this->_dtbeginning->setDecorators($this->_decoratorsDefault); $this->_dtbeginning->setRequired(false); $this->_dtmaturity = new Zend_Form_Element_Text('dtmaturity'); $this->_dtmaturity->setAttrib("id", "appraisalrelease_dtmaturity"); $this->_dtmaturity->setAttrib("class", "datepicker"); $this->_dtmaturity->setLabel("Data Fim"); $this->_dtmaturity->setDecorators($this->_decoratorsDefault); $this->_dtmaturity->setRequired(false); $this->_dtbeginning2 = new Zend_Form_Element_Text('dtbeginning2'); $this->_dtbeginning2->setAttrib("id", "appraisalrelease_dtbeginning2"); $this->_dtbeginning2->setAttrib("class", "datepicker"); $this->_dtbeginning2->setLabel("Data Início"); $this->_dtbeginning2->setDecorators($this->_decoratorsDefault); $this->_dtbeginning2->setRequired(false); $this->_dtmaturity2 = new Zend_Form_Element_Text('dtmaturity2'); $this->_dtmaturity2->setAttrib("id", "appraisalrelease_dtmaturity2"); $this->_dtmaturity2->setAttrib("class", "datepicker"); $this->_dtmaturity2->setLabel("Data Fim"); $this->_dtmaturity2->setDecorators($this->_decoratorsDefault); $this->_dtmaturity2->setRequired(false); $this->_dtbeginning3 = new Zend_Form_Element_Text('dtbeginning3'); $this->_dtbeginning3->setAttrib("id", "appraisalrelease_dtbeginning3"); $this->_dtbeginning3->setAttrib("class", "datepicker"); $this->_dtbeginning3->setLabel("Data Início"); $this->_dtbeginning3->setDecorators($this->_decoratorsDefault); $this->_dtbeginning3->setRequired(false); $this->_dtmaturity3 = new Zend_Form_Element_Text('dtmaturity3'); $this->_dtmaturity3->setAttrib("id", "appraisalrelease_dtmaturity3"); $this->_dtmaturity3->setAttrib("class", "datepicker"); $this->_dtmaturity3->setLabel("Data Fim"); $this->_dtmaturity3->setDecorators($this->_decoratorsDefault); $this->_dtmaturity3->setRequired(false); $this->_samplenumber = new Zend_Form_Element_Text('samplenumber'); $this->_samplenumber->setAttrib("id", "appraisalrelease_samplenumber"); $this->_samplenumber->setLabel("Número Amostra"); $this->_samplenumber->setDecorators($this->_decoratorsDefault); $this->_samplenumber->setRequired(false); $this->_numrequisicion = new Zend_Form_Element_Text('numrequisicion'); $this->_numrequisicion->setAttrib("id", "appraisalrelease_numrequisicion"); $this->_numrequisicion->setLabel("Número Requisição"); $this->_numrequisicion->setDecorators($this->_decoratorsDefault); $this->_numrequisicion->setRequired(false); $this->_cdplug = new Zend_Form_Element_Text('cdplug'); $this->_cdplug->setAttrib("id", "appraisalrelease_cdplug"); $this->_cdplug->setLabel("Cód. Ficha"); $this->_cdplug->setDecorators($this->_decoratorsDefault); $this->_cdplug->setRequired(false); $this->_homepage = new Zend_Form_Element_Text('homepage'); $this->_homepage->setAttrib("id", "appraisalrelease_homepage"); $this->_homepage->setLabel("Nº Pág. Inicial"); $this->_homepage->setDecorators($this->_decoratorsDefault); $this->_homepage->setRequired(false); $this->_lastpage = new Zend_Form_Element_Text('lastpage'); $this->_lastpage->setAttrib("id", "appraisalrelease_lastpage"); $this->_lastpage->setLabel("Nº Pág. Final"); $this->_lastpage->setDecorators($this->_decoratorsDefault); $this->_lastpage->setRequired(false); $this->_timebegin = new Zend_Form_Element_Text('timebegin'); $this->_timebegin->setAttrib("id", "appraisalrelease_timebegin"); $this->_timebegin->setAttrib("class", "mask_time"); $this->_timebegin->setLabel("Hora Inicial"); $this->_timebegin->setDecorators($this->_decoratorsDefault); $this->_timebegin->setRequired(false); $this->_timeend = new Zend_Form_Element_Text('timebeginhourdata'); $this->_timeend->setAttrib("id", "appraisalrelease_timeend"); $this->_timeend->setAttrib("class", "mask_time"); $this->_timeend->setLabel("Hora Final"); $this->_timeend->setDecorators($this->_decoratorsDefault); $this->_timeend->setRequired(false); }
public function editAction() { $cdexamination = $this->_request->getParam('cdexamination'); $modelMaterial = new MaterialModel(); //$materialData = $modelMaterial->fetchAll(); // $materialData = $modelMaterial->fetchAll($modelMaterial->getMaterialNotInExamination($cdexamination)); // print_r('ei'); die; // $this->view->materialData = $materialData; $departmentModel = new DepartmentModel(); $departmentsData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment()); $this->view->departmentsData = $departmentsData; $timeFrameModel = new TimeframeModel(); $timeFrameData = $timeFrameModel->fetchAll($timeFrameModel->getAllTimeFrames()); $this->view->timeFrameData = $timeFrameData; $examinationModel = new ExaminationModel(); $examinationData = $examinationModel->fetchRow($examinationModel->getByExamination($cdexamination)); $this->view->examinationData = $examinationData; $userModel = new UserModel(); $userData = $userModel->fetchAll(); $this->view->userData = $userData; $examinationRevisionModel = new ExaminationrevisionModel(); $examinationRevisionData = $examinationRevisionModel->fetchRow($examinationRevisionModel->getByExaminationRevision($cdexamination)); // print_r($examinationRevisionData); die; $this->view->examinationRevisionData = $examinationRevisionData; //var_dump($examinationData); //die(); }
public function returncddepartmentbycompanyAction() { $departmentModel = new DepartmentModel(); $nmdepartmentparentorcompany = 0; $cdcompany = '0'; $idelement = $_SESSION['idelement']; if ($_SESSION['cddepartment'] == '0') { $cddepartment = ''; } else { $cddepartment = $_SESSION['cddepartment']; $departmentData = $departmentModel->fetchRow('cddepartment = ' . $cddepartment); $nmdepartmentparentorcompany = $departmentData->nmdepartment; } if (!isset($_SESSION['cdcompany'])) { $cdcompany = 0; } else { if ($nmdepartmentparentorcompany == '0') { $cdcompany = $_SESSION['cdcompany']; $companyModel = new CompanyModel(); $companyData = $companyModel->fetchRow('cdcompany=' . $cdcompany); $nmdepartmentparentorcompany = $companyData->nmcompany; } } $responce->rows[0]['cell'] = array($cdcompany, $cddepartment, $nmdepartmentparentorcompany, $idelement); $this->view->returncddepartmentbycompany = $responce; }
public function __construct() { parent::__construct(); $sectorModel = new DepartmentModel(); $selectDepartment = $sectorModel->fetchAll(); $arraysector = array(); $arraysector['0'] = "0"; foreach ($selectDepartment as $selDEP) { $arraysector[$selDEP->cddepartment] = $selDEP->nmdepartment; } //Digitação de Resultados004 $this->_nmpaciente = new Zend_Form_Element_Text('nmpacient'); $this->_nmpaciente->setAttrib("id", "controltbilling_nmpacient"); $this->_nmpaciente->setLabel("Paciente"); $this->_nmpaciente->setDecorators($this->_decoratorsDefault); $this->_nmpaciente->setRequired(false); $this->_cdrequest = new Zend_Form_Element_Text('cdrequest'); $this->_cdrequest->setAttrib("id", "appraisal_cdrequest"); $this->_cdrequest->setLabel("Cód.Req"); $this->_cdrequest->setDecorators($this->_decoratorsDefault); $this->_cdrequest->setRequired(false); $this->_cdsample = new Zend_Form_Element_Text('cdsample'); $this->_cdsample->setAttrib("id", "controltbilling_cdsample"); $this->_cdsample->setLabel("Cód Amostra"); $this->_cdsample->setDecorators($this->_decoratorsDefault); $this->_cdsample->setRequired(false); $this->_nmdoctor = new Zend_Form_Element_Text('nmdoctor'); $this->_nmdoctor->setAttrib("id", "controltbilling_nmdoctor"); $this->_nmdoctor->setLabel("Médico"); $this->_nmdoctor->setDecorators($this->_decoratorsDefault); $this->_nmdoctor->setRequired(false); $this->_cdage = new Zend_Form_Element_Text('cdage'); $this->_cdage->setAttrib("id", "controltbilling_cdage"); $this->_cdage->setLabel("Idade"); $this->_cdage->setDecorators($this->_decoratorsDefault); $this->_cdage->setRequired(false); $this->_nmexamination = new Zend_Form_Element_Text('nmexamination'); $this->_nmexamination->setAttrib("id", "controltbilling_nmexamination"); $this->_nmexamination->setLabel("Exame"); $this->_nmexamination->setDecorators($this->_decoratorsDefault); $this->_nmexamination->setRequired(false); $this->_cdmaterial = new Zend_Form_Element_Text('cdmaterial'); $this->_cdmaterial->setAttrib("id", "controltbilling_cdmaterial"); $this->_cdmaterial->setLabel("Material"); $this->_cdmaterial->setDecorators($this->_decoratorsDefault); $this->_cdmaterial->setRequired(false); $this->_fgstatus = new Zend_Form_Element_Text('fgstatus'); $this->_fgstatus->setAttrib("id", "controltbilling_fgstatus"); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRequired(false); $this->_collectiondate = new Zend_Form_Element_Text('collectiondate'); $this->_collectiondate->setAttrib("id", "controltbilling_collectiondate"); $this->_collectiondate->setLabel("Data da Coleta"); $this->_collectiondate->setDecorators($this->_decoratorsDefault); $this->_collectiondate->setRequired(false); //Digitação de resultados NEW WINDOW $this->_nmpaciente = new Zend_Form_Element_Text('nmpacient'); $this->_nmpaciente->setAttrib("id", "controltbilling_nmpacient"); $this->_nmpaciente->setLabel("Paciente"); $this->_nmpaciente->setDecorators($this->_decoratorsDefault); $this->_nmpaciente->setRequired(false); $this->_nmpaciente->setAttrib("disabled", "disabled"); $this->_cdrequest = new Zend_Form_Element_Text('cdrequest'); $this->_cdrequest->setAttrib("id", "appraisal_cdrequest"); $this->_cdrequest->setLabel("Cód.Req"); $this->_cdrequest->setDecorators($this->_decoratorsDefault); $this->_cdrequest->setRequired(false); $this->_cdrequest->setAttrib("disabled", "disabled"); $this->_cdsample = new Zend_Form_Element_Text('cdsample'); $this->_cdsample->setAttrib("id", "controltbilling_cdsample"); $this->_cdsample->setLabel("Cód Amostra"); $this->_cdsample->setDecorators($this->_decoratorsDefault); $this->_cdsample->setRequired(false); $this->_cdsample->setAttrib("disabled", "disabled"); $this->_nmdoctor = new Zend_Form_Element_Text('nmdoctor'); $this->_nmdoctor->setAttrib("id", "controltbilling_nmdoctor"); $this->_nmdoctor->setLabel("Médico"); $this->_nmdoctor->setDecorators($this->_decoratorsDefault); $this->_nmdoctor->setRequired(false); $this->_nmdoctor->setAttrib("disabled", "disabled"); $this->_cdage = new Zend_Form_Element_Text('cdage'); $this->_cdage->setAttrib("id", "controltbilling_cdage"); $this->_cdage->setLabel("Idade"); $this->_cdage->setDecorators($this->_decoratorsDefault); $this->_cdage->setRequired(false); $this->_cdage->setAttrib("disabled", "disabled"); $this->_nmexamination = new Zend_Form_Element_Text('nmexamination'); $this->_nmexamination->setAttrib("id", "controltbilling_nmexamination"); $this->_nmexamination->setLabel("Exame"); $this->_nmexamination->setDecorators($this->_decoratorsDefault); $this->_nmexamination->setRequired(false); $this->_nmexamination->setAttrib("disabled", "disabled"); $this->_cdmaterial = new Zend_Form_Element_Text('cdmaterial'); $this->_cdmaterial->setAttrib("id", "controltbilling_cdmaterial"); $this->_cdmaterial->setLabel("Material"); $this->_cdmaterial->setDecorators($this->_decoratorsDefault); $this->_cdmaterial->setRequired(false); $this->_cdmaterial->setAttrib("disabled", "disabled"); $this->_fgstatus = new Zend_Form_Element_Text('fgstatus'); $this->_fgstatus->setAttrib("id", "controltbilling_fgstatus"); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRequired(false); $this->_fgstatus->setAttrib("disabled", "disabled"); $this->_collectiondate = new Zend_Form_Element_Text('collectiondate'); $this->_collectiondate->setAttrib("id", "controltbilling_collectiondate"); $this->_collectiondate->setLabel("Data da Coleta"); $this->_collectiondate->setDecorators($this->_decoratorsDefault); $this->_collectiondate->setRequired(false); $this->_collectiondate->setAttrib("disabled", "disabled"); $this->_nmpacientewindow = new Zend_Form_Element_Text('nmpacientewindow'); $this->_nmpacientewindow->setAttrib("id", "controltbilling_nmpacient"); $this->_nmpacientewindow->setLabel("Paciente"); $this->_nmpacientewindow->setDecorators($this->_decoratorsDefault); $this->_nmpacientewindow->setRequired(false); $this->_nmpacientewindow->setAttrib("disabled", "disabled"); $this->_cdrequestwindow = new Zend_Form_Element_Text('_cdrequestwindow'); $this->_cdrequestwindow->setAttrib("id", "appraisal_cdrequest"); $this->_cdrequestwindow->setLabel("Cód.Req"); $this->_cdrequestwindow->setDecorators($this->_decoratorsDefault); $this->_cdrequestwindow->setRequired(false); $this->_cdrequestwindow->setAttrib("disabled", "disabled"); $this->_cdsamplewindow = new Zend_Form_Element_Text('cdsamplewindow'); $this->_cdsamplewindow->setAttrib("id", "controltbilling_cdsample"); $this->_cdsamplewindow->setLabel("Cód Amostra"); $this->_cdsamplewindow->setDecorators($this->_decoratorsDefault); $this->_cdsamplewindow->setRequired(false); $this->_cdsamplewindow->setAttrib("disabled", "disabled"); $this->_nmdoctorwindow = new Zend_Form_Element_Text('nmdoctorwindow'); $this->_nmdoctorwindow->setAttrib("id", "controltbilling_nmdoctor"); $this->_nmdoctorwindow->setLabel("Médico"); $this->_nmdoctorwindow->setDecorators($this->_decoratorsDefault); $this->_nmdoctorwindow->setRequired(false); $this->_nmdoctorwindow->setAttrib("disabled", "disabled"); $this->_cdagewindow = new Zend_Form_Element_Text('cdagewindow'); $this->_cdagewindow->setAttrib("id", "controltbilling_cdage"); $this->_cdagewindow->setLabel("Idade"); $this->_cdagewindow->setDecorators($this->_decoratorsDefault); $this->_cdagewindow->setRequired(false); $this->_cdagewindow->setAttrib("disabled", "disabled"); $this->_nmexaminationwindow = new Zend_Form_Element_Text('nmexaminationwindow'); $this->_nmexaminationwindow->setAttrib("id", "controltbilling_nmexamination"); $this->_nmexaminationwindow->setLabel("Exame"); $this->_nmexaminationwindow->setDecorators($this->_decoratorsDefault); $this->_nmexaminationwindow->setRequired(false); $this->_nmexaminationwindow->setAttrib("disabled", "disabled"); $this->_cdmaterialwindow = new Zend_Form_Element_Text('cdmaterialwindow'); $this->_cdmaterialwindow->setAttrib("id", "controltbilling_cdmaterial"); $this->_cdmaterialwindow->setLabel("Material"); $this->_cdmaterialwindow->setDecorators($this->_decoratorsDefault); $this->_cdmaterialwindow->setRequired(false); $this->_cdmaterialwindow->setAttrib("disabled", "disabled"); $this->_fgstatuswindow = new Zend_Form_Element_Text('fgstatuswindow'); $this->_fgstatuswindow->setAttrib("id", "controltbilling_fgstatus"); $this->_fgstatuswindow->setLabel("Status"); $this->_fgstatuswindow->setDecorators($this->_decoratorsDefault); $this->_fgstatuswindow->setRequired(false); $this->_fgstatuswindow->setAttrib("disabled", "disabled"); $this->_collectiondatewindow = new Zend_Form_Element_Text('collectiondatewindow'); $this->_collectiondatewindow->setAttrib("id", "controltbilling_collectiondate"); $this->_collectiondatewindow->setLabel("Data da Coleta"); $this->_collectiondatewindow->setDecorators($this->_decoratorsDefault); $this->_collectiondatewindow->setRequired(false); $this->_collectiondatewindow->setAttrib("disabled", "disabled"); $this->_cdrequestexamination = new Zend_Form_Element_Hidden('cdrequestexamination'); $this->_cdrequestexamination->setAttrib("id", "appraisal_cdrequestexamination"); $this->_cdrequestexamination->setDecorators($this->_decoratorsDefault); $this->_cdrequestexamination->setRequired(false); //************//CAMPOS DE PESQUISA POR PACIENTE//************// $this->_sector1 = new Zend_Form_Element_Select('sector1'); $this->_sector1->setAttrib("id", "appraisaltyping_sector1"); $this->_sector1->setAttrib("class", "check_multiple_select"); $this->_sector1->setMultiOptions($arraysector); $this->_sector1->setLabel("Setor"); $this->_sector1->setDecorators($this->_decoratorsDefault); $this->_sector1->setRegisterInArrayValidator(true); $this->_sector1->setRequired(true); $this->_nmpacient = new Zend_Form_Element_Text('nmpacient'); $this->_nmpacient->setAttrib("id", "appraisaltyping_nmpacient"); // $this->_nmpacient->setAttrib("onkeyup", "lookup(this.value);"); // $this->_nmpacient->setAttrib("onblur", "fill();"); $this->_nmpacient->setLabel("Paciente"); $this->_nmpacient->setDecorators($this->_decoratorsDefault); $this->_nmpacient->setRequired(false); $this->_nmpacientid = new Zend_Form_Element_Hidden('nmpacientid'); $this->_nmpacientid->setDecorators($this->_decoratorsDefault); $this->_nmpacientid->setAttrib("id", "client_cdclient"); $this->_nmpacientid->setAttrib("onkeyup", "lookup(this.value);"); $this->_nmpacientid->setAttrib("onblur", "fill();"); $this->_dtbeginning = new Zend_Form_Element_Text('dtbeginning'); $this->_dtbeginning->setAttrib("id", "appraisaltyping_dtbeginning"); $this->_dtbeginning->setAttrib("class", "datepicker"); $this->_dtbeginning->setLabel("Data Início"); $this->_dtbeginning->setDecorators($this->_decoratorsDefault); $this->_dtbeginning->setRequired(false); $this->_dtmaturity = new Zend_Form_Element_Text('dtmaturity'); $this->_dtmaturity->setAttrib("id", "appraisaltyping_dtmaturity"); $this->_dtmaturity->setAttrib("class", "datepicker"); $this->_dtmaturity->setLabel("Data Fim"); $this->_dtmaturity->setDecorators($this->_decoratorsDefault); $this->_dtmaturity->setRequired(false); $this->_samplenumber = new Zend_Form_Element_Text('samplenumber'); $this->_samplenumber->setAttrib("id", "appraisaltyping_samplenumber"); $this->_samplenumber->setLabel("Número Amostra"); $this->_samplenumber->setDecorators($this->_decoratorsDefault); $this->_samplenumber->setRequired(false); $this->_numrequisicion = new Zend_Form_Element_Text('numrequisicion'); $this->_numrequisicion->setAttrib("id", "appraisaltyping_numrequisicion"); $this->_numrequisicion->setLabel("Número Requisição"); $this->_numrequisicion->setDecorators($this->_decoratorsDefault); $this->_numrequisicion->setRequired(false); //************//FIM DOS CAMPOS DE PESQUISA POR PACIENTE//************// // // // //************//CAMPOS DE PESQUISA POR MAPA DE TRABALHO//************// $this->_sector2 = new Zend_Form_Element_Select('sector2'); $this->_sector2->setAttrib("id", "appraisaltyping_sector2"); $this->_sector2->setAttrib("class", "check_multiple_select"); $this->_sector2->setMultiOptions($arraysector); $this->_sector2->setLabel("Setor"); $this->_sector2->setDecorators($this->_decoratorsDefault); $this->_sector2->setRegisterInArrayValidator(true); $this->_sector2->setRequired(true); $this->_dtendmaps = new Zend_Form_Element_Text('dtendmaps'); $this->_dtendmaps->setAttrib("id", "appraisaltyping_dtendmaps"); $this->_dtendmaps->setAttrib("class", "datepicker"); $this->_dtendmaps->setLabel("Data Fim"); $this->_dtendmaps->setDecorators($this->_decoratorsDefault); $this->_dtendmaps->setRequired(false); $this->_dtfirstmaps = new Zend_Form_Element_Text('dtfirstmaps'); $this->_dtfirstmaps->setAttrib("id", "appraisaltyping_dtfirstmaps"); $this->_dtfirstmaps->setAttrib("class", "datepicker"); $this->_dtfirstmaps->setLabel("Data Início"); $this->_dtfirstmaps->setDecorators($this->_decoratorsDefault); $this->_dtfirstmaps->setRequired(false); $this->_homepage = new Zend_Form_Element_Text('homepage'); $this->_homepage->setAttrib("id", "appraisaltyping_homepage"); $this->_homepage->setLabel("Nº Pág. Inicial"); $this->_homepage->setDecorators($this->_decoratorsDefault); $this->_homepage->setRequired(false); $this->_lastpage = new Zend_Form_Element_Text('lastpage'); $this->_lastpage->setAttrib("id", "appraisaltyping_lastpage"); $this->_lastpage->setLabel("Nº Pág. Final"); $this->_lastpage->setDecorators($this->_decoratorsDefault); $this->_lastpage->setRequired(false); $this->_cdmap = new Zend_Form_Element_Text('cdmap'); $this->_cdmap->setAttrib("id", "appraisaltyping_cdmap"); $this->_cdmap->setLabel("Cód. Ficha"); $this->_cdmap->setDecorators($this->_decoratorsDefault); $this->_cdmap->setRequired(false); //************//FIM DOS CAMPOS DE PESQUISA POR MAPA DE TRABALHO//************// }
public static function delete($id) { DepartmentModel::delete($id); }
public function __construct() { parent::__construct(); $arrayPriority = array('1' => 'Normal', '2' => 'Urgente'); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $arrayCovenant = array(); $arrayCovenant['0'] = "0"; foreach ($selectCovenant as $selCv) { $arrayCovenant[$selCv->cdcovenant] = $selCv->nmcovenant; } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arrayDepartment = array(); $arrayDepartment['0'] = "0"; foreach ($selectDepartment as $selDP) { $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; } $uncollectionModel = new CompanyModel(); $selectCompany = $uncollectionModel->fetchAll("cdcompanyparent IS NOT NULL"); $arrayuncollection = array(); $arrayuncollection['0'] = "0"; foreach ($selectCompany as $cdplace) { $arrayuncollection[$cdplace->cdcompany] = $cdplace->nmfantasyname; } $fgstatusModel = new RequestexaminationModel(); $selectstatus = $fgstatusModel->fetchAll(); $arrayfgstatus = array(); $arrayfgstatus['0'] = "Selecione"; foreach ($selectstatus as $cdstatus) { $arrayfgstatus[$cdstatus->cdrequestexamination] = $cdstatus->fgstatus; } //Novas... $this->_departament = new Zend_Form_Element_Select('departament'); $this->_departament->setAttrib("id", "maps_departament"); $this->_departament->setAttrib("class", "check_multiple_select"); $this->_departament->setMultiOptions($arrayDepartment); $this->_departament->setLabel("Setor"); $this->_departament->setDecorators($this->_decoratorsDefault); $this->_departament->setRegisterInArrayValidator(true); $this->_departament->setRequired(true); $this->_covenant = new Zend_Form_Element_Select('covenant'); $this->_covenant->setAttrib("id", "maps_covenant"); $this->_covenant->setAttrib("class", "check_multiple_select"); $this->_covenant->setMultiOptions($arrayCovenant); $this->_covenant->setLabel("Convênio"); $this->_covenant->setDecorators($this->_decoratorsDefault); $this->_covenant->setRegisterInArrayValidator(true); $this->_covenant->setRequired(true); $this->_uncollection = new Zend_Form_Element_Select('uncollection'); $this->_uncollection->setAttrib("id", "maps_uncollection"); $this->_uncollection->setAttrib("class", "check_multiple_select"); $this->_uncollection->setMultiOptions($arrayuncollection); $this->_uncollection->setLabel("Unidade de Coleta"); $this->_uncollection->setDecorators($this->_decoratorsDefault); $this->_uncollection->setRegisterInArrayValidator(true); $this->_uncollection->setRequired(true); $this->_stsample = new Zend_Form_Element_Select('stsample'); $this->_stsample->setAttrib("id", "maps_stsample"); $this->_stsample->setAttrib("class", "multiple_select"); $this->_stsample->setMultiOptions($arrayfgstatus); $this->_stsample->setLabel("Status Amostra"); $this->_stsample->setDecorators($this->_decoratorsDefault); $this->_stsample->setRegisterInArrayValidator(true); $this->_stsample->setRequired(true); $this->_priority = new Zend_Form_Element_Select('priority'); $this->_priority->setAttrib("id", "maps_priority"); $this->_priority->setAttrib("class", "check_multiple_select"); $this->_priority->setMultiOptions($arrayPriority); $this->_priority->setLabel("Prioridade"); $this->_priority->setDecorators($this->_decoratorsDefault); $this->_priority->setRegisterInArrayValidator(true); $this->_priority->setRequired(true); $this->_dtstart = new Zend_Form_Element_Text('dtstart'); $this->_dtstart->setAttrib("id", "maps_dtstart"); $this->_dtstart->setAttrib("class", "datepicker"); $this->_dtstart->setLabel("Data Inicial"); $this->_dtstart->setDecorators($this->_decoratorsDefault); $this->_dtstart->setRequired(false); $this->_dtend = new Zend_Form_Element_Text('dtend'); $this->_dtend->setAttrib("id", "maps_dtend"); $this->_dtend->setAttrib("class", "datepicker"); $this->_dtend->setLabel("Data Final"); $this->_dtend->setDecorators($this->_decoratorsDefault); $this->_dtend->setRequired(false); }
public function __construct() { parent::__construct(); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $arrayCovenant = array(); $arrayCovenant['0'] = "Selecione"; foreach ($selectCovenant as $selCVNT) { $arrayCovenant[$selCVNT->cdcovenant] = $selCVNT->nmcovenant; } $responsibleModel = new UserModel(); $selectUser = $responsibleModel->fetchAll(); $arrayResponsible = array(); $userInfo = Zend_Auth::getInstance()->getStorage()->read(); $nmcollectionplaceModel = new CompanyModel(); $selectCompany = $nmcollectionplaceModel->fetchAll(); $arraynmcollectionplace = array(); $arraynmcollectionplace['0'] = "Selecione"; foreach ($selectCompany as $cdplace) { $arraynmcollectionplace[$cdplace->cdcompanyparent] = $cdplace->nmfantasyname; } // $departmentModel = new DepartmentModel(); // $selectDepartment = $departmentModel->fetchAll(); // $arrayDepartment = array(); // $arrayDepartment['0'] = "Selecione"; // foreach($selectDepartment as $selDP){ // $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; // } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arrayDepartment = array(); $arrayDepartment['0'] = "Selecione"; foreach ($selectDepartment as $selDP) { $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; } $this->_fgcdcovenant = new Zend_Form_Element_Select('cdcovenant'); $this->_fgcdcovenant->setAttrib("id", "controltbilling_select"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_fgcdcovenant->setMultiOptions($arrayCovenant); $this->_fgcdcovenant->setLabel("Convênio"); $this->_fgcdcovenant->setDecorators($this->_decoratorsDefault); $this->_fgcdcovenant->setRegisterInArrayValidator(true); $this->_fgcdcovenant->setRequired(true); // select do convenio para a página biilingdata $this->_fgcdcovenantdata = new Zend_Form_Element_Select('fgcdcovenantdata'); $this->_fgcdcovenantdata->setAttrib("id", "controltbillingdata_fgcdcovenantdata"); $this->_fgcdcovenantdata->setAttrib("class", "nmbillingcss"); $this->_fgcdcovenantdata->setMultiOptions($arrayCovenant); $this->_fgcdcovenantdata->setLabel("Convênios"); $this->_fgcdcovenantdata->setDecorators($this->_decoratorsDefault); $this->_fgcdcovenantdata->setRegisterInArrayValidator(true); $this->_fgcdcovenantdata->setRequired(true); $this->_nmcollectionplace = new Zend_Form_Element_Select('nmcollectionplace'); $this->_nmcollectionplace->setAttrib("id", "controltbilling_select"); // $this->_nmcollectionplace->setMultiOptions($arrayDocumentData); $this->_nmcollectionplace->setMultiOptions($arraynmcollectionplace); $this->_nmcollectionplace->setLabel("Posto de Coleta"); $this->_nmcollectionplace->setDecorators($this->_decoratorsDefault); $this->_nmcollectionplace->setRegisterInArrayValidator(true); $this->_nmcollectionplace->setRequired(true); $this->_nmdepartment = new Zend_Form_Element_Select('nmdepartment'); $this->_nmdepartment->setAttrib("id", "controltbilling_select"); // $this->_nmdepartment->setAttrib("class", "check_multiple_select"); $this->_nmdepartment->setMultiOptions($arrayDepartment); $this->_nmdepartment->setLabel("Setor"); $this->_nmdepartment->setDecorators($this->_decoratorsDefault); $this->_nmdepartment->setRegisterInArrayValidator(true); $this->_nmdepartment->setRequired(true); $this->_fgstatus = new Zend_Form_Element_Select('fgstatus'); $this->_fgstatus->setAttrib("id", "controltbilling_select"); $this->_fgstatus->setMultiOptions(array("0" => "Selecione", "1" => "Ativo", "2" => "Inativo")); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRegisterInArrayValidator(true); $this->_fgstatus->setRequired(true); $this->_nmpacient = new Zend_Form_Element_Text('nmpacient'); $this->_nmpacient->setAttrib("id", "controllbilling_nmpacient"); $this->_nmpacient->setAttrib("onkeyup", "lookup(this.value);"); $this->_nmpacient->setAttrib("onblur", "fill();"); $this->_nmpacient->setAttrib("autocomplete", "off"); $this->_nmpacient->setAttrib("size", "50"); $this->_nmpacient->setLabel("Paciente"); $this->_nmpacient->setDecorators($this->_decoratorsDefault); $this->_nmpacient->setRequired(false); $this->_responsible = new Zend_Form_Element_Select('responsible'); $this->_responsible->setAttrib("id", "controltbilling_select"); $this->_responsible->setAttrib("class", "controlbilling_responsible"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_responsible->setLabel("Responsável"); $arrayResponsible['0'] = "Selecione"; foreach ($selectUser as $userLog) { /* if ($userInfo->idusergslab == $userLog->idusergslab) { $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab; } */ $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab; } $this->_responsible->setMultiOptions($arrayResponsible); $this->_responsible->setValue($userInfo); $this->_responsible->setDecorators($this->_decoratorsDefault); $this->_responsible->setRegisterInArrayValidator(true); $this->_responsible->setRequired(true); $this->_responsibledata = new Zend_Form_Element_Select('responsibledata'); $this->_responsibledata->setAttrib("id", "controltbilling_responsible"); $this->_responsibledata->setAttrib("class", "controlbillingdata_responsibledata"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_responsibledata->setMultiOptions($arrayResponsible); $this->_responsibledata->setLabel("Responsável"); $this->_responsibledata->setDecorators($this->_decoratorsDefault); $this->_responsibledata->setRegisterInArrayValidator(true); $this->_responsibledata->setRequired(true); $this->_dtbegindate = new Zend_Form_Element_Text('dtbegindate'); $this->_dtbegindate->setAttrib("id", "controltbilling_dtbegindate"); $this->_dtbegindate->setAttrib("class", "datepicker"); $this->_dtbegindate->setLabel("Data Início"); $this->_dtbegindate->setDecorators($this->_decoratorsDefault); $this->_dtbegindate->setRequired(false); $this->_timebeginhour = new Zend_Form_Element_Text('timebeginhour'); $this->_timebeginhour->setLabel("Horário"); $this->_timebeginhour->setDecorators($this->_decoratorsDefault); $this->_timebeginhour->setAttrib("id", "controltbilling_timebeginhour"); $this->_timebeginhour->setAttrib("class", "mask_time"); $this->_dtenddate = new Zend_Form_Element_Text('dtenddate'); $this->_dtenddate->setAttrib("id", "controltbilling_dtenddate"); $this->_dtenddate->setAttrib("class", "datepicker"); $this->_dtenddate->setLabel("Data Fim"); $this->_dtenddate->setDecorators($this->_decoratorsDefault); $this->_dtenddate->setRequired(false); $this->_timeendhour = new Zend_Form_Element_Text('timeendhour'); $this->_timeendhour->setLabel("Horário"); $this->_timeendhour->setDecorators($this->_decoratorsDefault); $this->_timeendhour->setAttrib("id", "controltbilling_timeendhour"); $this->_timeendhour->setAttrib("class", "mask_time"); ////////////////// $this->_dtbegindatedata = new Zend_Form_Element_Text('dtbegindatedata'); $this->_dtbegindatedata->setAttrib("id", "controltbillingdata_dtbegindatedata"); $this->_dtbegindatedata->setAttrib("class", "datepicker"); $this->_dtbegindatedata->setLabel("Data Início"); $this->_dtbegindatedata->setDecorators($this->_decoratorsDefault); $this->_dtbegindatedata->setRequired(false); $this->_timebeginhourdata = new Zend_Form_Element_Text('timebeginhourdata'); $this->_timebeginhourdata->setAttrib("id", "controltbillingdata_timebeginhourdata"); $this->_timebeginhourdata->setLabel("Hora Início"); $this->_timebeginhourdata->setDecorators($this->_decoratorsDefault); $this->_timebeginhourdata->setRequired(false); $this->_dtenddatedata = new Zend_Form_Element_Text('dtenddatedata'); $this->_dtenddatedata->setAttrib("id", "controltbillingdata_dtenddatedata"); $this->_dtenddatedata->setAttrib("class", "datepicker"); $this->_dtenddatedata->setLabel("Data Fim"); $this->_dtenddatedata->setDecorators($this->_decoratorsDefault); $this->_dtenddatedata->setRequired(false); $this->_timeendhourdata = new Zend_Form_Element_Text('timeendhourdata'); $this->_timeendhourdata->setAttrib("id", "controltbillingdata_timeendhourdata"); $this->_timeendhourdata->setLabel("Hora Fim"); $this->_timeendhourdata->setDecorators($this->_decoratorsDefault); $this->_timeendhourdata->setRequired(false); ////////////// $this->_nrlot = new Zend_Form_Element_Text('nrlot'); $this->_nrlot->setAttrib("id", "controltbilling_nrlot"); $this->_nrlot->setLabel("Número do Lote"); $this->_nrlot->setDecorators($this->_decoratorsDefault); $this->_nrlot->setRequired(false); $this->_statusbilling = new Zend_Form_Element_Text('statusbilling'); $this->_statusbilling->setAttrib("id", "controltbillingdata_statusbilling"); $this->_statusbilling->setLabel("Status Faturamento"); $this->_statusbilling->setDecorators($this->_decoratorsDefault); $this->_statusbilling->setRequired(false); // Numero da fatura $this->_nmbilling = new Zend_Form_Element_Text('nmbilling'); $this->_nmbilling->setAttrib("id", "controltbillingdata_nmbilling"); $this->_nmbilling->setAttrib("class", "nmbillingcss"); $this->_nmbilling->setLabel("# Fatura"); $this->_nmbilling->setDecorators($this->_decoratorsDefault); $this->_nmbilling->setRequired(false); // Numero da Fatura $this->_nmlotbilling = new Zend_Form_Element_Text('nmlotbilling'); $this->_nmlotbilling->setAttrib("id", "controltbilling__nmlotbilling"); $this->_nmlotbilling->setAttrib("class", "nmlotbillingcss"); $this->_nmlotbilling->setLabel("Nº Lote Fatura"); $this->_nmlotbilling->setDecorators($this->_decoratorsDefault); $this->_nmlotbilling->setRequired(false); $this->_dtmaturity = new Zend_Form_Element_Text('dtmaturity'); $this->_dtmaturity->setAttrib("id", "controltbilling_dtmaturity"); $this->_dtmaturity->setAttrib("class", "datepicker"); $this->_dtmaturity->setLabel("Vencimento"); $this->_dtmaturity->setDecorators($this->_decoratorsDefault); $this->_dtmaturity->setRequired(false); $this->_dtmaturitydata = new Zend_Form_Element_Text('dtmaturitydata'); $this->_dtmaturitydata->setAttrib("id", "controltbillingdata_dtmaturitydata"); $this->_dtmaturitydata->setAttrib("class", "datepicker"); $this->_dtmaturitydata->setLabel("Vencimento"); $this->_dtmaturitydata->setDecorators($this->_decoratorsDefault); $this->_dtmaturitydata->setRequired(false); $this->_accountsreceivable = new Zend_Form_Element_MultiCheckbox('accountsreceivable'); $this->_accountsreceivable->addMultiOption('accountsreceivable', ' Enviar para Contas à Receber'); $this->_accountsreceivable->setAttrib("id", "accountsreceivable"); $this->_accountsreceivable->setAttrib("class", "standartchecklabel"); $this->_accountsreceivable->AddDecorator('HtmlTag', array('tag' => 'li', 'openOnly' => true)); $this->_accountsreceivable->setDecorators(array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li')))); }
public function __construct() { parent::__construct(); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $company = new CompanyModel(); $selectCompany = $company->fetchAll('cdcompanyparent IS NULL'); $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $nmcollectionplaceModel = new CompanyModel(); $selectCompany = $nmcollectionplaceModel->fetchAll(); $clientModel = new ClientModel(); $clientData = $clientModel->fetchAll(); $this->_cdcovenant = new Zend_Form_Element_Select('cdcovenant'); $this->_cdcovenant->setAttrib("id", "covenantbilling_cdcovenant"); $this->_cdcovenant->setAttrib("class", "check_multiple_select"); foreach ($selectCovenant as $value) { //$this->_cdcovenant->addMultiOption($value->cdcovenant, $value->nmcovenant); } $this->_cdcovenant->setLabel("Convênio"); $this->_cdcovenant->setDecorators($this->_decoratorsDefault); $this->_cdcovenant->setRegisterInArrayValidator(false); $this->_cdcovenant->setRequired(false); $this->_cdcompanyparent = new Zend_Form_Element_Select('cdcompanyparent'); $this->_cdcompanyparent->setAttrib("id", "controltbilling_cdcompanyparent"); foreach ($selectCompany as $value) { $this->_cdcompanyparent->addMultiOption($value->cdcompany, $value->nmcompany); } $this->_cdcompanyparent->setLabel("Posto de Coleta"); $this->_cdcompanyparent->setDecorators($this->_decoratorsDefault); $this->_cdcompanyparent->setRegisterInArrayValidator(false); $this->_cdcompanyparent->setRequired(false); $this->_cddepartment = new Zend_Form_Element_Select('cddepartment'); $this->_cddepartment->setAttrib("id", "covenantbilling_ceddepartment"); $this->_cddepartment->setAttrib("class", "check_multiple_select"); foreach ($selectDepartment as $value) { $this->_cddepartment->addMultiOption($value->cddepartment, $value->nmdepartment); } $this->_cddepartment->setLabel("Setor"); $this->_cddepartment->setDecorators($this->_decoratorsDefault); $this->_cddepartment->setRegisterInArrayValidator(false); $this->_cddepartment->setRequired(false); $this->_fgstatus = new Zend_Form_Element_Select('fgstatus'); $this->_fgstatus->setAttrib("id", "covenantbilling_fgstatus"); $this->_fgstatus->setMultiOptions(array("0" => "Selecione", "1" => "Ativo", "2" => "Inativo")); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRegisterInArrayValidator(false); $this->_fgstatus->setRequired(false); //$clientData $this->_cdclient = new Zend_Form_Element_Text('cdclient'); $this->_cdclient->setAttrib("id", "covenantbilling_cdclient"); $this->_cdclient->setAttrib("onkeyup", "lookup(this.value);"); $this->_cdclient->setAttrib("onblur", "fill();"); $this->_cdclient->setAttrib("autocomplete", "off"); $this->_cdclient->setAttrib("size", "50"); // foreach ($clientData as $value) { // $this->_cdclient->addMultiOption($value->cdclient, $value->nmclient); // } $this->_cdclient->setLabel("Paciente"); $this->_cdclient->setDecorators($this->_decoratorsDefault); $this->_cdclient->setRequired(false); $this->_dtstart = new Zend_Form_Element_Text('dtstart'); $this->_dtstart->setAttrib("id", "covenantbilling_dtstart"); $this->_dtstart->setAttrib("class", "datepicker"); $this->_dtstart->setLabel("Data Inicio"); $this->_dtstart->setDecorators($this->_decoratorsDefault); $this->_dtstart->setRequired(false); $this->_hrend = new Zend_Form_Element_Text('dtenddate'); $this->_hrend->setLabel("Hora Início"); $this->_hrend->setDecorators($this->_decoratorsDefault); $this->_hrend->setAttrib("id", "covenantbilling_hrend"); $this->_hrend->setAttrib("class", "mask_time"); $this->_dtend = new Zend_Form_Element_Text('dtend'); $this->_dtend->setAttrib("id", "covenantbilling_dtenddate"); $this->_dtend->setAttrib("class", "datepicker"); $this->_dtend->setLabel("Data Fim"); $this->_dtend->setDecorators($this->_decoratorsDefault); $this->_dtend->setRequired(false); $this->_hrstart = new Zend_Form_Element_Text('hrstart'); $this->_hrstart->setLabel("Hora Fim"); $this->_hrstart->setDecorators($this->_decoratorsDefault); $this->_hrstart->setAttrib("id", "covenantbilling_hrstart"); $this->_hrstart->setAttrib("class", "mask_time"); $this->_nrbatch = new Zend_Form_Element_Text('nrlot'); $this->_nrbatch->setAttrib("id", "covenantbilling_nrbatch"); $this->_nrbatch->setLabel("Número do Lote"); $this->_nrbatch->setDecorators($this->_decoratorsDefault); $this->_nrbatch->setRequired(false); $this->_dtduedate = new Zend_Form_Element_Text('dtduedate'); $this->_dtduedate->setAttrib("id", "covenantbilling_dtduedate"); $this->_dtduedate->setAttrib("class", "datepicker"); $this->_dtduedate->setLabel("Vencimento"); $this->_dtduedate->setDecorators($this->_decoratorsDefault); $this->_dtduedate->setRequired(false); }
public function __construct() { parent::__construct(); $departmentModel = new DepartmentModel(); $departmentData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment()); $roleModel = new RoleModel(); $roleData = $roleModel->fetchAll($roleModel->select()); // $departmentSupervisorModel = new DepartmentsupervisorModel(); // $userData = $departmentSupervisorModel->fetchAll($departmentSupervisorModel->getAllSupervisor()); $this->_nmuserimage = new Zend_Form_Element_Hidden('nmuserimage'); $this->_nmuserimage->setDecorators($this->_decoratorsDefaultRight); $this->_nmuserimage->setAttrib("id", "user_nmuserimage"); $this->_cdusergslab = new Zend_Form_Element_Hidden('cdusergslab'); $this->_cdusergslab->setDecorators($this->_decoratorsDefault); $this->_cdusergslab->setAttrib("id", "user_cdusergslab"); $this->_idusergslab = new Zend_Form_Element_Text('idusergslab'); $this->_idusergslab->setLabel("Login"); $this->_idusergslab->setRequired(true); $this->_idusergslab->setDecorators($this->_decoratorsRequired); $this->_idusergslab->setAttrib("id", "user_idusergslab"); $this->_idusergslab->setAttrib("class", "alpha"); $this->_nmpassword = new Zend_Form_Element_Password('nmpassword'); $this->_nmpassword->setLabel("Senha"); $this->_nmpassword->setRequired(true); $this->_nmpassword->setAttrib("id", "user_nmpassword"); $this->_nmpassword->setDecorators($this->_decoratorsRequired); $this->_confirmpassword = new Zend_Form_Element_Password('confirmpassword'); $this->_confirmpassword->setLabel("Confirmar Senha"); $this->_confirmpassword->setRequired(true); $this->_confirmpassword->setAttrib("id", "user_confirmpassword"); $this->_confirmpassword->setDecorators($this->_decoratorsRequired); $this->_idemployeeregister = new Zend_Form_Element_Text('idemployeeregister'); $this->_idemployeeregister->setLabel("Matrícula"); $this->_idemployeeregister->setDecorators($this->_decoratorsDefault); $this->_idemployeeregister->setAttrib("id", "user_idemployeeregister"); $this->_idemployeeregister->setAttrib("class", "numeric"); $this->_nmusergslab = new Zend_Form_Element_Text('nmusergslab'); $this->_nmusergslab->setLabel("Nome Completo"); $this->_nmusergslab->setDecorators($this->_decoratorsRequired); $this->_nmusergslab->setAttrib("id", "user_nmusergslab"); $this->_nmusergslab->setAttrib("class", "alpha"); $this->_nmusergslab->setRequired(true); $this->_nmmail = new Zend_Form_Element_Text('nmmail'); $this->_nmmail->setLabel("E-mail"); $this->_nmmail->setDecorators($this->_decoratorsDefault); $this->_nmmail->setAttrib("id", "user_nmmail"); $this->_nmmail->setAttrib("class", "required_email"); $this->_nmmail->setRequired(false); $this->_idcep = new Zend_Form_Element_Text('idcep'); $this->_idcep->setLabel("CEP"); $this->_idcep->setDecorators($this->_decoratorsDefault); $this->_idcep->setAttrib("id", "user_idcep"); $this->_idcep->setAttrib("class", "numeric"); $this->_idrg = new Zend_Form_Element_Text('idrg'); $this->_idrg->setLabel("RG"); $this->_idrg->setDecorators($this->_decoratorsDefault); $this->_idrg->setAttrib("id", "user_idrg"); $this->_idrg->setAttrib("class", "numeric"); $this->_idrg->setRequired(false); $this->_idcpf = new Zend_Form_Element_Text('idcpf'); $this->_idcpf->setLabel("CPF"); $this->_idcpf->setDecorators($this->_decoratorsDefault); $this->_idcpf->setAttrib("id", "user_idcpf"); $this->_idcpf->setAttrib("class", "mask_cpf"); $this->_idcpf->setRequired(false); $this->_nmstreet = new Zend_Form_Element_Text('nmstreet'); $this->_nmstreet->setLabel("Rua"); $this->_nmstreet->setDecorators($this->_decoratorsRequired); $this->_nmstreet->setAttrib("id", "user_nmstreet"); $this->_nmstreet->setRequired(true); $this->_nrnumber = new Zend_Form_Element_Text('nrnumber'); $this->_nrnumber->setLabel("Número"); $this->_nrnumber->setRequired(true); $this->_nrnumber->setDecorators($this->_decoratorsRequired); $this->_nrnumber->setAttrib("id", "user_nrnumber"); $this->_nrnumber->setAttrib("class", "numeric"); $this->_idcity = new Zend_Form_Element_Text('idcity'); $this->_idcity->setLabel("Cidade"); $this->_idcity->setRequired(true); $this->_idcity->setDecorators($this->_decoratorsRequired); $this->_idcity->setAttrib("id", "user_idcity"); $this->_idcity->setAttrib("class", "alpha"); $this->_idstate = new Zend_Form_Element_Select('idstate'); $this->_idstate->setRegisterInArrayValidator(false); $this->_idstate->addMultiOption("", "UF"); $this->_idstate->addMultiOption("AC", "AC"); $this->_idstate->addMultiOption("AL", "AL"); $this->_idstate->addMultiOption("AP", "AP"); $this->_idstate->addMultiOption("AM", "AM"); $this->_idstate->addMultiOption("BA", "BA"); $this->_idstate->addMultiOption("CE", "CE"); $this->_idstate->addMultiOption("SP", "SP"); $this->_idstate->addMultiOption("DF", "DF"); $this->_idstate->addMultiOption("ES", "ES"); $this->_idstate->addMultiOption("GO", "GO"); $this->_idstate->addMultiOption("MA", "MA"); $this->_idstate->addMultiOption("MT", "MT"); $this->_idstate->addMultiOption("MS", "MS"); $this->_idstate->addMultiOption("MG", "MG"); $this->_idstate->addMultiOption("PA", "PA"); $this->_idstate->addMultiOption("PB", "PB"); $this->_idstate->addMultiOption("PR", "PR"); $this->_idstate->addMultiOption("PE", "PE"); $this->_idstate->addMultiOption("PI", "PI"); $this->_idstate->addMultiOption("RJ", "RJ"); $this->_idstate->addMultiOption("RN", "RN"); $this->_idstate->addMultiOption("RS", "RS"); $this->_idstate->addMultiOption("RO", "RO"); $this->_idstate->addMultiOption("RR", "RR"); $this->_idstate->addMultiOption("SC", "SC"); $this->_idstate->addMultiOption("SP", "SP"); $this->_idstate->addMultiOption("SE", "SE"); $this->_idstate->addMultiOption("TO", "TO"); $this->_idstate->setLabel("Estado"); $this->_idstate->setRequired(true); $this->_idstate->setDecorators($this->_decoratorsRequired); $this->_idstate->setAttrib("id", "user_idstate"); $this->_cddepartment = new Zend_Form_Element_Select('cddepartment'); $this->_cddepartment->setRegisterInArrayValidator(false); foreach ($departmentData as $department) { $this->_cddepartment->addMultiOption($department->cddepartment, $department->nmdepartment); } $this->_cddepartment->setLabel("Setor"); $this->_cddepartment->setDecorators($this->_decoratorsRequired); $this->_cddepartment->setAttrib("id", "user_cddepartment"); $this->_cddepartment->setAttrib("class", "alpha"); $this->_cddepartment->setRequired(true); $this->_cdrole = new Zend_Form_Element_Select('cdrole'); $this->_cdrole->setRegisterInArrayValidator(false); foreach ($roleData as $role) { $this->_cdrole->addMultiOption($role->cdrole, $role->nmrole); } $this->_cdrole->setLabel("Função"); $this->_cdrole->setDecorators($this->_decoratorsRequired); $this->_cdrole->setAttrib("id", "user_cdrole"); $this->_cdrole->setRequired(true); $this->_cddepartmentsupervisor = new Zend_Form_Element_Select('cddepartmentsupervisor'); $this->_cddepartmentsupervisor->setRegisterInArrayValidator(false); // foreach ($userData as $departmentSupervisor) { // $this->_cddepartmentsupervisor->addMultiOption($departmentSupervisor->cdusergslab, $departmentSupervisor->nmusergslab); // } $this->_cddepartmentsupervisor->setLabel("Superior"); $this->_cddepartmentsupervisor->setRequired(false); $this->_cddepartmentsupervisor->setDecorators($this->_decoratorsDefault); $this->_cddepartmentsupervisor->setAttrib("id", "user_cddepartmentsupervisor"); $this->_qtactive = new Zend_Form_Element_Text('qtactive'); $this->_qtactive->setLabel("Validade"); $this->_qtactive->setDecorators($this->_decoratorsDefault); $this->_qtactive->setAttrib("id", "user_qtactive"); $this->_qtactive->setAttrib("class", "numeric"); $this->_qtactive->setRequired(false); $this->_fgactiveformat = new Zend_Form_Element_Select('fgactiveformat'); $this->_fgactiveformat->setRegisterInArrayValidator(false); $this->_fgactiveformat->addMultiOptions(array('1' => 'Dia', '2' => 'Mês', '3' => 'Ano')); $this->_fgactiveformat->setLabel("Formato da Validade"); $this->_fgactiveformat->setDecorators($this->_decoratorsDefault); $this->_fgactiveformat->setAttrib("id", "user_fgactiveformat"); $this->_fgactiveformat->setRequired(false); $this->_fgactive = new Zend_Form_Element_Select('fgactive'); $this->_fgactive->setRegisterInArrayValidator(false); $this->_fgactive->addMultiOptions(array('1' => 'Ativo', '2' => 'Inativo')); $this->_fgactive->setLabel("Status"); $this->_fgactive->setDecorators($this->_decoratorsDefault); $this->_fgactive->setAttrib("id", "user_fgactive"); $this->_fgactive->setRequired(false); }