Inheritance: extends BaseActiveRecordVersioned
 public function setDefaultOptions()
 {
     if (in_array(Yii::app()->getController()->getAction()->id, array('created', 'ElementForm'))) {
         if ($api = Yii::app()->moduleAPI->get('OphTrOperationnote')) {
             if (!($patient = \Patient::model()->findByPk(@$_GET['patient_id']))) {
                 throw new Exception('Patient not found: ' . @$_GET['patient_id']);
             }
             if ($api->getOpnoteWithCataractElementInCurrentEpisode($patient)) {
                 $this->eye_id = OphCiExamination_CataractSurgicalManagement_Eye::model()->find('name=?', array('Second eye'))->id;
             } else {
                 $this->eye_id = OphCiExamination_CataractSurgicalManagement_Eye::model()->find('name=?', array('First eye'))->id;
             }
         }
     }
 }
 * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see <http://www.gnu.org/licenses/>.
 *
 * @link http://www.openeyes.org.uk
 *
 * @author OpenEyes <*****@*****.**>
 * @copyright Copyright (c) 2008-2011, Moorfields Eye Hospital NHS Foundation Trust
 * @copyright Copyright (c) 2011-2013, OpenEyes Foundation
 * @license http://www.gnu.org/licenses/gpl-3.0.html The GNU General Public License V3.0
 */
?>
<div class="sub-element-fields">
	<div class="field-row">
		<?php 
echo $form->radioButtons($element, 'eye_id', CHtml::listData(\OEModule\OphCiExamination\models\OphCiExamination_CataractSurgicalManagement_Eye::model()->findAll(), 'id', 'name'), null, false, false, false, false, array('nowrapper' => true));
?>
		<span class="pcr-exam-link">
                <span id="ophCiExaminationPCRRiskRightEyeLabel">
                    <a href="javascript:showhidePCR('ophCiExaminationPCRRiskRightEye')">Right Eye - PCR Risk <span class="pcr-span1"></span>%</a>
                </span>&nbsp;|&nbsp;
                <span id="ophCiExaminationPCRRiskLeftEyeLabel">
                    <a href="javascript:showhidePCR('ophCiExaminationPCRRiskLeftEye')">Left Eye - PCR Risk <span class="pcr-span1"></span>%</a>
                </span>
		</span>
	</div>
    
	<div class="field-row">
        <?php 
if ($active_check === 'on') {
    echo $form->checkbox($element, 'city_road', array('nowrapper' => true));