
            

            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 := '50101306199243',
                Server_id := 857,
                PersonEvn_id := '50101055736688',
                EvnDirection_setDT := '2023-07-21',
                DirType_id := '2',
                MedicalCareFormType_id := NULL,
                StudyTarget_id := NULL,
                PayType_id := '50101000000005',
                Diag_id := '5200',
                EvnDirection_Num := '429301',
                EvnDirection_Descr := NULL,
                Lpu_did := '883', --куда направлен
                LpuSection_did := '50101000014177',
                LpuSectionProfile_id := '20001125',
                Lpu_id := '821', -- кто направил
                LpuSection_id := '50101000125274',
                LpuUnit_did := '50101000000308',
                MedPersonal_id := '50101000009239',
                MedStaffFact_id := '50101000086459',
                MedPersonal_zid := '50101000051730',
                MedPersonal_Code := '821621',
                MedService_id := NULL,
                EvnDirection_desDT := NULL,
                EvnDirection_IsAuto := '1',
                EvnDirection_IsCito := '1',
                EvnStatus_id := NULL,
                Post_id := '43',
                Lpu_sid := '821',
                Org_sid := NULL,
                Org_oid := NULL,
                PrehospDirect_id := '2',
                TimetableGraf_id := '50101091759163',
                TimetableStac_id := NULL,
                TimetableResource_id := NULL,
                TimetableMedService_id := NULL,
                EvnDirection_IsNeedOper := 1,
                EvnQueue_id := NULL,
                ARMType_id := '1047',
                EvnDirection_IsReceive := '1',
                Resource_id := NULL,
                MedPersonal_did := '50101000008230',
                RemoteConsultCause_id := NULL,
                MedSpec_fid := NULL,
                UslugaComplex_did := NULL,
                FSIDI_id := NULL,
                LpuUnitType_id := NULL,
                EvnDirection_TalonCode := NULL,
                RecMethodType_id := '10',
                ConsultationForm_id := NULL,
                FluoroReason_id := NULL,
                EvnDirection_IsAgreement := NULL,
                RequestConsult_id := '2',
                RecordType_id := 4,
                
                    EvnDirection_rid := '50101306199238',
                 LpuSectionBedProfile_id := NULL,  EvnDirection_IsBiopsy := NULL, 
                pmUser_id := '385380006184'
            )
        
