original_string: public function getRespondent($patientId, $organizationId, $respondentId = null)
      {
          if ($patientId) {
              if (isset($this->_respondents[$organizationId][$patientId])) {
                  return $this->_respondents[$organizationId][$patientId];
              }
          }
          $newResp = $this->_loadClass('Tracker_Respondent', true, array($patientId, $organizationId, $respondentId));
          $patientId = $newResp->getPatientNumber();
  
          if (! isset($this->_respondents[$organizationId][$patientId])) {
              $this->_respondents[$organizationId][$patientId] = $newResp;
          }
  
          return $this->_respondents[$organizationId][$patientId];
      }
code: public function getRespondent($patientId, $organizationId, $respondentId = null)
      {
          if ($patientId) {
              if (isset($this->_respondents[$organizationId][$patientId])) {
                  return $this->_respondents[$organizationId][$patientId];
              }
          }
          $newResp = $this->_loadClass('Tracker_Respondent', true, array($patientId, $organizationId, $respondentId));
          $patientId = $newResp->getPatientNumber();
  
          if (! isset($this->_respondents[$organizationId][$patientId])) {
              $this->_respondents[$organizationId][$patientId] = $newResp;
          }
  
          return $this->_respondents[$organizationId][$patientId];
      }
code_tokens: public function getRespondent ( $ patientId , $ organizationId , $ respondentId = null ) { if ( $ patientId ) { if ( isset ( $ this -> _respondents [ $ organizationId ] [ $ patientId ] ) ) { return $ this -> _respondents [ $ organizationId ] [ $ patientId ] ; } } $ newResp = $ this -> _loadClass ( 'Tracker_Respondent' , true , array ( $ patientId , $ organizationId , $ respondentId ) ) ; $ patientId = $ newResp -> getPatientNumber ( ) ; if ( ! isset ( $ this -> _respondents [ $ organizationId ] [ $ patientId ] ) ) { $ this -> _respondents [ $ organizationId ] [ $ patientId ] = $ newResp ; } return $ this -> _respondents [ $ organizationId ] [ $ patientId ] ; }
docstring: Get a respondent object
  
  @param string $patientId   Patient number, you can use $respondentId instead
  @param int $organizationId Organization id
  @param int $respondentId   Optional respondent id, used when patient id is empty
  @return \Gems_Tracker_Respondent
docstring_tokens: Get a respondent object