Example #1
0
 public static void LoadData(string start, string end)
 {
     _roles       = new List <Roles>(Roles.ListRoles());
     _patients    = new List <Patient>(Patient.ListPatients());
     _users       = new List <Users>(Users.ListUsers());
     _events      = new List <Events>(Events.ListEvents());
     _clinics     = new List <Clinics>(Clinics.ListClinic());
     _branch      = new List <Branch>(Branch.ListBranch());
     _queues      = new List <Queue>(Queue.ListQueue());
     _admit       = new List <Admission>(Admission.ListAdmission());
     _wards       = new List <Wards>(Wards.ListWards());
     _departments = new List <Departments>(Departments.ListDepartment());
     _procedures  = new List <Procedures>(Procedures.ListProcedures());
     _operations  = new List <Operations>(Operations.ListOperations());
     _specimens   = new List <Specimens>(Specimens.ListSpecimens());
     _tests       = new List <Tests>(Tests.ListTests());
     _disciplines = new List <Discipline>(Discipline.ListDiscipline());
     _beds        = new List <Beds>(Beds.ListBeds());
     _categories  = new List <Category>(Category.ListCategory());
     _cds         = new List <Cd10>(Cd10.ListCd10());
     _items       = new List <Item>(Item.ListItem());
     _stocks      = new List <Stock>(Stock.ListStock());
     _dosages     = new List <Dosage>(Dosage.ListDosage());
     _transactors = new List <Transactor>(Transactor.ListTransactors());
     //  _services = new List<Services>(Services.ListServices());
     // _diagnosis = new List<Diagnosis>(Diagnosis.ListDiagnosis());
     _rooms = new List <Room>(Room.ListRoom());
     // _vitals = new List<Vitals>(Vitals.ListVitals());
     _org = new List <Organisation>(Organisation.ListOrganisation());
 }
Example #2
0
        private void dtGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            updateID = dtGrid.Rows[e.RowIndex].Cells[1].Value.ToString();
            _cd10    = new Cd10(dtGrid.Rows[e.RowIndex].Cells[1].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[2].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[3].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[4].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[5].Value.ToString(), DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), Helper.orgID);

            DBConnect.Update(_cd10, updateID);
            Global._cds.RemoveAll(x => x.Id == updateID);
            Global._cds.Add(_cd10);
        }
Example #3
0
 private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
 {
     try
     {
         string      path       = Environment.CurrentDirectory + "\\icd10.txt";
         const Int32 BufferSize = 1024;
         using (var fileStream = File.OpenRead(path))
             using (var streamReader = new StreamReader(fileStream, Encoding.UTF8, true, BufferSize))
             {
                 while ((line = streamReader.ReadLine()) != null)
                 {
                     //  FeedBack(line);
                     Console.WriteLine(line);
                     string[] sections     = line.Split(' ');
                     string   descriptions = "";
                     for (int i = 1; i < sections.Count(); i++)
                     {
                         descriptions = descriptions + " " + sections[i];
                     }
                     string id = Guid.NewGuid().ToString();
                     _cd10 = new Cd10(id, sections[0], Helper.CleanString(descriptions), " ", " ", DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), Helper.orgID);
                     if (Global._cds.Where(h => h.Code.Contains(sections[0])).Count() < 1)
                     {
                         DBConnect.Insert(_cd10);
                     }
                     else
                     {
                         Console.WriteLine("Already saved " + line);
                     }
                 }
             }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }