The followings are the available columns in table:
Наследование: extends SplitEventTypeElement
Пример #1
0
 /**
  * Ajax action to load the questions for a side and disorder_id.
  */
 public function actionLoadInjectionQuestions()
 {
     // need a side specification for the form element names
     $side = @$_GET['side'];
     if (!in_array($side, array('left', 'right'))) {
         throw new \Exception('Invalid side argument');
     }
     // disorder id verification
     $questions = array();
     foreach (@$_GET['disorders'] as $did) {
         if ((int) $did) {
             foreach (models\Element_OphCiExamination_InjectionManagementComplex::model()->getInjectionQuestionsForDisorderId($did) as $q) {
                 $questions[] = $q;
             }
         }
     }
     // need a form object
     $form = Yii::app()->getWidgetFactory()->createWidget($this, 'BaseEventTypeCActiveForm', array('id' => 'clinical-create', 'enableAjaxValidation' => false, 'htmlOptions' => array('class' => 'sliding')));
     $element = new models\Element_OphCiExamination_InjectionManagementComplex();
     // and now render
     $this->renderPartial('form_Element_OphCiExamination_InjectionManagementComplex_questions', array('element' => $element, 'form' => $form, 'side' => $side, 'questions' => $questions), false, false);
 }
 /**
  * return the most recent Injection Management Complex examination element in the given episode.
  *
  * @param Episode $episode
  * @param DateTime $after
  * @return OphCiExamination_InjectionManagementComplex|null
  */
 public function getLatestInjectionManagementComplex($episode, $after = null)
 {
     $events = $this->getEventsInEpisode($episode->patient, $episode);
     foreach ($events as $event) {
         $criteria = new \CDbCriteria();
         $criteria->addCondition('event_id = ?');
         $criteria->params = array($event->id);
         if ($after) {
             $criteria->addCondition('created_date > ?');
             $criteria->params[] = $after->format('Y-m-d H:i:s');
         }
         if ($el = models\Element_OphCiExamination_InjectionManagementComplex::model()->find($criteria)) {
             return $el;
         }
     }
 }