The followings are the available columns in table 'ethnic_group':
Inheritance: extends BaseActiveRecordVersioned
echo $form->textField($element, 'postcode', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->textField($element, 'email', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->textField($element, 'telephone', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->datePicker($element, 'date_of_birth', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->dropDownList($element, 'gender_id', CHtml::listData(Gender::model()->findAll(), 'id', 'name'), array('empty' => '- Please Select -'), false, array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->dropDownList($element, 'ethnic_group_id', CHtml::listData(EthnicGroup::model()->findAll(), 'id', 'name'), array('empty' => '- Please Select -'), false, array('label' => 4, 'field' => 8));
?>
    </div>
    <div class="large-6 column">
        <?php 
echo $form->textField($element, 'nhs_number', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->textField($element, 'gp_name', array(), array(), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->textArea($element, 'gp_address', array(), false, array('rows' => 4), array('label' => 4, 'field' => 8));
?>
        <?php 
echo $form->textField($element, 'gp_telephone', array(), array(), array('label' => 4, 'field' => 8));
?>
Exemplo n.º 2
0
 private function mapEthnicGroup(\Patient $patient)
 {
     if ($code = $this->getAssignedProperty('EthnicGroup')) {
         if ($eg = \EthnicGroup::model()->findByAttributes(array('code' => $code))) {
             $patient->ethnic_group_id = $eg->id;
         } else {
             $this->addWarning("Unrecognised ethnic group code " . $code);
         }
     } else {
         if (!$this->partial_record) {
             $patient->ethnic_group_id = null;
         }
     }
 }