original_string: protected function _exportRespondent($respondentId)
      {
          $respondentModel = $this->loader->getModels()->getRespondentModel(false);
  
          //Insert orgId when set
          if (is_array($respondentId) && isset($respondentId['gr2o_id_organization'])) {
              $filter['gr2o_id_organization'] = $respondentId['gr2o_id_organization'];
              $respondentId = $respondentId['gr2o_patient_nr'];
          } else {
              // Or accept to find in current organization
              // $filter['gr2o_id_organization'] = $this->currentUser->getCurrentOrganizationId();
              // Or use any allowed organization?
              $filter['gr2o_id_organization'] = array_keys($this->currentUser->getAllowedOrganizations());
          }
          $filter['gr2o_patient_nr'] = $respondentId;
  
          $respondentModel->setFilter($filter);
          $respondentData = $respondentModel->loadFirst();
  
          $this->html->snippet($this->_respondentSnippet,
              'model', $respondentModel,
              'data', $respondentData,
              'respondentId', $respondentId);
  
          $tracker = $this->loader->getTracker();
          $tracks = $tracker->getRespondentTracks($respondentData['gr2o_id_user'], $respondentData['gr2o_id_organization']);
  
          foreach ($tracks as $trackId => $track) {
              $this->_exportTrack($track);
          }
      }
code: protected function _exportRespondent($respondentId)
      {
          $respondentModel = $this->loader->getModels()->getRespondentModel(false);
  
          //Insert orgId when set
          if (is_array($respondentId) && isset($respondentId['gr2o_id_organization'])) {
              $filter['gr2o_id_organization'] = $respondentId['gr2o_id_organization'];
              $respondentId = $respondentId['gr2o_patient_nr'];
          } else {
              // Or accept to find in current organization
              // $filter['gr2o_id_organization'] = $this->currentUser->getCurrentOrganizationId();
              // Or use any allowed organization?
              $filter['gr2o_id_organization'] = array_keys($this->currentUser->getAllowedOrganizations());
          }
          $filter['gr2o_patient_nr'] = $respondentId;
  
          $respondentModel->setFilter($filter);
          $respondentData = $respondentModel->loadFirst();
  
          $this->html->snippet($this->_respondentSnippet,
              'model', $respondentModel,
              'data', $respondentData,
              'respondentId', $respondentId);
  
          $tracker = $this->loader->getTracker();
          $tracks = $tracker->getRespondentTracks($respondentData['gr2o_id_user'], $respondentData['gr2o_id_organization']);
  
          foreach ($tracks as $trackId => $track) {
              $this->_exportTrack($track);
          }
      }
code_tokens: protected function _exportRespondent ( $ respondentId ) { $ respondentModel = $ this -> loader -> getModels ( ) -> getRespondentModel ( false ) ; //Insert orgId when set if ( is_array ( $ respondentId ) && isset ( $ respondentId [ 'gr2o_id_organization' ] ) ) { $ filter [ 'gr2o_id_organization' ] = $ respondentId [ 'gr2o_id_organization' ] ; $ respondentId = $ respondentId [ 'gr2o_patient_nr' ] ; } else { // Or accept to find in current organization // $filter['gr2o_id_organization'] = $this->currentUser->getCurrentOrganizationId(); // Or use any allowed organization? $ filter [ 'gr2o_id_organization' ] = array_keys ( $ this -> currentUser -> getAllowedOrganizations ( ) ) ; } $ filter [ 'gr2o_patient_nr' ] = $ respondentId ; $ respondentModel -> setFilter ( $ filter ) ; $ respondentData = $ respondentModel -> loadFirst ( ) ; $ this -> html -> snippet ( $ this -> _respondentSnippet , 'model' , $ respondentModel , 'data' , $ respondentData , 'respondentId' , $ respondentId ) ; $ tracker = $ this -> loader -> getTracker ( ) ; $ tracks = $ tracker -> getRespondentTracks ( $ respondentData [ 'gr2o_id_user' ] , $ respondentData [ 'gr2o_id_organization' ] ) ; foreach ( $ tracks as $ trackId => $ track ) { $ this -> _exportTrack ( $ track ) ; } }
docstring: Exports a single respondent
  
  @param string $respondentId
docstring_tokens: Exports a single respondent