original_string: public function getActiveAppointments($respondentId, $organizationId, $patientNr = null, $where = null)
      {
          if ($where) {
              $where = "($where) AND ";
          } else {
              $where = "";
          }
          $where .= sprintf('gap_status IN (%s)', $this->getStatusKeysActiveDbQuoted());
  
          return $this->getAppointments($respondentId, $organizationId, $patientNr, $where);
      }
code: public function getActiveAppointments($respondentId, $organizationId, $patientNr = null, $where = null)
      {
          if ($where) {
              $where = "($where) AND ";
          } else {
              $where = "";
          }
          $where .= sprintf('gap_status IN (%s)', $this->getStatusKeysActiveDbQuoted());
  
          return $this->getAppointments($respondentId, $organizationId, $patientNr, $where);
      }
code_tokens: public function getActiveAppointments ( $ respondentId , $ organizationId , $ patientNr = null , $ where = null ) { if ( $ where ) { $ where = "($where) AND " ; } else { $ where = "" ; } $ where .= sprintf ( 'gap_status IN (%s)' , $ this -> getStatusKeysActiveDbQuoted ( ) ) ; return $ this -> getAppointments ( $ respondentId , $ organizationId , $ patientNr , $ where ) ; }
docstring: Get all active respondents for this user
  
  @param int $respondentId When null $patientNr is required
  @param int $organizationId
  @param string $patientNr Optional for when $respondentId is null
  @param string $where Optional extra where statement
  @return array appointmentId => appointment description
docstring_tokens: Get all active respondents for this user