
            with myvars as (
                select dbo.tzgetdate() as curtime
            )
            select
                error_code as "Error_Code",
                error_message as "Error_Msg",
                EvnPS_id as "EvnPS_id"
            from dbo.p_EvnPS_upd(
                EvnPS_id := '520101212627510',
                pmUser_id := '394389759639',
                params :=  E'{"evnps_setdt":"2022-04-11 08:20:00","evnps_disdt":null,"evnps_diddt":null,"evnps_issigned":null,"evnps_signdt":null,"pmuser_signid":null,"lpu_id":"2912","personevn_id":"520101054759828","server_id":"5583219","morbus_id":null,"evnstatus_id":null,"evnps_statusdate":null,"evnps_iscont":"1","evnps_numcard":"10102\\u042522","paytype_id":"520101000000009","evnps_iswithoutdirection":"1","evndirection_id":null,"evnqueue_id":null,"evndirection_setdt":"2022-04-11","evndirection_num":"102","prehospdirect_id":"1","lpusection_did":"520101000011548","org_did":null,"medstafffact_did":"520101000015559","medpersonal_did":"520101000005966","medstafffact_tfomscode":null,"orgmilitary_did":null,"lpu_did":null,"diag_did":"11549","diag_eid":null,"diagsetphase_did":"1","evnps_phasedescr_did":null,"prehosparrive_id":"1","cmpcallcard_id":null,"evnps_codeconv":null,"evnps_numconv":null,"evnps_isplambulance":"1","evnps_isimperhosp":"1","evnps_isshortvolume":"1","evnps_iswrongcure":"1","evnps_isdiagmismatch":"1","evnps_htmbegdate":null,"evnps_htmhospdate":null,"evnps_htmticketnum":null,"prehosptype_id":"2","evnps_hospcount":null,"evnps_timedesease":"2","okei_id":"104","evnps_isneglectedcase":null,"prehosptrauma_id":null,"evnps_isunlaw":null,"evnps_isunport":null,"entrancemodetype_id":null,"lpusection_pid":"520101000011729","medpersonal_pid":"520101000005966","medstafffact_pid":"520101000086873","lpusectionward_id":null,"prehosptoxic_id":null,"lpusectiontranstype_id":"3","diag_pid":"11549","diagsetphase_pid":"1","diagsetphase_aid":"1","evnps_phasedescr_pid":null,"evnps_isactive":"2","deseasetype_id":"2","tumorstage_id":null,"evnps_iszno":"1","evnps_isznoremove":null,"evnps_biopsydate":null,"diag_spid":null,"evnps_outcomedt":"2022-04-11 08:22:00","lpusection_eid":"520101000011569","prehospwaifrefusecause_id":null,"medpersonal_sid":null,"medpersonal_tid":null,"medicalcareformtype_id":"3","resultclass_id":null,"resultdeseasetype_id":null,"evnps_istransfcall":null,"prehospstatus_id":"4","evnps_iswaif":null,"prehospwaifarrive_id":null,"prehospwaifreason_id":null,"evnps_prehospwaifrefusedt":null,"evnps_isprehospacceptrefuse":null,"evnps_prehospacceptrefusedt":null,"lpu_eid":null,"evnps_doctrans":null,"evnps_indexrep":null,"evnps_indexrepinreg":null,"evnps_notificationdt":null,"medstafffact_id":null,"evnps_phone":null,"evnps_policeman":null,"evnps_rfid":null,"evnps_cmptltdt":null}'
            )
        
