
            

            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 := NULL,
                Server_id := 1645701,
                PersonEvn_id := '400101040146279',
                EvnDirection_setDT := '2023-07-30',
                DirType_id := '16',
                MedicalCareFormType_id := NULL,
                StudyTarget_id := NULL,
                PayType_id := NULL,
                Diag_id := NULL,
                EvnDirection_Num := '8975226',
                EvnDirection_Descr := NULL,
                Lpu_did := '34494', --куда направлен
                LpuSection_did := '400101000003635',
                LpuSectionProfile_id := '20001806',
                Lpu_id := '34494', -- кто направил
                LpuSection_id := NULL,
                LpuUnit_did := '400101000000243',
                MedPersonal_id := '400101000014053',
                MedStaffFact_id := NULL,
                MedPersonal_zid := NULL,
                MedPersonal_Code := NULL,
                MedService_id := NULL,
                EvnDirection_desDT := NULL,
                EvnDirection_IsAuto := '2',
                EvnDirection_IsCito := '1',
                EvnStatus_id := NULL,
                Post_id := NULL,
                Lpu_sid := '34494',
                Org_sid := '34494',
                Org_oid := NULL,
                PrehospDirect_id := NULL,
                TimetableGraf_id := '400101018520036',
                TimetableStac_id := NULL,
                TimetableResource_id := NULL,
                TimetableMedService_id := NULL,
                EvnDirection_IsNeedOper := 1,
                EvnQueue_id := NULL,
                ARMType_id := '647',
                EvnDirection_IsReceive := '1',
                Resource_id := NULL,
                MedPersonal_did := '400101000019692',
                RemoteConsultCause_id := NULL,
                MedSpec_fid := NULL,
                UslugaComplex_did := NULL,
                FSIDI_id := NULL,
                LpuUnitType_id := NULL,
                EvnDirection_TalonCode := NULL,
                RecMethodType_id := '16',
                ConsultationForm_id := NULL,
                FluoroReason_id := NULL,
                EvnDirection_IsAgreement := NULL,
                RequestConsult_id := NULL,
                RecordType_id := 1,
                
                    EvnDirection_rid := NULL,
                 LpuSectionBedProfile_id := NULL,  EvnDirection_IsBiopsy := NULL, 
                pmUser_id := '384186101238'
            )
        
