The followings are the available columns in table:
Inheritance: extends BaseActiveRecordVersionedSoftDelete
示例#1
0
 /**
  * setup the various js scripts for this controller.
  *
  * @param CAction $action
  *
  * @return bool
  */
 protected function beforeAction($action)
 {
     Yii::app()->clientScript->registerScriptFile($this->assetPath . '/js/booking.js');
     Yii::app()->assetManager->registerScriptFile('js/jquery.validate.min.js');
     Yii::app()->assetManager->registerScriptFile('js/additional-validators.js');
     $this->jsVars['nhs_date_format'] = Helper::NHS_DATE_FORMAT_JS;
     $return = parent::beforeAction($action);
     $this->jsVars['priority_canschedule'] = array();
     foreach (OphTrOperationbooking_Operation_Priority::model()->findAll() as $priority) {
         $this->jsVars['priority_canschedule'][$priority->id] = $this->checkScheduleAccess($priority);
     }
     return $return;
 }
$form->radioButtons($element, 'anaesthetic_choice_id', 'OphTrOperationbooking_Anaesthetic_Choice');
?>
	<?php 
$form->radioBoolean($element, 'stop_medication');
?>
	<?php 
$form->textArea($element, 'stop_medication_details', array('rows' => 4), true, array(), array_merge($form->layoutColumns, array('field' => 4)));
?>
	<?php 
echo $form->radioBoolean($element, 'overnight_stay');
?>
	<?php 
echo $form->dropDownList($element, 'site_id', Site::model()->getListForCurrentInstitution(), array(), false, array('field' => 2));
?>
	<?php 
echo $form->radioButtons($element, 'priority_id', CHtml::listData(OphTrOperationbooking_Operation_Priority::model()->notDeletedOrPk($element->priority_id)->findAll(array('order' => 'display_order asc')), 'id', 'name'));
?>
	<?php 
if (Yii::app()->params['ophtroperationbooking_referral_link']) {
    ?>
		<div class="row field-row">
	<?php 
    if ($element->canChangeReferral()) {
        ?>

				<div class="large-2 column">
					<label for="Element_OphTrOperationbooking_Operation_referral_id"><?php 
        echo $element->getAttributeLabel('referral_id');
        ?>
</label>
				</div>
 /**
  * Set default values for forms on create.
  */
 public function setDefaultOptions()
 {
     $patient_id = (int) $_REQUEST['patient_id'];
     $firm = Yii::app()->getController()->firm;
     $episode = Episode::getCurrentEpisodeByFirm($patient_id, $firm);
     if ($episode && $episode->diagnosis) {
         $this->eye_id = $episode->eye_id;
     }
     $this->site_id = Yii::app()->session['selected_site_id'];
     $this->senior_fellow_to_do = false;
     if ($patient = Patient::model()->findByPk($patient_id)) {
         $key = $patient->isChild() ? 'ophtroperationbooking_default_anaesthetic_child' : 'ophtroperationbooking_default_anaesthetic';
         if (isset(Yii::app()->params[$key])) {
             if ($at = AnaestheticType::model()->find('code=?', array(Yii::app()->params[$key]))) {
                 $this->anaesthetic_type_id = $at->id;
             }
         }
     }
     $this->fast_track = false;
     $this->special_equipment = false;
     $this->organising_admission_user_id = Yii::app()->user->id;
     if ($priority = OphTrOperationbooking_Operation_Priority::model()->notDeleted()->find('`default`=1')) {
         $this->priority_id = $priority->id;
     }
 }