public static function getTypeOfAcceptor()
 {
     $types = ZHtml::enumItem(FamilyPlanningService::model(), 'type_of_acceptor');
     $types[''] = '';
     asort($types);
     return $types;
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return FamilyPlanningService the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = FamilyPlanningService::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
echo $form->textField($model, 'average_monthly_income', array('class' => 'form-control'));
?>
                        <?php 
echo $form->error($model, 'average_monthly_income', array('class' => 'text-danger'));
?>
                    </div>
                </div>

                <div class="form-group">
                    <?php 
echo $form->labelEx($model, 'method_accepted', array('class' => 'control-label col-sm-4'));
?>
                    <div class="col-sm-8">
                        <div class="checkbox">
                            <?php 
echo $form->checkBoxList($model, 'method_accepted', FamilyPlanningService::getAcceptedMethods());
?>
                        </div>
                        <?php 
echo $form->error($model, 'method_accepted', array('class' => 'text-danger'));
?>
                    </div>
                </div>

                <div class="form-group">
                    <?php 
echo $form->labelEx($model, 'other_method_accepted', array('class' => 'control-label col-sm-4'));
?>
                    <div class="col-sm-8">
                        <?php 
echo $form->textField($model, 'other_method_accepted', array('class' => 'form-control'));
echo $form->label($model, 'patient_family_name', array('class' => 'control-label col-sm-4'));
?>
    <div class="col-sm-8">
        <?php 
echo $form->textField($model, 'patient_family_name', array('class' => 'form-control'));
?>
    </div>
</div>

<div class="form-group">
    <?php 
echo $form->label($model, 'type_of_acceptor', array('class' => 'control-label col-sm-4'));
?>
    <div class="col-sm-8">
        <?php 
echo $form->dropDownList($model, 'type_of_acceptor', FamilyPlanningService::getTypeOfAcceptor(), array('class' => 'form-control'));
?>
    </div>
</div>

<div class="form-group">
    <?php 
echo $form->label($model, 'spouse_name', array('class' => 'control-label col-sm-4'));
?>
    <div class="col-sm-8">
        <?php 
echo $form->textField($model, 'spouse_name', array('class' => 'form-control'));
?>
    </div>
</div>
<script language="javascript">
    document.getElementById('menu_health').className = 'active';
    document.getElementById('menu_health_patients').className = 'active';
</script>
<?php 
/* @var $this PatientController */
/* @var $model Patient */
$this->breadcrumbs = array('Health', 'Patients' => array('index'), 'View Patient');
if (!ChildHealth::model()->findByAttributes(array('patient_id' => $model->id))) {
    echo CHtml::button("Create Child Health Record", array('submit' => array('childhealth/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary'));
    echo "<br/>";
    echo "<br/>";
}
if (!FamilyPlanningService::model()->findByAttributes(array('patient_id' => $model->id))) {
    echo CHtml::button("Create Family Planning Service Record", array('submit' => array('familyplanningservice/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary'));
    echo "<br/>";
    echo "<br/>";
}
echo CHtml::button("Create Maternal Health Record", array('submit' => array('maternalhealth/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary'));
echo "<br/>";
echo "<br/>";
echo CHtml::button("Create NTP Laboratory Request", array('submit' => array('ntplaboratoryrequest/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary'));
echo "<br/>";
echo "<br/>";
echo CHtml::button("Create NTP Treatment Card", array('submit' => array('ntptreatmentcard/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary'));
echo "<br/>";
echo "<br/>";
?>

<div class="panel panel-primary">
    <div class="panel-heading">