
            with mv as (select dbo.tzGetDate()::date as nowDate)

            select RegistryES_id as "RegistryES_id", Error_Code as "Error_Code", Error_Message as "Error_Msg"
            from rpt.p_RegistryES_ins (
                RegistryES_id := null::bigint,
                EvnStickBase_id := '140101024422237'::bigint,
                RegistryESStatus_id := 12::bigint,
                RegistryES_begDate := '2022-02-08'::timestamp,
                RegistryES_endDate := (select nowDate from mv),
                RegistryES_Num := '1056'::varchar,
                Lpu_id := '140101000000006'::bigint,
                Lpu_Nick := 'ГАУ РС (Я) «Поликлиника № 1»'::varchar,
                Lpu_INN := '1435037216'::varchar,
                Lpu_OGRN := '1021401057116'::varchar,
                RegistryES_UserFIO := 'Андреева Кристина Александровна'::varchar,
                RegistryES_UserPhone := ''::varchar,
                RegistryES_UserEmail := ''::varchar,
                Lpu_FSSRegNum := '1435000811'::varchar,
                RegistryESType_id := 1::bigint,
                RegistryES_RegRecCount := 1::integer,
                RegistryES_Version := '2'::char,
                pmUser_id := '402141174014'::bigint
            )
        
