public recordDisplay()
        {
            InitializeComponent();
            _context = new DbModel.dataBaseSetEntities();


            try
            {
                //var pl = _context.PatientsLists.Where(x => x.patientID == patinetID).ToList();
            }
            catch
            {
                this.recValue.Content = "Database connection error. Cant find this patient";
            }
        }
Beispiel #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var id = int.Parse(patientIDbox.Text);

            db = new DbModel.dataBaseSetEntities();
            var                      pl    = db.PatientsLists.Where(x => x.patientID == id).ToList();
            recordDisplay            rd    = new recordDisplay();
            var                      win   = Window.GetWindow(this);
            InfusionSpeedCalculation case1 = new InfusionSpeedCalculation(double.Parse(pl[0].weight.ToString()));;

            case1.getActualPumpSpeedMlPerHour();

            win.Content = rd;
            if (rd != null)
            {
                rd.apptttarget.Content  = "Target aTTP: " + pl[0].aptttargetMin.ToString() + "-" + pl[0].aptttargetMax.ToString();
                rd.patientID.Content    = "Patient ID: " + pl[0].patientID.ToString();
                rd.lastaptt.Content     = "Last aPTT: " + pl[0].RecordsLists.First().lastAptt.ToString();
                rd.lastapttTime.Content = "Time: " + pl[0].RecordsLists.First().lastApttTime.ToString();

                rd.patinetID = pl[0].patientID;
                rd.pl        = pl;
            }
        }