Esempio n. 1
0
        public void Functional_GetDependants()
        {
            try
            {
                Demographics d = new Demographics();

                Patient p = new Patient(d);
                p.FirstName   = "Divyangbhai";
                p.LastName    = "Dankhara";
                p.HCN         = "1234567890AB";
                p.MInitial    = "A";
                p.DateOfBirth = "12111997";
                p.Sex         = "M";

                d.AddNewPatient(p);

                List <Patient> dp = d.GetRelations(p);

                if (!(dp == null))
                {
                    foreach (Patient a in dp)
                    {
                        if (!(a.HeadOfHouse == p.HCN))
                        {
                            Assert.Fail();
                        }
                    }
                }
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Esempio n. 2
0
        public void Null_GetDependants()
        {
            try
            {
                Demographics d = new Demographics();

                d.GetRelations(null);
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Esempio n. 3
0
        private void CbPrimaryPatient_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Logging.Log("Primary patient selection changed in AppointmentScheduler");

            primary = (Patient)cbPrimaryPatient.SelectedItem;
            if (cbPrimaryPatient.SelectedItem != null)
            {
                cbSecondaryPatient.Items.Clear();
                List <Patient> lp = demographics.GetRelations(primary);
                foreach (Patient p in lp)
                {
                    cbSecondaryPatient.Items.Add(p);
                }
                if (lp.Count > 0)
                {
                    cbSecondaryPatient.IsEnabled = true;
                }
                else
                {
                    cbSecondaryPatient.IsEnabled = false;
                }
            }
        }