select *
from rpt.circulatorysystemdiseases_lpu_pg(
cast($1 as int8), 
cast(to_timestamp($2,'dd.mm.yyyy') as timestamp), 
cast(to_timestamp($3,'dd.mm.yyyy') as timestamp))
order by lpu_nick
