original_string: public function getSqlAppointmentsWhere()
      {
          $where = $this->getSqlEpisodeWhere();
  
          if (($where == parent::NO_MATCH_SQL) || ($where == parent::MATCH_ALL_SQL)) {
              return $where;
          }
  
          return sprintf(
                  "gap_id_episode IN (SELECT gec_episode_of_care_id FROM gems__episodes_of_care WHERE %s)",
                  $where
                  );
      }
code: public function getSqlAppointmentsWhere()
      {
          $where = $this->getSqlEpisodeWhere();
  
          if (($where == parent::NO_MATCH_SQL) || ($where == parent::MATCH_ALL_SQL)) {
              return $where;
          }
  
          return sprintf(
                  "gap_id_episode IN (SELECT gec_episode_of_care_id FROM gems__episodes_of_care WHERE %s)",
                  $where
                  );
      }
code_tokens: public function getSqlAppointmentsWhere ( ) { $ where = $ this -> getSqlEpisodeWhere ( ) ; if ( ( $ where == parent :: NO_MATCH_SQL ) || ( $ where == parent :: MATCH_ALL_SQL ) ) { return $ where ; } return sprintf ( "gap_id_episode IN (SELECT gec_episode_of_care_id FROM gems__episodes_of_care WHERE %s)" , $ where ) ; }
docstring: Generate a where statement to filter an appointment model
  
  @return string
docstring_tokens: Generate a where statement to filter an appointment model