
            with myvars as (
                select
                    dbo.tzgetdate() as curtime,
                    MedService_id
                from
                    v_EvnLabSample
                where
                    EvnLabSample_id = '500801010333790'
                limit 1
            )

            select
                evnlabsample_id as "EvnLabSample_id",
                error_code as "Error_Code",
                error_message as "Error_Msg",
                to_char ((select curtime from myvars), 'YYYY-MM-DD HH24:MI:SS') as "EvnLabSample_setDTForBD",
            	to_char((select curtime from myvars), 'HH24:MI dd.mm.yyyy') as "EvnLabSample_setDT"
            from dbo.p_EvnLabSample_upd(
                evnlabsample_id := '500801010333790',
                evnlabrequest_id := '500801010333789',
                refsample_id := NULL,
                lpu_id := '13100903',
                server_id := '13100903',
                personevn_id := '500801004692447',
                evnlabsample_num := '208315381050',
                evnlabsample_barcode := '208315381050',
                medservice_id := (select MedService_id from myvars),
                medservice_did := '14055',
                evnlabsample_setdt := (select curtime from myvars),
                evnlabsample_delivdt := null,
                lpu_did := '13100903',
                analyzer_id := '500801000001081',
                lpusection_did := '99560030962',
                medpersonal_did := NULL,
                medpersonal_sdid := '87519',
                pmuser_id := '374354072764',
                evnlabsample_comment := NULL,
                evnlabsample_studydt := NULL,
                evnlabsample_analyzerdate := NULL
            )
        
