• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Firm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Firm的典型用法代码示例。如果您正苦于以下问题:PHP Firm类的具体用法?PHP Firm怎么用?PHP Firm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Firm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: actionIsCommonOphthalmic

 public function actionIsCommonOphthalmic($id)
 {
     $firm = Firm::model()->findByPk(Yii::app()->session['selected_firm_id']);
     if ($cd = CommonOphthalmicDisorder::model()->find('disorder_id=? and subspecialty_id=?', array($id, $firm->serviceSubspecialtyAssignment->subspecialty_id))) {
         echo "<option value=\"{$cd->disorder_id}\" data-order=\"{$cd->display_order}\">" . $cd->disorder->term . "</option>";
     }
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:7,代码来源:DisorderController.php


示例2: canCreateEvent

 /**
  * @param Firm      $firm
  * @param Episode   $episode
  * @param EventType $event_type
  *
  * @return bool
  */
 public function canCreateEvent(Firm $firm = null, Episode $episode = null, EventType $event_type = null)
 {
     if ($event_type) {
         if ($event_type->disabled) {
             return false;
         }
         if (!$event_type->support_services && !$firm->getSubspecialtyID()) {
             // Can't create a non-support service event for a support-service firm
             return false;
         }
     }
     if ($firm && $episode) {
         return $this->canEditEpisode($firm, $episode);
     }
     return true;
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:23,代码来源:AuthRules.php


示例3: actionApplications

 public function actionApplications()
 {
     $date_from = date(Helper::NHS_DATE_FORMAT, strtotime('-1 year'));
     $date_to = date(Helper::NHS_DATE_FORMAT);
     if (isset($_GET['yt0'])) {
         $firm = null;
         if (@$_GET['firm_id'] && (int) $_GET['firm_id']) {
             $firm_id = (int) $_GET['firm_id'];
             if (!($firm = Firm::model()->findByPk($firm_id))) {
                 throw new CException("Unknown firm {$firm_id}");
             }
         }
         if (@$_GET['date_from'] && date('Y-m-d', strtotime($_GET['date_from']))) {
             $date_from = date('Y-m-d', strtotime($_GET['date_from']));
         }
         if (@$_GET['date_to'] && date('Y-m-d', strtotime($_GET['date_to']))) {
             $date_to = date('Y-m-d', strtotime($_GET['date_to']));
         }
         $results = $this->getApplications($date_from, $date_to, $firm);
         $filename = 'therapyapplication_report_' . date('YmdHis') . '.csv';
         $this->sendCsvHeaders($filename);
         echo $this->array2Csv($results);
     } else {
         $subspecialty = Subspecialty::model()->find('ref_spec=:ref_spec', array(':ref_spec' => 'MR'));
         $context = array('firms' => Firm::model()->getList($subspecialty->id), 'date_from' => $date_from, 'date_to' => $date_to);
         $this->render('applications', $context);
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:28,代码来源:ReportController.php


示例4: actionForm

 /**
  * @param int $patient_id
  * @param int $medication_id
  */
 public function actionForm($patient_id, $medication_id = null)
 {
     if ($medication_id == 'adherence') {
         $this->renderPartial('adherence_form', array("patient" => $this->fetchModel('Patient', $patient_id)), false, true);
     } else {
         $this->renderPartial('form', array("patient" => $this->fetchModel('Patient', $patient_id), "medication" => $this->fetchModel('Medication', $medication_id, true), "firm" => Firm::model()->findByPk($this->selectedFirmId)), false, true);
     }
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:12,代码来源:MedicationController.php


示例5: setFirmFromSession

 /**
  * Sets the firm property on the controller from the session
  *
  * @throws HttpException
  */
 protected function setFirmFromSession()
 {
     if (!($firm_id = Yii::app()->session->get('selected_firm_id'))) {
         throw new HttpException('Firm not selected');
     }
     if (!$this->firm || $this->firm->id != $firm_id) {
         $this->firm = Firm::model()->findByPk($firm_id);
     }
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:14,代码来源:BaseModuleController.php


示例6: actionList

 public function actionList()
 {
     $search = $this->request->getParam("search");
     $session = new CHttpSession();
     $session->open();
     $firmId = $this->request->getParam("firm_id");
     $subspecialtyId = $this->request->getParam("subspecialty_id");
     if ($firmId > 0 && (isset($search['filterid']['subspecialty_id']['value']) && $search['filterid']['subspecialty_id']['value'] > 0)) {
         $session['lastSubspecialtyId'] = $search['filterid']['subspecialty_id']['value'];
         $this->redirect('/oeadmin/LeafletSubspecialtyFirm/list?search[filterid][firm_id][value]=' . $firmId . '&subspecialty_id=' . $search['filterid']['subspecialty_id']['value']);
     }
     $lastSubspecialtyId = $session['lastSubspecialtyId'];
     // check if it's been already set
     if (!($lastSubspecialtyId > 0)) {
         if (isset($search['filterid']['subspecialty_id']['value'])) {
             $session['lastSubspecialtyId'] = $search['filterid']['subspecialty_id']['value'];
         } else {
             $session['lastSubspecialtyId'] = Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id;
         }
     }
     // || ($this->request->getParam("subspecialty_id")!=$session['lastSubspecialtyId'] && $search['filterid']['firm_id']['value']=="")
     if ($subspecialtyId > 0 && $subspecialtyId != $session['lastSubspecialtyId'] && isset($search['filterid']['firm_id']['value']) || $subspecialtyId == $session['lastSubspecialtyId'] && $search['filterid']['firm_id']['value'] == "") {
         $session['lastSubspecialtyId'] = "";
         $this->redirect('/oeadmin/LeafletSubspecialtyFirm/list?search[filterid][subspecialty_id][value]=' . $subspecialtyId);
     }
     if (isset($search['filterid']['firm_id']['value']) && $search['filterid']['firm_id']['value'] > 0) {
         $excludeSubspecialty = true;
         $excludeFirm = false;
         $admin = new AdminListAutocomplete(OphTrConsent_Leaflet_Firm::model(), $this);
         $admin->setCustomDeleteURL('/oeadmin/LeafletSubspecialtyFirm/deleteFirm');
     } else {
         $excludeSubspecialty = false;
         $excludeFirm = true;
         $admin = new AdminListAutocomplete(OphTrConsent_Leaflet_Subspecialty::model(), $this);
         $admin->setCustomDeleteURL('/oeadmin/LeafletSubspecialtyFirm/deleteSubspecialty');
     }
     $admin->setListFields(array('id', 'leaflet.name'));
     $admin->setCustomSaveURL('/oeadmin/LeafletSubspecialtyFirm/add');
     $admin->setModelDisplayName('Leaflet-Subspecialty-Firm Assignment');
     if ($subspecialtyId > 0) {
         $defaultSubspecialty = $subspecialtyId;
     } else {
         $defaultSubspecialty = Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id;
     }
     $admin->setFilterFields(array(array('label' => 'Subspecialty', 'dropDownName' => 'subspecialty_id', 'defaultValue' => $defaultSubspecialty, 'listModel' => Subspecialty::model(), 'listIdField' => 'id', 'listDisplayField' => 'name', 'excludeSearch' => $excludeSubspecialty), array('label' => 'Firm', 'dropDownName' => 'firm_id', 'defaultValue' => null, 'listModel' => Firm::model(), 'listIdField' => 'id', 'listDisplayField' => 'name', 'emptyLabel' => '-- All --', 'dependsOnFilterName' => 'subspecialty_id', 'dependsOnDbFieldName' => 'subspecialty_id', 'dependsOnJoinedTable' => 'serviceSubspecialtyAssignment', 'excludeSearch' => $excludeFirm)));
     // we set default search options
     if ($this->request->getParam('search') == '') {
         $admin->getSearch()->initSearch(array('filterid' => array('subspecialty_id' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id)));
     }
     $admin->setAutocompleteField(array('fieldName' => 'leaflet_id', 'allowBlankSearch' => 1, 'jsonURL' => '/oeadmin/LeafletSubspecialtyFirm/search', 'placeholder' => 'search for leaflets'));
     //$admin->searchAll();
     $admin->listModel();
 }
开发者ID:code-4-england,项目名称:OpenEyes,代码行数:53,代码来源:LeafletSubspecialtyFirmController.php


示例7: init

 public function init()
 {
     $modulePath = Yii::app()->assetManager->publish(Yii::getPathOfAlias('application.modules.OphDrPrescription.assets'));
     Yii::app()->clientScript->registerScriptFile($modulePath . '/js/report.js', CClientScript::POS_HEAD);
     if (!$this->subspecialtyId) {
         $firm = Firm::model()->findByPk(Yii::app()->session['selected_firm_id']);
         if (isset($firm->serviceSubspecialtyAssignment->subspecialty_id)) {
             $this->subspecialtyId = $firm->serviceSubspecialtyAssignment->subspecialty_id;
         }
     }
     if (!$this->siteId) {
         $this->siteId = Yii::app()->session['selected_site_id'];
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:14,代码来源:ReportController.php


示例8: actionList

 public function actionList()
 {
     $admin = new AdminListAutocomplete(SiteSubspecialtyDrug::model(), $this);
     $admin->setListFields(array('id', 'drugs.name', 'drugs.dose_unit'));
     $admin->setCustomDeleteURL('/OphDrPrescription/admin/commondrugsdelete');
     $admin->setCustomSaveURL('/OphDrPrescription/admin/commondrugsadd');
     $admin->setModelDisplayName('Common Drugs List');
     $admin->setFilterFields(array(array('label' => 'Site', 'dropDownName' => 'site_id', 'defaultValue' => Yii::app()->session['selected_site_id'], 'listModel' => Site::model(), 'listIdField' => 'id', 'listDisplayField' => 'short_name'), array('label' => 'Subspecialty', 'dropDownName' => 'subspecialty_id', 'defaultValue' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'listModel' => Subspecialty::model(), 'listIdField' => 'id', 'listDisplayField' => 'name')));
     // we set default search options
     if ($this->request->getParam('search') == '') {
         $admin->getSearch()->initSearch(array('filterid' => array('site_id' => Yii::app()->session['selected_site_id'], 'subspecialty_id' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id)));
     }
     $admin->setAutocompleteField(array('fieldName' => 'drug_id', 'jsonURL' => '/OphDrPrescription/default/DrugList', 'placeholder' => 'search for drugs'));
     //$admin->searchAll();
     $admin->listModel();
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:16,代码来源:CommonDrugAdminController.php


示例9: actionList

 public function actionList()
 {
     $admin = new AdminListAutocomplete(SiteSubspecialtyAnaestheticAgentDefault::model(), $this);
     $admin->setListFields(array('id', 'agents.name'));
     $admin->setCustomDeleteURL('/oeadmin/AnaestheticAgentDefaults/delete');
     $admin->setCustomSaveURL('/oeadmin/AnaestheticAgentDefaults/add');
     $admin->setModelDisplayName('Operation Note Anaesthetic Agent Defaults');
     $admin->setFilterFields(array(array('label' => 'Site', 'dropDownName' => 'site_id', 'defaultValue' => Yii::app()->session['selected_site_id'], 'listModel' => Site::model(), 'listIdField' => 'id', 'listDisplayField' => 'short_name'), array('label' => 'Subspecialty', 'dropDownName' => 'subspecialty_id', 'defaultValue' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'listModel' => Subspecialty::model(), 'listIdField' => 'id', 'listDisplayField' => 'name')));
     // we set default search options
     if ($this->request->getParam('search') == '') {
         $admin->getSearch()->initSearch(array('filterid' => array('subspecialty_id' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'site_id' => Yii::app()->session['selected_site_id'])));
     }
     $admin->setAutocompleteField(array('fieldName' => 'anaesthetic_agent_id', 'allowBlankSearch' => 1, 'jsonURL' => '/oeadmin/AnaestheticAgentDefaults/search', 'placeholder' => 'search for adding anaesthetic agent'));
     //$admin->searchAll();
     $admin->listModel();
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:16,代码来源:AnaestheticAgentDefaultsController.php


示例10: actionList

 public function actionList()
 {
     $admin = new AdminListAutocomplete(OphTrConsent_Leaflet_Subspecialty::model(), $this);
     $admin->setListFields(array('id', 'leaflet.name'));
     $admin->setCustomDeleteURL('/oeadmin/LeafletSubspecialty/delete');
     $admin->setCustomSaveURL('/oeadmin/LeafletSubspecialty/add');
     $admin->setModelDisplayName('Leaflet-Subspecialty Assignment');
     $admin->setFilterFields(array(array('label' => 'Subspecialty', 'dropDownName' => 'subspecialty_id', 'defaultValue' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'listModel' => Subspecialty::model(), 'listIdField' => 'id', 'listDisplayField' => 'name')));
     // we set default search options
     if ($this->request->getParam('search') == '') {
         $admin->getSearch()->initSearch(array('filterid' => array('subspecialty_id' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id)));
     }
     $admin->setAutocompleteField(array('fieldName' => 'leaflet_id', 'jsonURL' => '/oeadmin/LeafletSubspecialty/search', 'placeholder' => 'search for leaflets'));
     //$admin->searchAll();
     $admin->listModel();
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:16,代码来源:LeafletSubspecialtyController.php


示例11: criteria

 public function criteria($count = false)
 {
     $criteria = new CDbCriteria();
     if (@$_REQUEST['hos_num']) {
         $criteria->addCondition('`dil`.`patient_number` = :hos_num');
         $criteria->params[':hos_num'] = $_REQUEST['hos_num'];
     }
     if (@$_REQUEST['file_name']) {
         $criteria->addCondition('file_name = :file_name');
         $criteria->params[':file_name'] = $_REQUEST['file_name'];
     }
     if (@$_REQUEST['firm_id']) {
         $firm = Firm::model()->findByPk($_REQUEST['firm_id']);
         $firm_ids = array();
         foreach (Firm::model()->findAll('name=?', array($firm->name)) as $firm) {
             $firm_ids[] = $firm->id;
         }
         if (!empty($firm_ids)) {
             $criteria->addInCondition('firm_id', $firm_ids);
         }
     }
     if (@$_REQUEST['action']) {
         $criteria->addCondition('action_id=:action_id');
         $criteria->params[':action_id'] = $_REQUEST['action'];
     }
     if (@$_REQUEST['target_type']) {
         $criteria->addCondition('type_id=:type_id');
         $criteria->params[':type_id'] = $_REQUEST['target_type'];
     }
     if (@$_REQUEST['event_type_id']) {
         $criteria->addCondition('event_type_id=:event_type_id');
         $criteria->params[':event_type_id'] = $_REQUEST['event_type_id'];
     }
     if (@$_REQUEST['date_from']) {
         $date_from = Helper::convertNHS2MySQL($_REQUEST['date_from']) . ' 00:00:00';
         $criteria->addCondition('`t`.created_date >= :date_from');
         $criteria->params[':date_from'] = $date_from;
     }
     if (@$_REQUEST['date_to']) {
         $date_to = Helper::convertNHS2MySQL($_REQUEST['date_to']) . ' 23:59:59';
         $criteria->addCondition('`t`.created_date <= :date_to');
         $criteria->params[':date_to'] = $date_to;
     }
     //  !($count) && $criteria->join = 'left join event on t.event_id = event.id left join event_type on event.event_type_id = event_type.id';
     return $criteria;
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:46,代码来源:DicomLogViewerController.php


示例12: actionList

 public function actionList()
 {
     $admin = new AdminListAutocomplete(OphTrOperationnote_PostopSiteSubspecialtyDrug::model(), $this);
     $admin->setListFields(array('id', 'postopdrugs.name', 'default'));
     $admin->setCustomDeleteURL('/oeadmin/PostOpDrugMappings/delete');
     $admin->setCustomSaveURL('/oeadmin/PostOpDrugMappings/add');
     $admin->setCustomSetDefaultURL('/oeadmin/PostOpDrugMappings/setDefault');
     $admin->setCustomRemoveDefaultURL('/oeadmin/PostOpDrugMappings/RemoveDefault');
     $admin->setModelDisplayName('Per-operative Drugs Mapping');
     $admin->setFilterFields(array(array('label' => 'Site', 'dropDownName' => 'site_id', 'defaultValue' => Yii::app()->session['selected_site_id'], 'listModel' => Site::model(), 'listIdField' => 'id', 'listDisplayField' => 'short_name'), array('label' => 'Subspecialty', 'dropDownName' => 'subspecialty_id', 'defaultValue' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'listModel' => Subspecialty::model(), 'listIdField' => 'id', 'listDisplayField' => 'name')));
     // we set default search options
     if ($this->request->getParam('search') == '') {
         $admin->getSearch()->initSearch(array('filterid' => array('subspecialty_id' => Firm::model()->findByPk(Yii::app()->session['selected_firm_id'])->serviceSubspecialtyAssignment->subspecialty_id, 'site_id' => Yii::app()->session['selected_site_id'])));
     }
     $admin->setAutocompleteField(array('fieldName' => 'drug_id', 'jsonURL' => '/oeadmin/PostOpDrugMappings/search', 'placeholder' => 'search for adding per op drug'));
     //$admin->searchAll();
     $admin->listModel();
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:18,代码来源:PostOpDrugMappingsController.php


示例13: run

 public function run()
 {
     if ($this->element) {
         $this->class = CHTML::modelName($this->element);
     } else {
         $this->class = get_class($this);
     }
     if (empty($_POST) || !array_key_exists($this->class, $_POST)) {
         if (empty($this->element->event_id)) {
             if ($this->default) {
                 // It's a new event so fetch the most recent element_diagnosis
                 $firmId = Yii::app()->session['selected_firm_id'];
                 $firm = Firm::model()->findByPk($firmId);
                 if (isset(Yii::app()->getController()->patient)) {
                     $patientId = Yii::app()->getController()->patient->id;
                     $episode = Episode::getCurrentEpisodeByFirm($patientId, $firm, true);
                     if ($episode && ($disorder = $episode->diagnosis)) {
                         // There is a diagnosis for this episode
                         $this->value = $disorder->id;
                         $this->label = $disorder->term;
                     }
                 }
             }
         } else {
             if (isset($this->element->disorder)) {
                 $this->value = $this->element->disorder->id;
                 $this->label = $this->element->disorder->term;
             }
         }
     } elseif (array_key_exists($this->field, $_POST[$this->class])) {
         if (preg_match('/[^\\d]/', $_POST[$this->class][$this->field])) {
             if ($disorder = Disorder::model()->find('term=? and specialty_id is not null', array($_POST[$this->class][$this->field]))) {
                 $this->value = $disorder->id;
                 $this->label = $disorder->term;
             }
         } else {
             $this->value = $_POST[$this->class][$this->field];
             if ($disorder = Disorder::model()->findByPk($this->value)) {
                 $this->label = $disorder->term;
             }
         }
     }
     parent::run();
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:44,代码来源:DiagnosisSelection.php


示例14: findWorkflow

 /**
  * Finds the best matching workflow
  * @param integer $firm_id
  * @param integer $status_id
  * @return OphCiExamination_Workflow
  */
 public static function findWorkflow($firm_id, $status_id)
 {
     $subspecialty_id = null;
     if ($firm = \Firm::model()->findByPk($firm_id)) {
         $subspecialty_id = $firm->serviceSubspecialtyAssignment ? $firm->serviceSubspecialtyAssignment->subspecialty_id : null;
     }
     if ($rule = OphCiExamination_Workflow_Rule::model()->find('subspecialty_id=? and firm_id=? and episode_status_id=?', array($subspecialty_id, $firm_id, $status_id))) {
         return $rule->workflow;
     }
     if ($rule = OphCiExamination_Workflow_Rule::model()->find('subspecialty_id=? and episode_status_id=?', array($subspecialty_id, $status_id))) {
         return $rule->workflow;
     }
     if ($rule = OphCiExamination_Workflow_Rule::model()->find('subspecialty_id=?', array($subspecialty_id))) {
         return $rule->workflow;
     }
     if ($rule = OphCiExamination_Workflow_Rule::model()->find('subspecialty_id is null and episode_status_id is null')) {
         return $rule->workflow;
     }
     throw new \CException('Cannot find default workflow rule');
 }
开发者ID:across-health,项目名称:OphCiExamination,代码行数:26,代码来源:OphCiExamination_Workflow_Rule.php


示例15: actionCommonDrugs

 /**
  * @description Common drugs administration page - it lists the common drugs based on site and subspecialty
  *
  * @return html (rendered page)
  */
 public function actionCommonDrugs()
 {
     /*
      * We try to set default values for the selects
      */
     if (isset($_GET['site_id'])) {
         $activeSite = $_GET['site_id'];
     } else {
         $activeSite = Yii::app()->session['selected_site_id'];
     }
     if (isset($_GET['subspecialty_id'])) {
         $activeSubspecialty = $_GET['subspecialty_id'];
     } else {
         $firm = Firm::model()->findByPk(Yii::app()->session['selected_firm_id']);
         if (isset($firm->serviceSubspecialtyAssignment->subspecialty_id)) {
             $activeSubspecialty = $firm->serviceSubspecialtyAssignment->subspecialty_id;
         } else {
             $activeSubspecialty = null;
         }
     }
     $this->render('druglist', array('selectedsite' => $activeSite, 'selectedsubspecialty' => $activeSubspecialty, 'site_subspecialty_drugs' => Element_OphDrPrescription_Details::model()->commonDrugsBySiteAndSpec($activeSite, $activeSubspecialty)));
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:27,代码来源:AdminController.php


示例16: actionForm

 /**
  * @param int $patientId
  * @param int $medicationId
  */
 public function actionForm($patientId, $medicationId = null, $prescriptionItemId = null)
 {
     if ($medicationId == 'adherence') {
         $this->renderPartial('adherence_form', array('patient' => $this->fetchModel('Patient', $patientId)), false, true);
     } else {
         if ($medicationId) {
             $medication = $this->fetchModel('Medication', $medicationId, true);
         } elseif ($prescriptionItemId) {
             if ($api = Yii::app()->moduleAPI->get('OphDrPrescription')) {
                 $medication = $api->getMedicationForPrescriptionItem($patientId, $prescriptionItemId);
                 if (!$medication) {
                     throw new CHttpException(404, 'Could not get medication for prescription item.');
                 }
             } else {
                 throw new CHttpException(400, 'Missing prescription item or module');
             }
         } else {
             $medication = new Medication();
         }
         $this->renderPartial('form', array('patient' => $this->fetchModel('Patient', $patientId), 'medication' => $medication, 'firm' => Firm::model()->findByPk($this->selectedFirmId)), false, true);
     }
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:26,代码来源:MedicationController.php


示例17: testActionSchedule

 public function testActionSchedule()
 {
     $this->markTestIncomplete();
     $_GET['id'] = 2;
     $this->controller->initAction('schedule');
     $this->controller->expects($this->once())->method('processJsVars');
     $this->controller->actionSchedule();
     foreach (array('event', 'operation', 'firm', 'firmList', 'date', 'selectedDate', 'sessions', 'theatres', 'session', 'bookings', 'bookable', 'errors') as $key) {
         $this->assertArrayHasKey($key, $this->controller->renderParams);
     }
     $this->assertEquals($this->controller->renderParams['event']->id, 2);
     $this->assertEquals($this->controller->renderParams['operation']->id, 2);
     $this->assertEquals($this->controller->renderParams['firm']->id, 1);
     $this->assertEquals($this->controller->renderParams['firmList'], Firm::model()->listWithSpecialties);
     $this->assertEquals($this->controller->renderParams['date'], Element_OphTrOperationbooking_Operation::model()->find('event_id=?', array(2))->minDate);
     $this->assertNull($this->controller->renderParams['selectedDate']);
     $this->assertEquals($this->controller->renderParams['sessions'], array());
     $this->assertNull($this->controller->renderParams['theatres']);
     $this->assertNull($this->controller->renderParams['session']);
     $this->assertNull($this->controller->renderParams['bookings']);
     $this->assertNull($this->controller->renderParams['bookable']);
     $this->assertNull($this->controller->renderParams['errors']);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:23,代码来源:BookingControllerTest.php


示例18: array

?>

	<div class="alert-box hide" id="update_inline">
		<a href="#">Update selected sequences</a>
	</div>

	<?php 
$form = $this->beginWidget('BaseEventTypeCActiveForm', array('id' => 'inline_edit', 'enableAjaxValidation' => false, 'htmlOptions' => array('style' => 'display: none;', 'class' => 'panel')));
?>
		<div class="row field-row">
			<div class="large-2 column">
				<label for="">Firm:</label>
			</div>
			<div class="large-5 column end">
				<?php 
echo CHtml::dropDownList('inline_firm_id', '', Firm::model()->getListWithSpecialties(), array('empty' => '- Don\'t change -'));
?>
				<span class="error"></span>
			</div>
		</div>
		<div class="row field-row">
			<div class="large-2 column">
				<label for="">Theatre:</label>
			</div>
			<div class="large-5 column end">
				<?php 
echo CHtml::dropDownList('inline_theatre_id', '', CHtml::listData(OphTrOperationbooking_Operation_Theatre::model()->active()->findAll(), 'id', 'name'), array('empty' => '- Don\'t change -'));
?>
				<span class="error"></span>
			</div>
		</div>
开发者ID:openeyes,项目名称:openeyes,代码行数:31,代码来源:sequences.php


示例19: actionUsers

 /**
  * Ajax action to get user data list.
  */
 public function actionUsers()
 {
     $users = array();
     $criteria = new CDbCriteria();
     $criteria->addCondition(array('active = :active'));
     $criteria->addCondition(array("LOWER(concat_ws(' ',first_name,last_name)) LIKE :term"));
     $params[':active'] = 1;
     $params[':term'] = '%' . strtolower(strtr($_GET['term'], array('%' => '\\%'))) . '%';
     $criteria->params = $params;
     $criteria->order = 'first_name, last_name';
     $firm = Firm::model()->findByPk(Yii::app()->session['selected_firm_id']);
     $consultant = null;
     // only want a consultant for medical firms
     if ($specialty = $firm->getSpecialty()) {
         if ($specialty->medical) {
             $consultant = $firm->consultant;
         }
     }
     foreach (User::model()->findAll($criteria) as $user) {
         if ($contact = $user->contact) {
             $consultant_name = false;
             // if we have a consultant for the firm, and its not the matched user, attach the consultant name to the entry
             if ($consultant && $user->id != $consultant->id) {
                 $consultant_name = trim($consultant->contact->title . ' ' . $consultant->contact->first_name . ' ' . $consultant->contact->last_name);
             }
             $users[] = array('id' => $user->id, 'value' => trim($contact->title . ' ' . $contact->first_name . ' ' . $contact->last_name . ' ' . $contact->qualifications) . ' (' . $user->role . ')', 'fullname' => trim($contact->title . ' ' . $contact->first_name . ' ' . $contact->last_name . ' ' . $contact->qualifications), 'role' => $user->role, 'consultant' => $consultant_name);
         }
     }
     echo json_encode($users);
 }
开发者ID:openeyes,项目名称:openeyes,代码行数:33,代码来源:DefaultController.php


示例20: getListWithSecondaryTo

 /**
  * @param Firm $firm
  * @return array
  * @throws CException
  */
 public static function getListWithSecondaryTo(Firm $firm)
 {
     if (empty($firm)) {
         throw new CException('Firm is required');
     }
     $disorders = array();
     $secondary_to = array();
     if ($ss_id = $firm->getSubspecialtyID()) {
         $cods = self::model()->with(array('disorder', 'secondary_to_disorders'))->findAllByAttributes(array('subspecialty_id' => $ss_id), array('order' => 'disorder.term'));
         foreach ($cods as $cod) {
             $disorders[] = $cod->disorder;
             if ($secondary_tos = $cod->secondary_to_disorders) {
                 $secondary_to[$cod->disorder_id] = CHtml::listData($secondary_tos, 'id', 'term');
             }
         }
     }
     return array(CHtml::listData($disorders, 'id', 'term'), $secondary_to);
 }
开发者ID:openeyeswales,项目名称:OpenEyes,代码行数:23,代码来源:CommonOphthalmicDisorder.php



注:本文中的Firm类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP FirstendAction类代码示例发布时间:2022-05-23
下一篇:
PHP FirePHP类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap