/// <summary> /// Initialize, load up all apointments /// </summary> /// <param name="root"></param> /// <param name="_sub"></param> public appointments(MainWindow root, doctor_frame _sub) { parent = root; subparent = _sub; InitializeComponent(); loadAllAppointment(); }
public searchWindow(doctor_frame subroot, string text) { subparent = subroot; InitializeComponent(); this.Title = "Searching for " + text; search(text); }
/// <summary> /// Loads account of user according to thier account category /// </summary> /// <param name="category"></param> /// <param name="id"></param> public void loadAccount(string category, int id) { if (category.Equals("new")) { pages.welcome newPage = new pages.welcome(this, id); pageTransitionControl.TransitionType = PageTransitionType.Fade; pageTransitionControl.ShowPage(newPage); } else if (category.Equals("doctor")) { pages.doctor.doctor_frame newPage = new pages.doctor.doctor_frame(this, id); pageTransitionControl.TransitionType = PageTransitionType.Fade; pageTransitionControl.ShowPage(newPage); } else if (category.Equals("patient")) { pages.patient.patient_frame newPage = new pages.patient.patient_frame(this, id); pageTransitionControl.TransitionType = PageTransitionType.Fade; pageTransitionControl.ShowPage(newPage); } else if (category.Equals("admin")) { pages.admin.admin_frame newPage = new pages.admin.admin_frame(this, id); pageTransitionControl.TransitionType = PageTransitionType.Fade; pageTransitionControl.ShowPage(newPage); } }
public pharmacy(MainWindow root, doctor_frame _sub) { parent = root; subparent = _sub; InitializeComponent(); DataTable qry = parent.query("select * from drugs order by drug_name asc"); listDrugs(qry); }
public settings(MainWindow root, doctor_frame _sub) { InitializeComponent(); parent = root; subparent = _sub; profilePix.Source = subparent.image1.Source; loadAccountInfo(); }
public patients(MainWindow root, doctor_frame _sub) { parent = root; subparent = _sub; InitializeComponent(); timer = new DispatcherTimer(); timer.Tick += new EventHandler(timer_tick); timer.Interval = new TimeSpan(0, 0, 2); timer.Start(); }
int refreshConversationListDelay = 2; //4 seconds (2 second equals 1 counts) public messages(MainWindow root, doctor_frame _sub) { parent = root; subparent = _sub; InitializeComponent(); timer = new DispatcherTimer(); timer.Tick += new EventHandler(timer_tick); timer.Interval = new TimeSpan(0, 0, 2); timer.Start(); rectFrame.Visibility = rtb.Visibility = sendBut.Visibility = bodyBox.Visibility = threadLabel.Visibility = messagecountLabel.Visibility = Visibility.Hidden; }
/// <summary> /// Get list of all patients /// </summary> /// <param name="_root"></param> /// <param name="_root2"></param> /// <param name="_sub"></param> public AddConversation(MainWindow _root, doctor_frame _root2, messages _sub) { parent = _root; subparent = _sub; parent2 = _root2; InitializeComponent(); DataTable qry = parent.query("select login_user_id, concat(lastname,' ',firstname) as name from patient"); foreach (DataRow rw in qry.Rows) { patients.Add(rw["login_user_id"].ToString()); patientList.Items.Add(rw["name"].ToString()); } }
public schedule(MainWindow root, doctor_frame _sub) { parent = root; subparent = _sub; InitializeComponent(); for (int num = 1; num <= 12; num++) { if (num < 10) { comboBox1.Items.Add("0" + num); } else { comboBox1.Items.Add(num); } } for (int num = 0; num < 60; num++) { if (num < 10) { comboBox2.Items.Add("0" + num); } else { comboBox2.Items.Add(num); } } comboBox3.Items.Add("AM"); comboBox3.Items.Add("PM"); comboBox1.SelectedIndex = comboBox2.SelectedIndex = comboBox3.SelectedIndex = 0; DataTable table = parent.query("select patientid,concat(lastname,' ',firstname) as name from patient order by lastname"); foreach (DataRow rw in table.Rows) { ids.Add(rw["patientid"].ToString()); comboBox0.Items.Add(rw["name"].ToString()); } calendar_SelectedDatesChanged(null, null); }
/// <summary> /// Load all information of a patient /// </summary> /// <param name="root"></param> /// <param name="_sub"></param> /// <param name="id"></param> /// <param name="category"></param> public profile(MainWindow root, doctor_frame _sub, int id, string category) { parent = root; patientid = id; subparent = _sub; InitializeComponent(); DataTable qry = parent.query("select *,(select photoblob from photo where login_user_id=photo.id) as photo from patient where patientid=" + id); foreach (DataRow rw in qry.Rows) { proPix.Source = parent.getImg((byte[])rw["photo"]); fullname.Content = rw["lastname"] + " " + rw["firstname"]; patientCode.Content = rw["PCODE"].ToString(); email.Content = rw["email"].ToString(); lastnameBlock.Text = rw["lastname"].ToString(); firstnameBlock.Text = rw["firstname"].ToString(); phoneBlock.Text = rw["phoneno"].ToString(); genderBlock.Text = rw["sex"].ToString(); heightBlock.Text = rw["height"].ToString(); weightBlock.Text = rw["weight"].ToString(); addressBlock.Text = rw["address"].ToString(); bloodgroupBlock.Text = rw["bloodgroup"].ToString(); genotypeBlock.Text = rw["genotype"].ToString(); allergyBlock.Text = rw["allergies"].ToString(); } qry = parent.query("select scheduleid,patientid, status as attended, schedule.date as schedule, date_added as created from schedule where patientid=" + patientid + " order by schedule desc"); foreach (DataRow rw in qry.Rows) { schedule.ScheduleHolder schedule = new schedule.ScheduleHolder(); schedule.ID = int.Parse(rw["scheduleid"].ToString()); schedule.PatientID = int.Parse(rw["patientid"].ToString()); schedule.attended = (rw["attended"].ToString()); schedule.schedule = (rw["schedule"].ToString()); schedule.created = (rw["created"].ToString()); comboBox.Items.Add(rw["schedule"].ToString()); listView0.Items.Add(schedule); } qry = parent.query("select concat(lastname,' ',firstname) from doctor where doctorid=" + subparent.DoctorId); if (qry.Rows.Count > 0) { DataRow row = qry.Rows[0]; doc_name = row[0].ToString(); } qry = parent.query("select *,(select concat(lastname,' ',firstname) from doctor where doctor.doctorid=bills.doctorid) as doctor from bills where patientid=" + patientid); foreach (DataRow rw in qry.Rows) { bills _bill = new bills(); _bill.amount = rw["amount"].ToString(); _bill.date = rw["date"].ToString(); _bill.doctor = rw["doctor"].ToString(); listView1.Items.Add(_bill); } if (category.Equals("appointment")) { tabControl.SelectedIndex = 4; } qry = parent.query("select *,(select concat(lastname,' ',firstname) from doctor where doctor.doctorid=record.doctorid) as doctor from record where patientid=" + id); foreach (DataRow rw in qry.Rows) { id = int.Parse(rw["recordid"].ToString()); string caption = ""; string comment = rw["comment"].ToString(); if (comment.Length > 20) { caption = comment.Substring(0, 15) + "..."; } else { caption = comment; } addToList(id, rw["doctor"].ToString(), caption, rw["date_added"].ToString()); } recordCount.Content = qry.Rows.Count + " record(s)"; }