select * from rpt.evnpl_person_medikament_list_all_pg( 
cast($1 as bigint), 
cast($2 as bigint), 
cast($3 as bigint), 
cast($4 as bigint), 
cast($5 as bigint), 
CAST(TO_TIMESTAMP( $6 ,'DD.MM.YYYY') AS TIMESTAMP), 
CAST(TO_TIMESTAMP( $7 ,'DD.MM.YYYY') AS TIMESTAMP) 
) 

