#if ($filterOpenDateFrom && !$filterOpenDateFrom.isEmpty())
and sh.open_date >= :filterOpenDateFrom
#end
#if ($filterOpenDateTo && !$filterOpenDateTo.isEmpty())
and sh.open_date <= :filterOpenDateTo
#end
#if ($filterCloseDateFrom && !$filterCloseDateFrom.isEmpty())
and sh.close_date >= :filterCloseDateFrom
#end
#if ($filterCloseDateTo && !$filterCloseDateTo.isEmpty())
and sh.close_date <= :filterCloseDateTo
#end
#if ($filterDeathDate && !$filterDeathDate.isEmpty())
and di.death_date = :filterDeathDate
#end
#if ($filterAccountType && !$filterAccountType.isEmpty())
and s_params.sharer_type = :filterAccountType
#end
#if ($filterAccountState && !$filterAccountState.isEmpty())
and ourpension.current_sharer_status(sh.id) = :filterAccountState
#end
#if ($filterBalance && !$filterBalance.isEmpty())
and coalesce(b1s.curr_state, 0) = :filterBalance
#end