Example #1
0
        public static void GenerateData()
        {
            Data = new ObservableCollection <PatientAppointment>();
            string[] CaseStatusStrings    = { "Open" };
            string[] CaseTypeStrings      = { "NoFault" };
            string[] PatientStatusStrings = { "Walk in", "Follow Up", "Rescheduled" };


            Random random = new Random(DateTime.Now.Second);

            for (int i = 0; i < 30; ++i)
            {
                Patient         P    = Patient.Data[random.Next(0, Patient.Data.Count)];
                ScheduledDoctor Slot = ScheduledDoctor.Data[random.Next(0, ScheduledDoctor.Data.Count)];

                DateTime Date     = Slot.From.AddMinutes(random.Next(0, 9) * 15);
                int      Duration = random.Next(1, 3) * 15;

                string CaseStatus    = CaseStatusStrings[random.Next(0, CaseStatusStrings.Length)];
                string CaseType      = CaseTypeStrings[random.Next(0, CaseTypeStrings.Length)];
                string PatientStatus = PatientStatusStrings[random.Next(0, PatientStatusStrings.Length)];

                bool ToBeScheduled = random.Next(0, 2) == 0 ? true : false;

                Data.Add(new PatientAppointment(random.Next(0, 10000000), P, Slot, Date, Duration, CaseStatus, CaseType, PatientStatus, ToBeScheduled));
            }
        }
Example #2
0
 public PatientAppointment(int ID, Patient PatientInfo, ScheduledDoctor slot, DateTime date, int duration, string status, string type, string PatientStatus, bool ToBeScheduled)
 {
     this.PatientInfo   = PatientInfo;
     this.Slot          = slot;
     this.Date          = date;
     this.Duration      = duration;
     this.CaseStatus    = status;
     this.CaseType      = type;
     this.PatientStatus = PatientStatus;
     this.ToBeScheduled = ToBeScheduled;
     this.ID            = ID;
 }