Example #1
0
 //Constructor used to create new Patient during software operation
 public Patient(string FirstName, string Surname, string Address, DateTime DOB, long num) : base(FirstName, Surname, Address, DOB)
 {
     this.contactnumber   = num;
     this.practice        = CentralisedRecords.AssignPractice();
     this.assignedDentist = CentralisedRecords.AssignDentist(practice);
     CentralisedRecords.SubmitNewPatient(this);
 }
Example #2
0
 //Constructor used to initialise dummy data without manual assignment of dentist and practice
 public Patient(string FirstName, string Surname, string Address, DateTime DOB, long num, Practice Practice, Staff AssignedDentist) : base(FirstName, Surname, Address, DOB)
 {
     this.contactnumber   = num;
     this.practice        = Practice;
     this.assignedDentist = AssignedDentist;
     CentralisedRecords.SubmitNewPatient(this);
 }
Example #3
0
        public static void CreateNewAppointment()
        {
            Console.WriteLine("Enter Surname name to begin creating new appointment");
            string  name = Console.ReadLine();
            Patient ex   = CentralisedRecords.SearchPatientRecords(name);

            Console.WriteLine("Patient Found: {0} {1}\nDoB: {2}", ex.FirstName, ex.Surname, ex.Dob.ToString("dd/MM/yy"));
            Console.WriteLine("Enter Date of Appointment in format DD/MM/YY: ");
            string date = Console.ReadLine();

            Console.WriteLine("Enter Time of Appointment in format: HH:MM in 24-hour clock");
            string   time    = Console.ReadLine();
            DateTime appdate = DateTime.Parse(date + " " + time);

            Console.WriteLine(appdate.ToString("dd/MM/yy HH:mm"));

            Console.WriteLine("Why is appointment requested? i.e. Annual Check Up");
            string note = Console.ReadLine();

            Console.WriteLine("Input treatment Band:/n1: Band 1\n2: Band 2\n3: Band 3");
            Treatment band = (Treatment)Convert.ToInt16(Console.ReadLine()) - 1;

            Console.WriteLine(band);

            ex.practice.SubmitAppointment(new Appointment(ex, appdate, ex.GetDentistObj(), band, note));
        }
Example #4
0
        public static void CreateNewStaff()
        {
            Console.WriteLine("     *******************     \nCreating New Staff Record:\n     *******************     \nEnter Staff Surname:\n");
            string surname = Console.ReadLine().ToLower();

            Console.WriteLine("\nEnter Staff First Name:\n");
            string firstname = Console.ReadLine().ToLower();

            Console.WriteLine("\nEnter Staff Date of Birth in the format [DD/MM/YY]:\n");
            DateTime dob = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("\nEnter Staff Address and Postcode:\n");
            string address = Console.ReadLine();

            Console.WriteLine("\nEnter Staff Primary Contact Number:\n");
            long number = Convert.ToInt64(Console.ReadLine());

            //Start Method call to identify and find the practice
            Console.WriteLine("\nWhich Practice is Staff member's princple Practice\n");
            string location = Console.ReadLine();

            Console.WriteLine("Set Staff Member's Primary Job Role\n1: System Admin\n2: Dentist\n3: Nurse\n4:Receptionist\n");
            Role role = (Role)Convert.ToInt16(Console.ReadLine());



            CentralisedRecords.SubmitNewStaff(new Staff(firstname, surname, address, dob, number, role, CentralisedRecords.FindPractice(location)));
        }
        public static void Authenticate(string username, string password)
        {
            Staff user = CentralisedRecords.SearchStaffRecords(username);

            while (!user.CheckPassword(password))
            {
                Console.WriteLine("\nPassword Incorrect! Please Re-enter password!\n");
                password = Console.ReadLine();
            }

            if (password == "0000")
            {
                user.SetNewPassword();
            }

            Console.WriteLine("Login Successful! Welcome {0}!\nRedirecting to Main Menu!");

            switch (user.jobTitle)
            {
            case Role.Admin:
            {
                CLI.SysAdminMenu();
                break;
            }

            case Role.Dentist:
            {
                CLI.DentistMenu();
                break;
            }

            case Role.Nurse:
            {
                CLI.NurseMenu();
                break;
            }

            case Role.Receptionist:
            {
                CLI.ReceptionistMenu();
                break;
            }

            default: break;
            }
        }
Example #6
0
        public static void CreateNewPatient()
        {
            Console.WriteLine("     *******************     \nCreating New Patient Record:\n     *******************     \nEnter Patient Surname:\n");
            string surname = Console.ReadLine();

            Console.WriteLine("\nEnter Patient First Name:\n");
            string firstname = Console.ReadLine();

            Console.WriteLine("\nEnter Patient Date of Birth in the format [DD/MM/YY]:\n");
            DateTime dob = DateTime.Parse(Console.ReadLine());

            Console.WriteLine("\nEnter Patient Address and Postcode:\n");
            string address = Console.ReadLine();

            Console.WriteLine("\nEnter Patient Primary Contact Number:\n");
            long number = Convert.ToInt64(Console.ReadLine());

            CentralisedRecords.SubmitNewPatient(new Patient(firstname, surname, address, dob, number));
        }
Example #7
0
        public static void Initialise()
        {
            //Initialise Practice
            Practice taunton    = new Practice("Taunton");
            Practice bridgwater = new Practice("Bridgwater");
            Practice exeter     = new Practice("Exeter");

            CentralisedRecords.InitialiseNewPractice(taunton);
            CentralisedRecords.InitialiseNewPractice(bridgwater);
            CentralisedRecords.InitialiseNewPractice(exeter);



            //Initialise Staff Records
            //
            Staff Sansom = new Staff("elizabeth", "sansom", "3 Cyril Street, Taunton, TA2 6HW",
                                     new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Taunton"));
            Staff Shaun = new Staff("duncan", "shaun", "7 Hook Street, Taunton, TA1 1BU",
                                    new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Taunton"));
            Staff Smith = new Staff("michael", "smith", "13 Smithy, Wellington, TA14 3ZY",
                                    new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Taunton"));


            Staff Bateman = new Staff("jason", "bateman", "4 Wrens Close, Exeter, EX12 1BT",
                                      new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Exeter"));
            Staff Pierce = new Staff("pierce", "brosnan", "5 Tank Street, Exeter, EX11, 5TT",
                                     new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Exeter"));

            Staff Cruise = new Staff("tom", "cruise", "15 Alpha Street, Exeter, EX1 2BB",
                                     new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Exeter"));

            Staff Stone = new Staff("john", "stone", "The Burke, Bridgwater, TA5, 1AX",
                                    new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Bridgwater"));
            Staff Sword = new Staff("chris", "bent", "12 Burns Road, Bridgwater, TA5 4TY",
                                    new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Bridgwater"));

            Staff Swift = new Staff("jay", "swift", "55 West Street, Bridgwater, TA5 1ZY",
                                    new DateTime(10 / 04 / 87), 01823333333, Role.Dentist, CentralisedRecords.FindPractice("Bridgwater"));

            //Initialise Patient Records
            Patient Shaunj = new Patient("Jim", "Shaun", "12 Fake Street, Taunton, TA1 1NN", new DateTime(27 / 10 / 1989), 07001001002, taunton, Sansom);
        }