
            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 := '520101192682883'::bigint,
                RegistryESStatus_id := 12::bigint,
                RegistryES_begDate := '2022-01-26'::timestamp,
                RegistryES_endDate := (select nowDate from mv),
                RegistryES_Num := '150'::varchar,
                Lpu_id := '2786'::bigint,
                Lpu_Nick := 'ГБУЗ НО «Городская поликлиника №7 Нижегородского района»'::varchar,
                Lpu_INN := '5260072630'::varchar,
                Lpu_OGRN := '1025203039454'::varchar,
                RegistryES_UserFIO := 'Рощина Ирина Владимировна'::varchar,
                RegistryES_UserPhone := ''::varchar,
                RegistryES_UserEmail := ''::varchar,
                Lpu_FSSRegNum := NULL::varchar,
                RegistryESType_id := 1::bigint,
                RegistryES_RegRecCount := 1::integer,
                RegistryES_Version := '2'::char,
                pmUser_id := '387219875847'::bigint
            )
        
