Example #1
0
 public ADVERSE_EVENT CreateAdverseEvent(CRF crf)
 {
     ADVERSE_EVENT obj = null;
     try
     {
         obj = underlyingContext.CreateObject<ADVERSE_EVENT>();
         obj.Id = GuidComb.Generate();
         obj.CreatedBy = Authentification.GetCurrentUser().NAME;
         obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
         obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
         obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
         obj.CRF = crf;
         //obj.NAME = "---";
         obj.DATE_START = null;
         obj.DATE_END = null;
         //obj.HEAVY = "---";
         //obj.RESULT = "---";
         //obj.RELATION = "---";
         //obj.ACTIONS = "---";
         underlyingContext.AEs.AddObject(obj);
         //  Save();
     }
     catch (Exception ex)
     {
         MessageBox.Show(@"Не удалось создать Нежелательное явление" + ex.Message);
     }
     return obj;
 }
Example #2
0
        public CrfViewModel(CRF obj)
        {
            if (obj != null)
            {
                Model = obj;

                AllAE = new ObservableCollection<AEViewModel>();
                foreach (var adverseEvent in Model.ADVERSE_EVENT)
                {
                    AllAE.Add(new AEViewModel(adverseEvent));
                }
                AllAE.CollectionChanged += (sender, e) =>
                {
                    CurrentAE = AllAE.FirstOrDefault();
                };

                AllABTherapy = new ObservableCollection<ABTherapyViewModel>();
                foreach (var abTherapy in Model.AB_THERAPY)
                {
                    AllABTherapy.Add(new ABTherapyViewModel(abTherapy));
                }
                AllABTherapy.CollectionChanged += (sender, e) =>
                {
                    CurrentABTherapy = AllABTherapy.FirstOrDefault();
                };
                AllMicrobiologyBlood = new ObservableCollection<MicrobiologyBloodViewModel>();
                foreach (var microbiologyBlood in Model.MICROBIOLOGY_BLOOD)
                {
                    AllMicrobiologyBlood.Add(new MicrobiologyBloodViewModel(microbiologyBlood));
                }
                AllMicrobiologyBlood.CollectionChanged += (sender, e) =>
                {
                    CurrentMBBlood = AllMicrobiologyBlood.FirstOrDefault();
                };
                AllMicrobiologySputum = new ObservableCollection<MicrobiologySputumViewModel>();
                foreach (var microbiologySputum in Model.MICROBIOLOGY_SPUTUM)
                {
                    AllMicrobiologySputum.Add(new MicrobiologySputumViewModel(microbiologySputum));
                }
                AllMicrobiologySputum.CollectionChanged += (sender, e) =>
                {
                    CurrentMBSputum = AllMicrobiologySputum.FirstOrDefault();
                };
                SelectLpuCommand = new DelegateCommand(o => SelectLpu());
                SaveCommand = new DelegateCommand(o => Save());
                CheckCommand = new DelegateCommand(o => Check());
                CancelCommand = new DelegateCommand(o => Cancel());
                AddABTherapyCommand = new DelegateCommand(o => AddAbTherapy());
                DeleteABTherapyCommand = new DelegateCommand(o => DeleteABTherapy(), o => CurrentABTherapy != null);


                AddMBSputumCommand = new DelegateCommand(o => AddMBSputum());
                DeleteMBSputumCommand = new DelegateCommand(o => DeleteMBSputum(), o => CurrentMBSputum != null);

                AddMBBloodCommand = new DelegateCommand(o => AddMBBlood());
                DeleteMBBloodCommand = new DelegateCommand(o => DeleteMBBlood(), o => CurrentMBBlood != null);
                AddAECommand = new DelegateCommand(o => AddAE());
                DeleteAECommand = new DelegateCommand(o => DeleteAE(), o => CurrentAE != null);
                Select_PROADRENOMEDULLIN_MEAS_Command = new DelegateCommand(o => Select_PROADRENOMEDULLIN_MEAS());
         Select_KOPEPTIN_MEAS_Command = new DelegateCommand(o=> Select_KOPEPTIN_MEAS());
         Select_BRAIN_NATRIURETIC_PEPTIDE_MEAS_Command = new DelegateCommand(o=> Select_BRAIN_NATRIURETIC_PEPTIDE_MEAS());
         Select_C_REACTIVE_PROTEIN_MEAS_Command = new DelegateCommand(o=> Select_C_REACTIVE_PROTEIN_MEAS());
         Select_PROCALCITONIN_MEAS_Command = new DelegateCommand(o=> Select_PROCALCITONIN_MEAS());
         Select_IL6_MEAS_Command = new DelegateCommand(o=> Select_IL6_MEAS());
         Select_FNO_MEAS_Command = new DelegateCommand(o=> Select_FNO_MEAS());


            }
        }
Example #3
0
        public MICROBIOLOGY_BLOOD CreateMicrobiologyBloodForCRF(CRF Model)
        {
            try
            {
                var obj = underlyingContext.CreateObject<MICROBIOLOGY_BLOOD>();
                obj.Id = GuidComb.Generate();
                obj.CreatedBy = Authentification.GetCurrentUser().NAME;
                obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
                obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
                obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);

                obj.CRFId = Model.Id;
                //obj.BETA = "---";
                obj.DATE_CAPTURE = null;
                //obj.GROWTH_PATHOGENS = "---";
                //obj.LAB_NUMBER = "---";
                obj.ORGANISM = GetDefaultOrganism();
                //obj.MRSA = "---";

                return obj;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return null;
            }
        }
