The followings are the available columns in table 'family_history_condition':
Наследование: extends BaseActiveRecordVersioned
Пример #1
0
							</div>
						</div>

						<div class="field-row row">
							<div class="<?php 
    echo $form->columns('label');
    ?>
">
								<label for="condition_id">Condition:</label>
							</div>
							<div class="<?php 
    echo $form->columns('field');
    ?>
">
								<?php 
    echo CHtml::dropDownList('condition_id', '', CHtml::listData(FamilyHistoryCondition::model()->findAll(array('order' => 'display_order')), 'id', 'name'), array('empty' => '- Select -'));
    ?>
							</div>
						</div>

						<div class="field-row row">
							<div class="<?php 
    echo $form->columns('label');
    ?>
">
								<label for="comments">Comments:</label>
							</div>
							<div class="<?php 
    echo $form->columns('field');
    ?>
">
Пример #2
0
 public function actionAddFamilyHistory()
 {
     if (!($patient = Patient::model()->findByPk(@$_POST['patient_id']))) {
         throw new Exception("Patient not found:" . @$_POST['patient_id']);
     }
     if (!($relative = FamilyHistoryRelative::model()->findByPk(@$_POST['relative_id']))) {
         throw new Exception("Unknown relative: " . @$_POST['relative_id']);
     }
     if (!($side = FamilyHistorySide::model()->findByPk(@$_POST['side_id']))) {
         throw new Exception("Unknown side: " . @$_POST['side_id']);
     }
     if (!($condition = FamilyHistoryCondition::model()->findByPk(@$_POST['condition_id']))) {
         throw new Exception("Unknown condition: " . @$_POST['condition_id']);
     }
     if (@$_POST['edit_family_history_id']) {
         if (!($fh = FamilyHistory::model()->findByPk(@$_POST['edit_family_history_id']))) {
             throw new Exception("Family history not found: " . @$_POST['edit_family_history_id']);
         }
         $fh->relative_id = $relative->id;
         $fh->side_id = $side->id;
         $fh->condition_id = $condition->id;
         $fh->comments = @$_POST['comments'];
         if (!$fh->save()) {
             throw new Exception("Unable to save family history: " . print_r($fh->getErrors(), true));
         }
     } else {
         $patient->addFamilyHistory($relative->id, $side->id, $condition->id, @$_POST['comments']);
     }
     $this->redirect(array('patient/view/' . $patient->id));
 }
Пример #3
0
							</div>
						</div>

						<div class="field-row row">
							<div class="<?php 
    echo $form->columns('label');
    ?>
">
								<label for="condition_id">Condition:</label>
							</div>
							<div class="<?php 
    echo $form->columns('field');
    ?>
">
								<?php 
    $conditions = FamilyHistoryCondition::model()->findAll(array('order' => 'display_order'));
    $conditions_opts = array('options' => array(), 'empty' => '- select -');
    foreach ($conditions as $con) {
        $conditions_opts['options'][$con->id] = array('data-other' => $con->is_other ? '1' : '0');
    }
    echo CHtml::dropDownList('condition_id', '', CHtml::listData($conditions, 'id', 'name'), $conditions_opts);
    ?>
							</div>
						</div>

						<div class="field-row row hidden" id="family-history-o-con-wrapper">
							<div class="<?php 
    echo $form->columns('label');
    ?>
">
								<label for="comments">Other Condition:</label>