
            with myvars as (
                select localtimestamp as curtime
            )
            select
                error_code as "Error_Code",
                error_message as "Error_Msg",
                EvnSection_id as "EvnSection_id"
            from dbo.p_EvnSection_upd(
                EvnSection_id := '50101305508819',
                pmUser_id := '431258600884',
                params :=  E'{"evnsection_pid":"50101305508800","evnsection_setdt":"2023-07-19 23:30:00","evnsection_disdt":null,"evnsection_diddt":null,"evnsection_issigned":null,"evnsection_signdt":null,"pmuser_signid":null,"lpu_id":"50101000000031","personevn_id":"50101056425546","server_id":"50101000000031","morbus_id":null,"evnstatus_id":null,"evnsection_statusdate":null,"evnsection_plandisdt":"2023-07-24","evnsection_isadultescort":"2","evnsection_isrecoverypotential":1,"evnsection_ismedreason":"1","paytype_id":"50101000000011","paytypeersb_id":null,"lpusection_id":"50101000129503","medpersonal_id":"50101000084545","medstafffact_id":"50101000135556","lpusectionward_id":null,"diag_id":"10881","diag_eid":null,"diagsetphase_id":"1","diagsetphase_aid":null,"privilegetype_id":null,"evnsection_phasedescr":"\\u041d\\u043e\\u0432\\u043e\\u0440\\u043e\\u0436\\u0434\\u0435\\u043d\\u043d\\u044b\\u0439. \\u041f\\u0435\\u0440\\u0438\\u043e\\u0434 \\u0440\\u0430\\u043d\\u043d\\u0435\\u0439 \\u0430\\u0434\\u0430\\u043f\\u0442\\u0430\\u0446\\u0438\\u0438.","evnsection_absence":null,"cureresult_id":null,"mes_id":null,"mes2_id":null,"mes_tid":"50101000002179","mes_sid":null,"mes_kid":null,"evnsection_coeffctp":"0.2","evnsection_insidenumcard":null,"mestariff_id":"50101000002521","mestariff_sid":"50101000002521","tariffclass_id":null,"leavetype_prmid":null,"leavetype_fedid":null,"resultdeseasetype_fedid":null,"uslugacomplex_id":null,"mesolduslugacomplex_id":"50101003850405","evnsection_totalfract":null,"lpusectionprofile_id":"20001117","lpusectionbedprofilelink_fedid":"4151","evnsection_ismeal":null,"evnsection_isterm":"1","htmedicalcareclass_id":null,"lpusectiontranstype_id":null,"leavetype_id":null,"medicalcarebudgtype_id":null,"evnsection_indexrep":0,"evnsection_indexrepinreg":null,"evnsection_iswillpaid":null,"evnsection_indexnum":null,"evnsection_ismanualidxnum":null,"deseasebegtimetype_id":null,"deseasetype_id":null,"rehabscale_id":null,"evnsection_sofascalepoints":null,"tumorstage_id":null,"evnsection_iszno":"1","evnsection_isznoremove":null,"evnsection_biopsydate":null,"diag_spid":null,"painintensity_id":null,"uslugacomplex_sid":null,"evnsection_ispriem":null,"evnsection_isrehab":"1","rankinscale_id":null,"rankinscale_sid":null,"evnsection_insultscale":null,"evnsection_nihssaftertlt":null,"evnsection_nihssleave":null,"lpusectionbedprofile_id":"4400","evnsection_isst":null,"evnsection_ispartialpay":"1","evnsection_iscardshock":null,"evnsection_startpainhour":null,"evnsection_startpainmin":null,"evnsection_gracescalepoints":null,"evnsection_barthelidx":null,"rehabscale_vid":null,"evnsection_ismultiksg":null,"acstype_id":null}'
            )
        
