/**
  * Get the respondent object
  *
  * @return \Gems_Tracker_Respondent
  */
 protected function getRespondent()
 {
     if (!$this->_respondent) {
         $patientNumber = $this->_getParam(\MUtil_Model::REQUEST_ID1);
         $organizationId = $this->_getParam(\MUtil_Model::REQUEST_ID2);
         $this->_respondent = $this->loader->getRespondent($patientNumber, $organizationId);
         if (!$this->_respondent->exists && $patientNumber && $organizationId) {
             throw new \Gems_Exception($this->_('Unknown respondent.'));
         }
         $this->_respondent->applyToMenuSource($this->menu->getParameterSource());
     }
     return $this->_respondent;
 }
 /**
  * Get the respondent object
  *
  * @return \Gems_Tracker_Respondent
  */
 protected function getRespondent()
 {
     if (!$this->_respondent) {
         $id = $this->_getParam(\Gems_Model::APPOINTMENT_ID);
         if ($id && !($this->_getParam(\MUtil_Model::REQUEST_ID1) || $this->_getParam(\MUtil_Model::REQUEST_ID2))) {
             $appointment = $this->loader->getAgenda()->getAppointment($id);
             $this->_respondent = $appointment->getRespondent();
             if (!$this->_respondent->exists) {
                 throw new \Gems_Exception($this->_('Unknown respondent.'));
             }
             $this->_respondent->applyToMenuSource($this->menu->getParameterSource());
         } else {
             $this->_respondent = parent::getRespondent();
         }
     }
     return $this->_respondent;
 }
 /**
  * Get the respondent object
  *
  * @return \Gems_Tracker_Respondent
  */
 protected function getRespondent()
 {
     if (!$this->_respondent instanceof \Gems_Tracker_Respondent) {
         if ($this->_getParam(\MUtil_Model::REQUEST_ID1) && $this->_getParam(\MUtil_Model::REQUEST_ID2)) {
             $this->_respondent = parent::getRespondent();
         } else {
             $id = $this->_getParam(\MUtil_Model::REQUEST_ID);
             if ($id) {
                 $model = $this->getModel();
                 $row = $model->loadFirst(array('grco_id_action' => $id));
                 if ($row) {
                     $this->_respondent = $this->loader->getRespondent($row['gr2o_patient_nr'], $row['gr2o_id_organization']);
                     if (!$this->_respondent->exists && $patientNumber && $organizationId) {
                         throw new \Gems_Exception($this->_('Unknown respondent.'));
                     }
                     $this->_respondent->applyToMenuSource($this->menu->getParameterSource());
                 }
             }
         }
     }
     return $this->_respondent;
 }