Esempio n. 1
0
 /// <summary>
 /// Does the necessary functionality required during the loding of the form.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PortingForm_Load(object sender, EventArgs e)
 {
     try
     {
         pageRows    = Convert.ToInt32(IVLVariables._ivlConfig.UserSettings._noOfPatientsPerPage.val);//Assigns no of patients to be displayed
         PagesCount  = Convert.ToInt32(Math.Ceiling(NewDataVariables.Patients.Count * 1.0 / pageRows));
         CurrentPage = 1;
         RefreshPagination();
         RebindGridForPageChange();
         INTUSOFT.Data.NewDbModel.Patient patient = NewDataVariables._Repo.GetById <INTUSOFT.Data.NewDbModel.Patient>(4);
         System.Diagnostics.Stopwatch     st      = new System.Diagnostics.Stopwatch();
         st.Start();
         List <visit> visits = NewDataVariables._Repo.GetByCategory <visit>("patient", patient).ToList <visit>();
         MessageBox.Show(st.ElapsedMilliseconds.ToString());
         st.Stop();
         System.Diagnostics.Stopwatch sto = new System.Diagnostics.Stopwatch();
         sto.Start();
         List <obs> obss = NewDataVariables._Repo.GetByCategory <obs>("visit", visits[1]).ToList <obs>();
         MessageBox.Show(sto.ElapsedMilliseconds.ToString());
         sto.Stop();
         System.Diagnostics.Stopwatch str = new System.Diagnostics.Stopwatch();
         str.Start();
         List <report> reports = NewDataVariables._Repo.GetByCategory <report>("visit", visits[1]).ToList <report>();
         MessageBox.Show(str.ElapsedMilliseconds.ToString());
         str.Stop();
     }
     catch (Exception ex)
     {
         Common.ExceptionLogWriter.WriteLog(ex, Exception_Log);
     }
 }
Esempio n. 2
0
        private void getAllObservation_lbl_Click(object sender, EventArgs e)
        {
            try
            {
                INTUSOFT.Data.NewDbModel.Patient p = NewDataVariables._Repo.GetById <INTUSOFT.Data.NewDbModel.Patient>(13);
                List <obs> allObservations         = NewDataVariables._Repo.GetByCategory <INTUSOFT.Data.NewDbModel.obs>("person_id", p).ToList();// as List<NewPatient>;
                MessageBox.Show(allObservations.Count.ToString());

                List <report> allReports = NewDataVariables._Repo.GetByCategory <INTUSOFT.Data.NewDbModel.report>("Patient", p).ToList();// as List<NewPatient>;
                MessageBox.Show(allReports.Count.ToString());

                INTUSOFT.Data.NewDbModel.eye_fundus_image obs           = NewDataVariables._Repo.GetById <INTUSOFT.Data.NewDbModel.eye_fundus_image>(59);
                List <eye_fundus_image_annotation>        allAnnotation = NewDataVariables._Repo.GetByCategory <INTUSOFT.Data.NewDbModel.eye_fundus_image_annotation>("eyeFundusImage", obs).ToList();// as List<NewPatient>;
                MessageBox.Show(allAnnotation.Count.ToString());
            }
            catch (Exception ex)
            {
                Common.ExceptionLogWriter.WriteLog(ex, Exception_Log);
            }
        }