
            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 := '110101365806834',
                pmUser_id := '407768352021',
                params := '{"evnsection_pid":"110101365806830","evnsection_setdt":"2023-07-24 09:43:00","evnsection_disdt":"2023-07-27 07:12:00","evnsection_diddt":null,"evnsection_issigned":null,"evnsection_signdt":null,"pmuser_signid":null,"lpu_id":"504","personevn_id":"110101021260594","server_id":"5009","morbus_id":null,"evnstatus_id":null,"evnsection_statusdate":null,"evnsection_plandisdt":null,"evnsection_isadultescort":"1","evnsection_isrecoverypotential":null,"evnsection_ismedreason":"1","paytype_id":"110101000000108","paytypeersb_id":null,"lpusection_id":"110101000005212","medpersonal_id":"110101000000602","medstafffact_id":"110101000268225","lpusectionward_id":"110101000000284","diag_id":"7458","diag_eid":null,"diagsetphase_id":"1","diagsetphase_aid":"1","privilegetype_id":null,"evnsection_phasedescr":null,"evnsection_absence":null,"cureresult_id":"110101000000011","mes_id":null,"mes2_id":null,"mes_tid":null,"mes_sid":null,"mes_kid":"110101000003452","evnsection_coeffctp":null,"evnsection_insidenumcard":null,"mestariff_id":"110101000003461","mestariff_sid":"110101000003465","tariffclass_id":null,"leavetype_prmid":null,"leavetype_fedid":null,"resultdeseasetype_fedid":null,"uslugacomplex_id":null,"mesolduslugacomplex_id":null,"evnsection_totalfract":null,"lpusectionprofile_id":"403373","lpusectionbedprofilelink_fedid":"110101000001387","evnsection_ismeal":null,"evnsection_isterm":null,"htmedicalcareclass_id":null,"lpusectiontranstype_id":null,"leavetype_id":"110101000000501","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":null,"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":"110101000001170","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}'
            )
        
