Problem with parameters in url and pagination

Use remove_query_arg() function. DOCUMENTATION and EXAMPLES

remove_query_arg( 'message' ) ; 

in pagination code like this.

$current_page = max(1, get_query_var('paged'));
echo paginate_links(array(
    'base'          =>  remove_query_arg( 'message',get_pagenum_link(1) ) . '%_%',
    'format'        =>  'page/%#%/',
    'current'       =>  $current_page,
    'total'         =>  intval($total_patients / 10) + 1,
    'prev_next'     =>  true,
    'type'          =>  'list',
));