
            with mv as (select EvnPrescr_id from v_EvnPrescrDirection where EvnDirection_id = '450101255400221' limit 1)

            select
                EvnUslugaPar_id as "EvnUslugaPar_id",
                Error_Code as "Error_Code",
                Error_Message as "Error_Msg"
            from dbo.p_EvnUslugaPar_ins(
                EvnUslugaPar_id := NULL,
                EvnUslugaPar_pid := null,
                Lpu_id := '1143538',
                Server_id := 0,
                PersonEvn_id := '450101015158992',
                UslugaPlace_id := 1,
                EvnUslugaPar_Kolvo := 1,
                PayType_id := '450101000000005',
                Diag_id := NULL,
                UslugaComplex_id := 200885,
                pmUser_id := '375275067653',
                EvnDirection_id := '450101255400221',
                EvnRequest_id := '450101255400223',
                EvnPrescrTimetable_id := null,
                EvnPrescr_id := (select evnprescr_id from mv),
                PrehospDirect_id := NULL,
                FSIDI_id := NULL
            )
        
