Beispiel #1
0
        /// <summary>
        /// Contains the program main
        /// </summary>
        ///
        static void Main(string[] args)
        {
            //Create and load database
            DatabaseManager database = new DatabaseManager();

            database.LoadAll();

            //Declare database infomation
            if (populate_test_data)
            {
                DatabaseTable patients = database["Patients"];

                DatabaseTable appointments = database["Appointments"];

                DatabaseTable master = database["BillingMaster"];

                DatabaseTable billing = database["Billing"];


                //Create first patient
                patients.Insert(1, "5534567890EE", "Parmenter", "Billy", 'A', "May 6, 1996", SexTypes.M, 1);

                //Create first appointment
                appointments.Insert(1, CalendarManager.ConvertYearMonthToMonth(2017, 11), 3, 0, 1, 1);

                //Create first billing row
                billing.Insert(1, 1, "A665", BillingCodeResponse.NONE);

                //Second appointment
                appointments.Insert(2, CalendarManager.ConvertYearMonthToMonth(2017, 11), 5, 0, 1, 1);

                //second row
                billing.Insert(2, 2, "A005", BillingCodeResponse.NONE);

                //second patient
                patients.Insert(2, "1234567890KV", "Blanski", "Bob", 'A', "May 6, 1996", SexTypes.F, 1);

                //third appointment
                appointments.Insert(3, CalendarManager.ConvertYearMonthToMonth(2017, 11), 4, 0, 2, 1);

                //third and fourth rows (both assumed in same appointment)
                billing.Insert(3, 3, "A665", BillingCodeResponse.NONE);
                billing.Insert(4, 3, "A005", BillingCodeResponse.NONE);
            }

            InterfaceStart.InitConsole();

            InterfaceStart _interface = new InterfaceStart(StandardConsole.INSTANCE, database);

            _interface.WaitUntilExit();

            InterfaceStart.ResetConsole();

            //database.SaveAll();
        }
Beispiel #2
0
 /// <summary>
 /// Method that finds next empty slot
 /// </summary>
 /// <param name="year">Year being requested</param>
 /// <param name="month">Month being requested</param>
 /// <param name="day">Day being requested</param>
 /// <param name="nweeks_after">Number of weeks after current appointment date</param>
 ///
 public AptTimeSlot FindNextEmpty(int year, int month, int day, int nweeks_after)
 {
     return(scheduler.FindNextSlot(new AptTimeSlot(CalendarManager.ConvertYearMonthToMonth(year, month), day, 0), nweeks_after));
 }
Beispiel #3
0
        /// <summary>
        /// Method that reschedules appointments
        /// </summary>
        /// <param name="aptid">ID of appointment</param>
        /// <param name="year">Year being requested</param>
        /// <param name="month">Month being requested</param>
        /// <param name="day">Day being requested</param>
        /// <param name="slot">Slot being requested</param>
        ///

        public void RescheduleAppointment(int aptid, int year, int month, int day, int slot)
        {
            scheduler.Reschedule(aptid, new AptTimeSlot(CalendarManager.ConvertYearMonthToMonth(year, month), day, 0));
        }
Beispiel #4
0
 /// <summary>
 /// Method schedules the appointment
 /// </summary>
 /// <param name="year">Year being requested</param>
 /// <param name="month">Month being requested</param>
 /// <param name="day">Day being requested</param>
 /// <param name="slot">Slot being requested</param>
 /// <param name="patientid">ID of patient</param>
 /// <param name="caregiverid"> ID of caregiver</param>
 ///
 public void ScheduleAppointment(int year, int month, int day, int slot, int patientid, int caregiverid)
 {
     scheduler.Schedule(new AptTimeSlot(CalendarManager.ConvertYearMonthToMonth(year, month), day, slot), patientid, caregiverid);
 }
Beispiel #5
0
        /// <summary>
        /// Method that gets the appointment ID
        /// </summary>
        /// <param name="year">Year being requested</param>
        /// <param name="month">Month being requested</param>
        /// <param name="day">Day being requested</param>
        /// <param name="slot">Slot being requested</param>
        /// <returns>appointment ID</returns>
        ///

        public int?GetAppointmentID(int year, int month, int day, int slot)
        {
            return(scheduler.GetAppointmentID(CalendarManager.ConvertYearMonthToMonth(year, month), day, slot));
        }
Beispiel #6
0
 /// <summary>
 /// Method that returns available time slots
 /// </summary>
 /// <param name="year">Year being requested</param>
 /// <param name="month">Month being requested</param>
 /// <param name="day">Day being requested</param>
 /// <param name="slot">Slot being requested</param>
 /// <returns>bool if timeslot is availale</returns>
 ///
 public bool TimeslotAvailable(int year, int month, int day, int slot)
 {
     return(scheduler.TimeslotAvailable(CalendarManager.ConvertYearMonthToMonth(year, month), day, slot));
 }