Example #4
0
 public void DeleteCrf(CRF CurrentCrf)
 {
     underlyingContext.proc_del_CRF(CurrentCrf.Id.ToString());
     Save();
 }
Example #5
0
        public ADVERSE_EVENT CreateAEforCRF(CRF Model)
        {
            try
            {
                var obj = underlyingContext.CreateObject<ADVERSE_EVENT>();
                obj.Id = GuidComb.Generate();
                obj.CreatedBy = Authentification.GetCurrentUser().NAME;
                obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
                obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
                obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);

                obj.CRFId = Model.Id;
                //obj.ACTIONS = "---";
                //obj.HEAVY = "---";
                //obj.NAME = "---";
                //obj.RELATION = "---";
                //obj.RESULT = "---";

                return obj;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return null;
            }

        }
Example #6
0
        public AB_THERAPY CreateABforCRF(CRF Model)
        {
            try
            {
                var obj = underlyingContext.CreateObject<AB_THERAPY>();
                obj.Id = GuidComb.Generate();
                obj.CreatedBy = Authentification.GetCurrentUser().NAME;
                obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
                obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
                obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);

                obj.CRFId = Model.Id;
                obj.DRUG = GetDefaultDrug();
                obj.ROUTE = GetDefaultRoute();
                //obj.SINGLE_DOSE = "---";
                //obj.FREQUENCY = "---";
                obj.DATE_START = null;
                obj.DATE_END = null;

                return obj;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return null;
            }
        }
Example #7
0
 public MICROBIOLOGY_BLOOD CreateMicrobiologyBlood(CRF crf)
 {
     MICROBIOLOGY_BLOOD obj = null;
     try
     {
         obj = underlyingContext.CreateObject<MICROBIOLOGY_BLOOD>();
         obj.Id = GuidComb.Generate();
         obj.CreatedBy = Authentification.GetCurrentUser().NAME;
         obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
         obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
         obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
         obj.CRF = crf;
         obj.ORGANISM = GetDefaultOrganism();
         obj.DATE_CAPTURE = null;
         //obj.LAB_NUMBER = "---";
         //obj.GROWTH_PATHOGENS = "---";
         //obj.BETA = "---";
         //obj.MRSA = "---";
         underlyingContext.MicrobiologyBloods.AddObject(obj);
         // Save();
     }
     catch (Exception ex)
     {
         MessageBox.Show(@"Не удалось создать Терапия" + ex.Message);
     }
     return obj;
 }
Example #8
0
        public AB_THERAPY CreateABTherapy(CRF crf)
        {
            AB_THERAPY obj = null;
            try
            {
                obj = underlyingContext.CreateObject<AB_THERAPY>();
                obj.Id = GuidComb.Generate();
                obj.CreatedBy = Authentification.GetCurrentUser().NAME;
                obj.CreatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
                obj.UpdatedBy = Authentification.GetCurrentUser().NAME;
                obj.UpdatedByDate = DateTime.Now.ToString(CultureInfo.CurrentUICulture);
                obj.CRF = crf;
                obj.DRUG = GetDefaultDrug();
                obj.ROUTE = GetDefaultRoute();
                //obj.SINGLE_DOSE = "---";
                //obj.FREQUENCY = "---";
                obj.DATE_START = null;
                obj.DATE_END = null;

                underlyingContext.AbTherapys.AddObject(obj);
                //  Save();
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"Не удалось создать Терапия" + ex.Message);
            }
            return obj;
        }
Example #9
0
 public CRFCheckDouble(CRF crf, string res)
 {
     model = crf;
     result = res;
 }
Example #10
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CRFs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCRFs(CRF cRF)
 {
     base.AddObject("CRFs", cRF);
 }
Example #11
0
 /// <summary>
 /// Create a new CRF object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="wARDId">Initial value of the WARDId property.</param>
 /// <param name="nAME">Initial value of the NAME property.</param>
 /// <param name="nUMBER">Initial value of the NUMBER property.</param>
 /// <param name="aE_LOGIC">Initial value of the AE_LOGIC property.</param>
 /// <param name="createdBy">Initial value of the CreatedBy property.</param>
 /// <param name="createdByDate">Initial value of the CreatedByDate property.</param>
 /// <param name="updatedBy">Initial value of the UpdatedBy property.</param>
 /// <param name="updatedByDate">Initial value of the UpdatedByDate property.</param>
 public static CRF CreateCRF(global::System.Guid id, global::System.Guid wARDId, global::System.String nAME, global::System.Int32 nUMBER, global::System.String aE_LOGIC, global::System.String createdBy, global::System.String createdByDate, global::System.String updatedBy, global::System.String updatedByDate)
 {
     CRF cRF = new CRF();
     cRF.Id = id;
     cRF.WARDId = wARDId;
     cRF.NAME = nAME;
     cRF.NUMBER = nUMBER;
     cRF.AE_LOGIC = aE_LOGIC;
     cRF.CreatedBy = createdBy;
     cRF.CreatedByDate = createdByDate;
     cRF.UpdatedBy = updatedBy;
     cRF.UpdatedByDate = updatedByDate;
     return cRF;
 }