
            

            SELECT
                EvnDirection_id as "EvnDirection_id",
                NULL as "EvnDirection_TalonCode",
                error_code as "Error_Code",
                error_message as "Error_Msg"
            FROM dbo.p_EvnDirection_ins(
                EvnDirection_PreparationInfo := NULL,
                ConsultingForm_id := NULL,
                EvnDirection_id := NULL,
                EvnDirection_pid := '50101306197596',
                Server_id := 3623218,
                PersonEvn_id := '50101049217436',
                EvnDirection_setDT := '2023-07-21',
                DirType_id := '10',
                MedicalCareFormType_id := NULL,
                StudyTarget_id := '1',
                PayType_id := '50101000000005',
                Diag_id := '10887',
                EvnDirection_Num := '962557',
                EvnDirection_Descr := NULL,
                Lpu_did := '3623218', --куда направлен
                LpuSection_did := '50101000129144',
                LpuSectionProfile_id := '20001161',
                Lpu_id := '3623218', -- кто направил
                LpuSection_id := '50101000119049',
                LpuUnit_did := '50101000006460',
                MedPersonal_id := '50101000014412',
                MedStaffFact_id := '50101000059209',
                MedPersonal_zid := NULL,
                MedPersonal_Code := NULL,
                MedService_id := '50101000003847',
                EvnDirection_desDT := NULL,
                EvnDirection_IsAuto := NULL,
                EvnDirection_IsCito := '1',
                EvnStatus_id := NULL,
                Post_id := '92',
                Lpu_sid := '3623218',
                Org_sid := NULL,
                Org_oid := NULL,
                PrehospDirect_id := '1',
                TimetableGraf_id := NULL,
                TimetableStac_id := NULL,
                TimetableResource_id := '50101005134492',
                TimetableMedService_id := NULL,
                EvnDirection_IsNeedOper := 1,
                EvnQueue_id := NULL,
                ARMType_id := '1047',
                EvnDirection_IsReceive := NULL,
                Resource_id := '50101000001243',
                MedPersonal_did := NULL,
                RemoteConsultCause_id := NULL,
                MedSpec_fid := NULL,
                UslugaComplex_did := '200538',
                FSIDI_id := '7005416',
                LpuUnitType_id := NULL,
                EvnDirection_TalonCode := NULL,
                RecMethodType_id := '10',
                ConsultationForm_id := NULL,
                FluoroReason_id := NULL,
                EvnDirection_IsAgreement := NULL,
                RequestConsult_id := NULL,
                RecordType_id := 3,
                
                    EvnDirection_rid := '50101306197592',
                 LpuSectionBedProfile_id := NULL,  EvnDirection_IsBiopsy := NULL, 
                pmUser_id := '381427038482'
            )
        
